From f3c0b25531a0a4ca994e1f641eda3e62ed548cc8 Mon Sep 17 00:00:00 2001 From: vinamra28 Date: Tue, 17 Nov 2020 18:07:32 +0530 Subject: [PATCH] Use goreleaser task from tektoncd/catalog Since `goreleaser` task is now a part of `tektoncd/catalog` so we can use that task from there and remove that task manifest file from here and reference it in script Signed-off-by: vinamra28 --- tekton/goreleaser.yml | 39 --------------------------------------- tekton/release.sh | 2 +- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 tekton/goreleaser.yml diff --git a/tekton/goreleaser.yml b/tekton/goreleaser.yml deleted file mode 100644 index f5bab8d2a..000000000 --- a/tekton/goreleaser.yml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: goreleaser -spec: - workspaces: - - name: source - mountPath: /workspace/src/$(params.package) - params: - - name: package - description: base package to build in - - name: github-token-secret - description: name of the secret holding the github-token - default: bot-token-github - - name: github-token-secret-key - description: name of the secret key holding the github-token - default: bot-token - - name: flags - description: flags to use for the test command - default: --timeout=30m - steps: - - name: pull - image: goreleaser/goreleaser:v0.132 - workingdir: $(workspaces.source.path) - script: | - git status; git fetch -p --all - - name: release - image: goreleaser/goreleaser - workingdir: $(workspaces.source.path) - script: | - goreleaser release $(params.flags) - env: - - name: GOPATH - value: /workspace - - name: GITHUB_TOKEN - valueFrom: - secretKeyRef: - name: $(params.github-token-secret) - key: $(params.github-token-secret-key) diff --git a/tekton/release.sh b/tekton/release.sh index 00e92e210..54136d8e3 100755 --- a/tekton/release.sh +++ b/tekton/release.sh @@ -122,8 +122,8 @@ for task in ${CATALOG_TASKS};do done kubectl -n ${TARGET_NAMESPACE} apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/git-clone/0.1/git-clone.yaml +kubectl -n ${TARGET_NAMESPACE} apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/goreleaser/0.1/goreleaser.yaml kubectl -n ${TARGET_NAMESPACE} apply -f ./tekton/get-version.yaml -kubectl -n ${TARGET_NAMESPACE} apply -f ./tekton/goreleaser.yml kubectl -n ${TARGET_NAMESPACE} apply -f ./tekton/publish.yaml if ! kubectl -n ${TARGET_NAMESPACE} get secret ${SECRET_NAME} -o name >/dev/null 2>/dev/null;then