This commit is contained in:
2020-03-17 18:54:00 +01:00
parent 9cc56f398d
commit a0ffd43ee0
5 changed files with 14 additions and 6 deletions

View File

@@ -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

View File

@@ -30,4 +30,5 @@ spec:
args:
- "--dockerfile=/source/$(params.context)/dockerfile"
- "--destination=beppev/$(params.image-name):$(params.version)"
- "--context=/source/$(params.context)/"
- "--context=/source/$(params.context)/"
- "--skip-tls-verify" #for speed reasons

View File

@@ -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

View File

@@ -11,4 +11,6 @@ spec:
- name: gitrepositoryurl
value: "$(body.repository.clone_url)"
- name: gitreponame
value: $(body.repository.name)
value: $(body.repository.name)
- name: branch
value: $(body.repository.default_branch)

View File

@@ -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)
value: $(params.gitreponame)
- name: revision
value: $(params.gitrevision)