From a0ffd43ee022c2e1dd9984c78a08af307e8a8aa4 Mon Sep 17 00:00:00 2001 From: beppe Date: Tue, 17 Mar 2020 18:54:00 +0100 Subject: [PATCH] eyyy --- Tekton/pipeline/pipeline.yaml | 4 +++- Tekton/tasks/build-and-push.yaml | 3 ++- Tekton/tasks/deploy-app.yaml | 1 - Tekton/triggers/trigger-binding-github.yaml | 4 +++- Tekton/triggers/trigger-template.yaml | 8 ++++++-- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Tekton/pipeline/pipeline.yaml b/Tekton/pipeline/pipeline.yaml index 4285271..601d163 100644 --- a/Tekton/pipeline/pipeline.yaml +++ b/Tekton/pipeline/pipeline.yaml @@ -10,6 +10,8 @@ spec: description: name of the git repo (used to determine the name of the image) - name: git-url description: url of the git repository to clone + - name: revision + description: revision to checkout - name: branch description: name of the master branch of the repository workspaces: @@ -25,7 +27,7 @@ spec: - name: url value: $(params.git-url) - name: revision - value: $(params.branch) + value: $(params.revision) - name: build-and-push taskRef: name: build-and-push diff --git a/Tekton/tasks/build-and-push.yaml b/Tekton/tasks/build-and-push.yaml index 5d701a5..16285e4 100644 --- a/Tekton/tasks/build-and-push.yaml +++ b/Tekton/tasks/build-and-push.yaml @@ -30,4 +30,5 @@ spec: args: - "--dockerfile=/source/$(params.context)/dockerfile" - "--destination=beppev/$(params.image-name):$(params.version)" - - "--context=/source/$(params.context)/" \ No newline at end of file + - "--context=/source/$(params.context)/" + - "--skip-tls-verify" #for speed reasons \ No newline at end of file diff --git a/Tekton/tasks/deploy-app.yaml b/Tekton/tasks/deploy-app.yaml index dcd65df..e572c35 100644 --- a/Tekton/tasks/deploy-app.yaml +++ b/Tekton/tasks/deploy-app.yaml @@ -20,7 +20,6 @@ spec: - name: update-yaml image: alpine script: | - #!/usr/bin/env bash sed -i -e s;DEPLOY_NAME;$(params.deploy-name);g $(params.yaml-location) sed -i -e s;DEPLOY_VERSION;$(params.deploy-version);g $(params.yaml-location) - name: deploy-new-app diff --git a/Tekton/triggers/trigger-binding-github.yaml b/Tekton/triggers/trigger-binding-github.yaml index 5ffc9f8..66cd057 100644 --- a/Tekton/triggers/trigger-binding-github.yaml +++ b/Tekton/triggers/trigger-binding-github.yaml @@ -11,4 +11,6 @@ spec: - name: gitrepositoryurl value: "$(body.repository.clone_url)" - name: gitreponame - value: $(body.repository.name) \ No newline at end of file + value: $(body.repository.name) + - name: branch + value: $(body.repository.default_branch) \ No newline at end of file diff --git a/Tekton/triggers/trigger-template.yaml b/Tekton/triggers/trigger-template.yaml index 7cb57b9..28bb4a3 100644 --- a/Tekton/triggers/trigger-template.yaml +++ b/Tekton/triggers/trigger-template.yaml @@ -13,6 +13,8 @@ spec: description: The git repository url - name: gitreponame description: the name of the git repository + - name: branch + description: the name of the branch pushed to resourcetemplates: - apiVersion: tekton.dev/v1alpha1 kind: PipelineRun @@ -31,6 +33,8 @@ spec: - name: git-url value: $(params.gitrepositoryurl) - name: branch - value: $(params.gitrevision) + value: $(params.branch) - name: git-repo-name - value: $(params.gitreponame) \ No newline at end of file + value: $(params.gitreponame) + - name: revision + value: $(params.gitrevision) \ No newline at end of file