Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(apps/prod/tekton/config): rename tekton resources #673

Merged
merged 1 commit into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 10 additions & 56 deletions apps/prod/tekton/configs/pipelines/pipeline1.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: demo-pipeline1
name: demo
spec:
workspaces:
- name: git-source
Expand All @@ -10,30 +10,9 @@ spec:
- name: git-revision
default: main
tasks:
# TODO: using commit-status-tracker to replace explicit tasks.
# https://github.com/tektoncd/experimental/tree/main/commit-status-tracker
- name: set-github-status-start
taskRef:
name: github-set-status
timeout: 1m
params:
- name: git-url
value: $(params.git-url)
- name: sha
value: $(params.git-revision)
- name: description
value: "Build has started"
- name: state
value: pending
- name: context
value: demo-pipeline1
- name: target-url
value: https://tekton/dashboard/taskrun/log
- name: fetch-from-git
taskRef:
name: git-clone
runAfter:
- set-github-status-start
params:
- name: url
value: $(params.git-url)
Expand All @@ -42,42 +21,17 @@ spec:
workspaces:
- name: output
workspace: git-source
- name: go-build
taskRef:
name: golang-build
runAfter:
- fetch-from-git
workspaces:
- name: source
workspace: git-source
params:
- name: packages
value: ./...
- name: go-test
taskRef:
name: golang-test
- name: hello
taskSpec:
steps:
- name: echo
image: debian:latest
script: |
pwd
df -h
echo hello
runAfter:
- fetch-from-git
workspaces:
- name: source
workspace: git-source
params:
- name: packages
value: ./...
finally:
- name: set-github-status-end
taskRef:
name: github-set-status
params:
- name: git-url
value: $(params.git-url)
- name: sha
value: $(params.git-revision)
- name: description
value: "Build has finished"
- name: state
value: success
- name: context
value: demo-pipeline1
- name: target-url
value: https://tekton/dashboard/taskrun/log
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
name: github-pr-public
name: github-pr-demo
spec:
params:
- name: git-url
Expand All @@ -23,7 +23,7 @@ spec:
"tekton.dev/git-revision": $(tt.params.git-revision)
spec:
pipelineRef:
name: demo-pipeline1
name: demo
params:
- name: git-url
value: $(tt.params.git-url)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- public.yaml
- demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
bindings:
- ref: github-pr
template:
ref: github-pr-public
ref: github-pr-demo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- public.yaml
- demo.yaml