Remove random generation tag because it's not needed anymore.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-07-07 11:10:54 +02:00 committed by Guillaume de Rouville
parent 70b2a9e58a
commit 9109052638

View File

@ -452,7 +452,6 @@ Let's see how to deploy an image locally and push it to the local cluster
`kube/todoapp.cue` faces these changes: `kube/todoapp.cue` faces these changes:
- `suffix`, a random string for a unique tag name
- `repository`, source code of the app to build. It needs to have a Dockerfile - `repository`, source code of the app to build. It needs to have a Dockerfile
- `registry`, URI of the registry to push to - `registry`, URI of the registry to push to
- `image`, build of the image - `image`, build of the image
@ -466,24 +465,18 @@ import (
"encoding/yaml" "encoding/yaml"
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/random"
"alpha.dagger.io/docker" "alpha.dagger.io/docker"
"alpha.dagger.io/kubernetes" "alpha.dagger.io/kubernetes"
"alpha.dagger.io/kubernetes/kustomize" "alpha.dagger.io/kubernetes/kustomize"
) )
// Randrom string for tag
suffix: random.#String & {
seed: ""
}
// input: source code repository, must contain a Dockerfile // input: source code repository, must contain a Dockerfile
// set with `dagger input dir repository . -e kube` // set with `dagger input dir repository . -e kube`
repository: dagger.#Artifact & dagger.#Input repository: dagger.#Artifact & dagger.#Input
// Registry to push images to // Registry to push images to
registry: string & dagger.#Input registry: string & dagger.#Input
tag: "test-kind-\(suffix.out)" tag: "test-kind"
// input: kubernetes objects directory to deploy to // input: kubernetes objects directory to deploy to
// set with `dagger input dir manifest ./k8s -e kube` // set with `dagger input dir manifest ./k8s -e kube`
@ -568,7 +561,6 @@ gcrCreds: gcr.#Credentials & {
`kube/todoapp.cue`, on the other hand, faces these changes: `kube/todoapp.cue`, on the other hand, faces these changes:
- `suffix`, a random string for a unique tag name
- `repository`, source code of the app to build. It needs to have a Dockerfile - `repository`, source code of the app to build. It needs to have a Dockerfile
- `registry`, URI of the registry to push to - `registry`, URI of the registry to push to
- `image`, build of the image - `image`, build of the image
@ -582,24 +574,18 @@ import (
"encoding/yaml" "encoding/yaml"
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/random"
"alpha.dagger.io/docker" "alpha.dagger.io/docker"
"alpha.dagger.io/kubernetes" "alpha.dagger.io/kubernetes"
"alpha.dagger.io/kubernetes/kustomize" "alpha.dagger.io/kubernetes/kustomize"
) )
// Randrom string for tag
suffix: random.#String & {
seed: ""
}
// input: source code repository, must contain a Dockerfile // input: source code repository, must contain a Dockerfile
// set with `dagger input dir repository . -e kube` // set with `dagger input dir repository . -e kube`
repository: dagger.#Artifact & dagger.#Input repository: dagger.#Artifact & dagger.#Input
// GCR registry to push images to // GCR registry to push images to
registry: string & dagger.#Input registry: string & dagger.#Input
tag: "test-gcr-\(suffix.out)" tag: "test-gcr"
// source of Kube config file. // source of Kube config file.
// set with `dagger input dir manifest ./k8s -e kube` // set with `dagger input dir manifest ./k8s -e kube`
@ -687,7 +673,6 @@ ecrCreds: ecr.#Credentials & {
`kube/todoapp.cue`, on the other hand, faces these changes: `kube/todoapp.cue`, on the other hand, faces these changes:
- `suffix`, a random string for a unique tag name
- `repository`, source code of the app to build. It needs to have a Dockerfile - `repository`, source code of the app to build. It needs to have a Dockerfile
- `registry`, URI of the registry to push to - `registry`, URI of the registry to push to
- `image`, build of the image - `image`, build of the image
@ -701,24 +686,18 @@ import (
"encoding/yaml" "encoding/yaml"
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/random"
"alpha.dagger.io/docker" "alpha.dagger.io/docker"
"alpha.dagger.io/kubernetes" "alpha.dagger.io/kubernetes"
"alpha.dagger.io/kubernetes/kustomize" "alpha.dagger.io/kubernetes/kustomize"
) )
// Randrom string for tag
suffix: random.#String & {
seed: ""
}
// input: source code repository, must contain a Dockerfile // input: source code repository, must contain a Dockerfile
// set with `dagger input dir repository . -e kube` // set with `dagger input dir repository . -e kube`
repository: dagger.#Artifact & dagger.#Input repository: dagger.#Artifact & dagger.#Input
// ECR registry to push images to // ECR registry to push images to
registry: string & dagger.#Input registry: string & dagger.#Input
tag: "test-ecr-\(suffix.out)" tag: "test-ecr"
// source of Kube config file. // source of Kube config file.
// set with `dagger input dir manifest ./k8s -e kube` // set with `dagger input dir manifest ./k8s -e kube`
@ -819,15 +798,13 @@ dagger input dir repository . -e kube
```shell ```shell
dagger up -e kube dagger up -e kube
# 4:09AM INF suffix.out | computing
# 4:09AM INF manifest | computing # 4:09AM INF manifest | computing
# 4:09AM INF repository | computing # 4:09AM INF repository | computing
# ... # ...
# 4:09AM INF todoApp.kubeSrc | #37 0.858 service/todoapp-service created # 4:09AM INF todoApp.kubeSrc | #37 0.858 service/todoapp-service created
# 4:09AM INF todoApp.kubeSrc | #37 0.879 deployment.apps/todoapp created # 4:09AM INF todoApp.kubeSrc | #37 0.879 deployment.apps/todoapp created
# Output Value Description # Output Value Description
# suffix.out "azkestizysbx" generated random string # todoApp.remoteImage.ref "localhost:5000/kind:test-kind@sha256:cb8d92518b876a3fe15a23f7c071290dfbad50283ad976f3f5b93e9f20cefee6" Image ref
# todoApp.remoteImage.ref "localhost:5000/kind:test-kind-azkestizysbx@sha256:cb8d92518b876a3fe15a23f7c071290dfbad50283ad976f3f5b93e9f20cefee6" Image ref
# todoApp.remoteImage.digest "sha256:cb8d92518b876a3fe15a23f7c071290dfbad50283ad976f3f5b93e9f20cefee6" Image digest # todoApp.remoteImage.digest "sha256:cb8d92518b876a3fe15a23f7c071290dfbad50283ad976f3f5b93e9f20cefee6" Image digest
``` ```
@ -1011,23 +988,17 @@ package main
import ( import (
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/random"
"alpha.dagger.io/docker" "alpha.dagger.io/docker"
"alpha.dagger.io/kubernetes" "alpha.dagger.io/kubernetes"
) )
// Randrom string for tag
suffix: random.#String & {
seed: ""
}
// input: source code repository, must contain a Dockerfile // input: source code repository, must contain a Dockerfile
// set with `dagger input dir repository . -e kube` // set with `dagger input dir repository . -e kube`
repository: dagger.#Artifact & dagger.#Input repository: dagger.#Artifact & dagger.#Input
// Registry to push images to // Registry to push images to
registry: string & dagger.#Input registry: string & dagger.#Input
tag: "test-kind-\(suffix.out)" tag: "test-kind"
// Todoapp deployment pipeline // Todoapp deployment pipeline
todoApp: { todoApp: {
@ -1064,23 +1035,17 @@ package main
import ( import (
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/random"
"alpha.dagger.io/docker" "alpha.dagger.io/docker"
"alpha.dagger.io/kubernetes" "alpha.dagger.io/kubernetes"
) )
// Randrom string for tag
suffix: random.#String & {
seed: ""
}
// input: source code repository, must contain a Dockerfile // input: source code repository, must contain a Dockerfile
// set with `dagger input dir repository . -e kube` // set with `dagger input dir repository . -e kube`
repository: dagger.#Artifact & dagger.#Input repository: dagger.#Artifact & dagger.#Input
// GCR registry to push images to // GCR registry to push images to
registry: string & dagger.#Input registry: string & dagger.#Input
tag: "test-gcr-\(suffix.out)" tag: "test-gcr"
// Todoapp deployment pipeline // Todoapp deployment pipeline
todoApp: { todoApp: {
@ -1117,23 +1082,17 @@ package main
import ( import (
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/random"
"alpha.dagger.io/docker" "alpha.dagger.io/docker"
"alpha.dagger.io/kubernetes" "alpha.dagger.io/kubernetes"
) )
// Randrom string for tag
suffix: random.#String & {
seed: ""
}
// input: source code repository, must contain a Dockerfile // input: source code repository, must contain a Dockerfile
// set with `dagger input dir repository . -e kube` // set with `dagger input dir repository . -e kube`
repository: dagger.#Artifact & dagger.#Input repository: dagger.#Artifact & dagger.#Input
// ECR registry to push images to // ECR registry to push images to
registry: string & dagger.#Input registry: string & dagger.#Input
tag: "test-ecr-\(suffix.out)" tag: "test-ecr"
// Todoapp deployment pipeline // Todoapp deployment pipeline
todoApp: { todoApp: {
@ -1178,15 +1137,13 @@ dagger input unset manifest -e kube
```shell ```shell
dagger up -e kube dagger up -e kube
# 4:09AM INF suffix.out | computing
# 4:09AM INF manifest | computing # 4:09AM INF manifest | computing
# 4:09AM INF repository | computing # 4:09AM INF repository | computing
# ... # ...
# 4:09AM INF todoApp.kubeSrc | #37 0.858 service/todoapp-service created # 4:09AM INF todoApp.kubeSrc | #37 0.858 service/todoapp-service created
# 4:09AM INF todoApp.kubeSrc | #37 0.879 deployment.apps/todoapp created # 4:09AM INF todoApp.kubeSrc | #37 0.879 deployment.apps/todoapp created
# Output Value Description # Output Value Description
# suffix.out "abdkektizesxb" generated random string # todoApp.remoteImage.ref "localhost:5000/kind:test-kind@sha256:cb8d91518b076a3fe15a33f7c171290dfbad50283ad976f3f5b93e9f33cefag7" Image ref
# todoApp.remoteImage.ref "localhost:5000/kind:test-kind-abdkektizesxb@sha256:cb8d91518b076a3fe15a33f7c171290dfbad50283ad976f3f5b93e9f33cefag7" Image ref
# todoApp.remoteImage.digest "sha256:cb8d91518b076a3fe15a33f7c171290dfbad50283ad976f3f5b93e9f33cefag7" Image digest # todoApp.remoteImage.digest "sha256:cb8d91518b076a3fe15a33f7c171290dfbad50283ad976f3f5b93e9f33cefag7" Image digest
``` ```