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/configs): update pipeline for artifacts repo #676

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
2 changes: 1 addition & 1 deletion apps/prod/tekton/configs/pipelines/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ resources:
- kaniko-build.yaml
- codescan-security.yaml
- ko-build-test-infra.yaml
- pipeline1.yaml
- pull-pingcap-qe-artifacts-build-image.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: demo
name: pull-pingcap-qe-artifacts-build-image
spec:
workspaces:
- name: git-source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ spec:
value: ["pull_request"]
- name: "validate PR state and add field"
ref:
name: "cel"
name: cel
params:
- name: "filter"
value: "body.action in ['opened', 'synchronize', 'reopened']"
- name: "overlays"
value:
- key: truncated_sha
expression: body.pull_request.head.sha.truncate(7)
- name: filter
value: body.action in ['opened', 'synchronize', 'reopened']
triggerSelector:
namespaceSelector:
matchNames:
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:
- demo.yaml
- pull-pingcap-qe-artifacts.yaml
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-demo
name: pull-pingcap-qe-artifacts
spec:
params:
- name: git-url
Expand All @@ -13,7 +13,7 @@ spec:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: demo-pipeline1-run-
generateName: pull-pingcap-qe-artifacts-build-image-run-
annotations:
"tekton.dev/git-status": "true"
"tekton.dev/status-context": "demo-pipeline1"
Expand All @@ -23,7 +23,7 @@ spec:
"tekton.dev/git-revision": $(tt.params.git-revision)
spec:
pipelineRef:
name: demo
name: pull-pingcap-qe-artifacts-build-image
params:
- name: git-url
value: $(tt.params.git-url)
Expand Down
11 changes: 0 additions & 11 deletions apps/prod/tekton/configs/triggers/triggers/demo.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- demo.yaml
- pull-pingcap-qe-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: triggers.tekton.dev/v1beta1
kind: Trigger
metadata:
name: pull-pingcap-qe-artifacts
labels:
type: github-pr
github-owner: PingCAP-QE
github-repo: artifacts
spec:
interceptors:
- name: filter on repo owner and name
ref:
name: cel
params:
- name: filter
# value: body.repository.name == 'artifacts'
value: >-
body.organization.login == 'PingCAP-QE' && body.repository.name ==
'artifacts'
# - name: add change files to extensions
# ref:
# name: github
# params:
# - name: "addChangedFiles" # TODO: upgrade tekton
# value:
# enabled: true
# - name: execute only when Dockerfile changed
# ref:
# name: cel
# params:
# - name: filter
# value: extensions.changed_files.matches('Dockerfile')
bindings:
- ref: github-pr
template:
ref: pull-pingcap-qe-artifacts