From 5af2878a30cf7a65e97bfe052bd00dd2a7133c09 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Wed, 4 Dec 2019 14:37:54 +0100 Subject: [PATCH] =?UTF-8?q?Use=20dogfooding=20`ko`=20image=20during=20rele?= =?UTF-8?q?ase=20and=20nightly=20=F0=9F=8C=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No more need to build it at release time. Signed-off-by: Vincent Demeester --- tekton/ci-images.yaml | 78 ---------------------------- tekton/publish-nightly.yaml | 3 +- tekton/publish.yaml | 3 +- tekton/release-pipeline-nightly.yaml | 33 +----------- tekton/resources.yaml | 10 ---- 5 files changed, 5 insertions(+), 122 deletions(-) delete mode 100644 tekton/ci-images.yaml diff --git a/tekton/ci-images.yaml b/tekton/ci-images.yaml deleted file mode 100644 index 08507cdc9aa..00000000000 --- a/tekton/ci-images.yaml +++ /dev/null @@ -1,78 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: Task -metadata: - name: publish-ci-images -spec: - inputs: - resources: - - name: source - type: git - params: - - name: imageRegistry - description: TODO(#569) This is a hack to make it easy for folks to switch the registry being used by the many many image outputs - outputs: - resources: - - name: builtKoImage - type: image - steps: - - - name: build-push-ko-image - image: gcr.io/kaniko-project/executor:v0.9.0 - command: - - /kaniko/executor - args: - - --dockerfile=/workspace/source/tekton/ko/Dockerfile - - --destination=${inputs.params.imageRegistry}/${outputs.resources.builtKoImage.url} - - --context=/workspace/source - - volumeMounts: - - name: gcp-secret - mountPath: /secret - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /secret/release.json - - volumes: - - name: gcp-secret - secret: - secretName: release-secret ---- -apiVersion: tekton.dev/v1alpha1 -kind: Task -metadata: - name: publish-ci-images-triggers -spec: - inputs: - resources: - - name: source - type: git - params: - - name: imageRegistry - description: TODO(#569) This is a hack to make it easy for folks to switch the registry being used by the many many image outputs - outputs: - resources: - - name: builtKoImage - type: image - steps: - - - name: build-push-ko-image - image: gcr.io/kaniko-project/executor:v0.9.0 - command: - - /kaniko/executor - args: - - --dockerfile=/workspace/source/tekton/ko/Dockerfile - - --destination=$(inputs.params.imageRegistry)/$(outputs.resources.builtKoImage.url) - - --context=/workspace/source - - volumeMounts: - - name: gcp-secret - mountPath: /secret - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /secret/release.json - - volumes: - - name: gcp-secret - secret: - secretName: release-secret diff --git a/tekton/publish-nightly.yaml b/tekton/publish-nightly.yaml index d41d0dcc7b8..60fba7defb1 100644 --- a/tekton/publish-nightly.yaml +++ b/tekton/publish-nightly.yaml @@ -117,7 +117,8 @@ spec: - name: run-ko # TODO(#639) we should be able to use the image built by an upstream Task here instead of hardcoding - image: gcr.io/tekton-nightly/ko-ci + # FIXME(vdemeester) use a tagged version once 0.2 is released + image: gcr.io/tekton-releases/dogfooding/ko:latest env: - name: KO_DOCKER_REPO value: ${inputs.params.imageRegistry} diff --git a/tekton/publish.yaml b/tekton/publish.yaml index 30613ac52d7..6fd53f47c54 100644 --- a/tekton/publish.yaml +++ b/tekton/publish.yaml @@ -107,7 +107,8 @@ spec: - name: run-ko # TODO(#639) we should be able to use the image built by an upstream Task here instead of hardcoding - image: gcr.io/tekton-releases/ko-ci + # FIXME(vdemeester) use a tagged version once 0.2 is released + image: gcr.io/tekton-releases/dogfooding/ko:latest env: - name: KO_DOCKER_REPO value: $(inputs.params.imageRegistry) diff --git a/tekton/release-pipeline-nightly.yaml b/tekton/release-pipeline-nightly.yaml index b759c3cc38e..0ca0c940721 100644 --- a/tekton/release-pipeline-nightly.yaml +++ b/tekton/release-pipeline-nightly.yaml @@ -15,8 +15,6 @@ spec: type: git - name: bucket type: storage - - name: builtKoImage - type: image - name: builtBaseImage type: image - name: builtEntrypointImage @@ -38,21 +36,7 @@ spec: - name: builtGcsFetcherImage type: image tasks: - - name: publish-ko-image - taskRef: - name: publish-ci-images - params: - - name: imageRegistry - value: ${params.imageRegistry} - resources: - inputs: - - name: source - resource: source-repo - outputs: - - name: builtKoImage - resource: builtKoImage - name: publish-images - runAfter: [publish-ko-image] taskRef: name: publish-tekton-pipelines-nightly params: @@ -108,8 +92,6 @@ spec: type: git - name: bucket type: storage - - name: builtKoImage - type: image - name: builtBaseImage type: image - name: builtEntrypointImage @@ -167,21 +149,8 @@ spec: inputs: - name: source resource: source-repo - - name: publish-ko-image - taskRef: - name: publish-ci-images-triggers - params: - - name: imageRegistry - value: $(params.imageRegistry) - resources: - inputs: - - name: source - resource: source-repo - outputs: - - name: builtKoImage - resource: builtKoImage - name: publish-images - runAfter: [publish-ko-image, build, unit-tests] + runAfter: [build, unit-tests] taskRef: name: publish-tekton-pipelines params: diff --git a/tekton/resources.yaml b/tekton/resources.yaml index 4f7f8e435f9..20c7830bd9d 100644 --- a/tekton/resources.yaml +++ b/tekton/resources.yaml @@ -40,16 +40,6 @@ spec: --- apiVersion: tekton.dev/v1alpha1 kind: PipelineResource -metadata: - name: ko-image -spec: - type: image - params: - - name: url - value: ko-ci # Registry is provided via parameter, this is a hack see #569 ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource metadata: name: base-image spec: