mirror of
https://github.com/bvanroll/stage-infra.git
synced 2025-08-29 03:52:49 +00:00
infra pipeline specialised
This commit is contained in:
0
Tekton/pipeline/back-end-pipeline.yaml
Normal file
0
Tekton/pipeline/back-end-pipeline.yaml
Normal file
87
Tekton/pipeline/infra-pipeline.yaml
Normal file
87
Tekton/pipeline/infra-pipeline.yaml
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: infra-pipeline
|
||||
namespace: tekton-pipeline-1
|
||||
spec:
|
||||
params:
|
||||
- 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 check out
|
||||
- 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)
|
||||
workspaces:
|
||||
- name: workspace
|
||||
tasks:
|
||||
|
||||
- name: clone-git-repo
|
||||
taskRef:
|
||||
name: git-clone
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: workspace
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.git-url)
|
||||
- name: revision
|
||||
value: $(params.revision)
|
||||
|
||||
- name: set-begun-status
|
||||
taskRef:
|
||||
name: github-set-status
|
||||
runAfter:
|
||||
- clone-git-repo
|
||||
params:
|
||||
- name: REPO_FULL_NAME
|
||||
value: $(params.git-repo-full-name)
|
||||
- name: SHA
|
||||
value: $(params.revision)
|
||||
- name: TARGET_URL
|
||||
value: tekton.llocal.host/dashboard
|
||||
- name: STATE
|
||||
value: pending
|
||||
- name: DESCRIPTION
|
||||
value: "Deploy to cluster has started (will not complete if this is not master branch)"
|
||||
|
||||
- name: deploy-infrastructure
|
||||
taskRef:
|
||||
name: deploy-app
|
||||
runAfter:
|
||||
- clone-git-repo
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: workspace
|
||||
params:
|
||||
- name: yaml-location
|
||||
value: infra/
|
||||
conditions:
|
||||
- conditionRef: "is-not-equal"
|
||||
params:
|
||||
- name: "left"
|
||||
value: "master"
|
||||
- name: "right"
|
||||
value: "$(params.branch)"
|
||||
|
||||
- name: set-finished-state
|
||||
taskRef:
|
||||
name: github-set-status
|
||||
runAfter:
|
||||
- deploy-infrastructure
|
||||
- set-begun-status
|
||||
params:
|
||||
- name: REPO_FULL_NAME
|
||||
value: $(params.git-repo-full-name)
|
||||
- name: SHA
|
||||
value: $(params.revision)
|
||||
- name: TARGET_URL
|
||||
value: tekton.llocal.host/dashboard
|
||||
- name: STATE
|
||||
value: success
|
||||
- name: DESCRIPTION
|
||||
value: "deployment applied"
|
0
Tekton/pipeline/mirror-service-pipeline.yaml
Normal file
0
Tekton/pipeline/mirror-service-pipeline.yaml
Normal file
@@ -12,7 +12,9 @@ spec:
|
||||
- name: command
|
||||
default: apply
|
||||
- name: deploy-name
|
||||
default: ""
|
||||
- name: deploy-version
|
||||
default: ""
|
||||
workspaces:
|
||||
- name: source
|
||||
mountpath: /source
|
||||
|
@@ -27,8 +27,8 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: service-acc
|
||||
pipelineRef:
|
||||
name: stage-application-pipeline
|
||||
Timeout: "2h30m00s"
|
||||
name: infra-pipeline
|
||||
Timeout: "30m00s"
|
||||
workspaces:
|
||||
- name: workspace
|
||||
persistentVolumeClaim:
|
||||
@@ -42,7 +42,5 @@ spec:
|
||||
value: $(params.gitreponame)
|
||||
- name: revision
|
||||
value: $(params.gitrevision)
|
||||
- name: sha
|
||||
value: $(params.sha)
|
||||
- name: git-repo-full-name
|
||||
value: $(params.gitrepofullname)
|
Reference in New Issue
Block a user