From 993fb9f6c41cc81cd70a86a9d52dcb88f41065e4 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Fri, 18 Oct 2019 13:01:19 +0100 Subject: [PATCH] Add a tekton v0.7.0 version of the nightly release Create a new version of the nightly-release that is identical to the full release, except for the following: - no release pre-check is executed - a new ko image is built (using a v0.7.0 compatible task) - the default image registry is gcr.io/tekton-nightly This version can be executed via triggers on the dogfooding cluster. This commit leaves the existing nightly release untouched so that it can be executed via prow, until we are ready to finalize the switch to the dogfooding cluster for nightly. --- tekton/ci-images.yaml | 39 ++++++++ tekton/release-pipeline-nightly.yaml | 141 +++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) diff --git a/tekton/ci-images.yaml b/tekton/ci-images.yaml index 57a587d71ef..3bee365bb8a 100644 --- a/tekton/ci-images.yaml +++ b/tekton/ci-images.yaml @@ -37,4 +37,43 @@ spec: - 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/release-pipeline-nightly.yaml b/tekton/release-pipeline-nightly.yaml index 7837992d440..37d23aef5d7 100644 --- a/tekton/release-pipeline-nightly.yaml +++ b/tekton/release-pipeline-nightly.yaml @@ -101,3 +101,144 @@ spec: resource: builtPullRequestInitImage - name: builtGcsFetcherImage resource: builtGcsFetcherImage +--- +apiVersion: tekton.dev/v1alpha1 +kind: Pipeline +metadata: + name: pipeline-release-nightly-triggers +spec: + params: + - name: package + description: package to release + default: github.com/tektoncd/pipeline + - name: imageRegistry + default: gcr.io/tekton-nightly + - name: versionTag + description: The X.Y.Z version that the artifacts should be tagged with + resources: + - name: source-repo + type: git + - name: bucket + type: storage + - name: builtKoImage + type: image + - name: builtBaseImage + type: image + - name: builtEntrypointImage + type: image + - name: builtKubeconfigWriterImage + type: image + - name: builtCredsInitImage + type: image + - name: builtGitInitImage + type: image + - name: builtNopImage + type: image + - name: builtBashImage + type: image + - name: builtGsutilImage + type: image + - name: builtControllerImage + type: image + - name: builtWebhookImage + type: image + - name: builtDigestExporterImage + type: image + - name: builtPullRequestInitImage + type: image + - name: builtGcsFetcherImage + type: image + tasks: + - name: lint + taskRef: + name: golangci-lint + params: + - name: package + value: $(params.package) + - name: flags + value: -v + resources: + inputs: + - name: source + resource: source-repo + - name: unit-tests + runAfter: [lint] + taskRef: + name: golang-test + params: + - name: package + value: $(params.package) + resources: + inputs: + - name: source + resource: source-repo + - name: build + runAfter: [lint] + taskRef: + name: golang-build + params: + - name: package + value: $(params.package) + resources: + 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] + taskRef: + name: publish-tekton-pipelines + params: + - name: pathToProject + value: $(params.package) + - name: versionTag + value: $(params.versionTag) + - name: imageRegistry + value: $(params.imageRegistry) + resources: + inputs: + - name: source + resource: source-repo + - name: bucket + resource: bucket + outputs: + - name: bucket + resource: bucket + - name: builtBaseImage + resource: builtBaseImage + - name: builtEntrypointImage + resource: builtEntrypointImage + - name: builtKubeconfigWriterImage + resource: builtKubeconfigWriterImage + - name: builtCredsInitImage + resource: builtCredsInitImage + - name: builtGitInitImage + resource: builtGitInitImage + - name: builtNopImage + resource: builtNopImage + - name: builtBashImage + resource: builtBashImage + - name: builtGsutilImage + resource: builtGsutilImage + - name: builtControllerImage + resource: builtControllerImage + - name: builtWebhookImage + resource: builtWebhookImage + - name: builtDigestExporterImage + resource: builtDigestExporterImage + - name: builtPullRequestInitImage + resource: builtPullRequestInitImage + - name: builtGcsFetcherImage + resource: builtGcsFetcherImage