multiple listeners. TODO create different pipelines for each listener

This commit is contained in:
2020-03-18 17:36:57 +01:00
parent 6b62b0f3ef
commit 1860b861c0
17 changed files with 818 additions and 43 deletions

View File

@@ -0,0 +1,38 @@
# ---
# apiVersion: tekton.dev/v1beta1
# kind: Pipeline
# metadata:
# name: stage-application-pipeline
# namespace: tekton-pipeline-1
# spec:
# params:
# - name: git-repo-full-name
# description: full name of the github repo (used for status updates)
# - name: sha
# description: used for github status updates
# - name: git-repo-name
# 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 branch to checkout
# workspaces:
# - name: workspace
# tasks:
# - name: clone
# taskRef:
# name: git-clone
# workspaces:
# - name: output
# workspace: workspace
# params:
# - name: url
# value: $(params.git-url)
# - name: revision
# value: $(params.revision)
# - name: build-gradle
# taskRef:
# name: build-image

View File

@@ -14,9 +14,14 @@ spec:
description: revision to checkout
- name: branch
description: name of the master branch of the repository
- name: git-repo-full-name
description: full name of the github repo (used for status updates)
- name: sha
description: used for github status updates
workspaces:
- name: workspace
tasks:
- name: clone
taskRef:
name: git-clone
@@ -28,6 +33,24 @@ spec:
value: $(params.git-url)
- name: revision
value: $(params.revision)
# - name: set-status-building
# taskRef:
# name: github-set-status
# runAfter:
# - clone
# params:
# - name: REPO_FULL_NAME
# value: $(params.git-repo-full-name)
# - name: SHA
# value: $(params.sha)
# - name: STATE
# value: pending
# - name: TARGET_URL
# value: http://ingress.llocal.host/$(params.git-repo-name)
# - name: DESCRIPTION
# value: "Build and push has started"
- name: build-and-push
taskRef:
name: build-and-push
@@ -51,9 +74,29 @@ spec:
value: "$(params.git-repo-name)"
- name: version
value: "$(params.branch)"
# - name: set-status-building
# taskRef:
# name: github-set-status
# runAfter:
# - build-and-push
# params:
# - name: REPO_FULL_NAME
# value: $(params.git-repo-full-name)
# - name: SHA
# value: $(params.sha)
# - name: STATE
# value: pending
# - name: TARGET_URL
# value: http://ingress.llocal.host/$(params.git-repo-name)
# - name: DESCRIPTION
# value: "Build and push has completed, starting deploy-app"
- name: deploy-app
taskRef:
name: deploy-app
runAfter:
- build-and-push
workspaces:
- name: source
workspace: workspace
@@ -62,5 +105,21 @@ spec:
value: "$(params.git-repo-name)"
- name: deploy-version
value: "$(params.branch)"
- name: set-status-building
taskRef:
name: github-set-status
runAfter:
- build-and-push
- deploy-app
params:
- name: REPO_FULL_NAME
value: $(params.git-repo-full-name)
- name: SHA
value: $(params.sha)
- name: STATE
value: success
- name: TARGET_URL
value: http://tekton.llocal.host/$(params.git-repo-name)
- name: DESCRIPTION
value: "Deploy finished"