Skip to content

Commit

Permalink
Add Results Nightly Release
Browse files Browse the repository at this point in the history
  • Loading branch information
khrm committed May 20, 2024
1 parent c231a9a commit 1a54ef7
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions tekton/cronjobs/dogfooding/releases/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ resources:
- pr-status-updater-nightly
- concurrency-nightly
- workflows-nightly
- results-nightly
2 changes: 2 additions & 0 deletions tekton/cronjobs/dogfooding/releases/results-nightly/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cron Job to trigger the Tekton Results nightly build.
Results are published to https://storage.cloud.google.com/tekton-releases-nightly/results/latest/release.yaml
21 changes: 21 additions & 0 deletions tekton/cronjobs/dogfooding/releases/results-nightly/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: nightly-cron-trigger
spec:
schedule: "0 5 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: trigger
env:
- name: PROJECT_NAME
value: results
initContainers:
- name: git
env:
- name: GIT_REPO
value: github.com/tektoncd/results
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bases:
- ../../../bases/release
patchesStrategicMerge:
- cronjob.yaml
nameSuffix: "-results-nightly-release"
1 change: 1 addition & 0 deletions tekton/resources/nightly-release/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ resources:
- overlays/pr-status-updater
- overlays/concurrency
- overlays/workflows
- overlays/results
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namePrefix: results-
bases:
- ../../base
patchesJson6902:
- target:
group: triggers.tekton.dev
version: v1alpha1
kind: TriggerTemplate
name: template
path: template.yaml
- target:
group: triggers.tekton.dev
version: v1alpha1
kind: Trigger
name: nightly
path: trigger.yaml
resources:
- github.com/tektoncd/results/release/?ref=main
37 changes: 37 additions & 0 deletions tekton/resources/nightly-release/overlays/results/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
- op: add
path: /spec/resourcetemplates
value:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: results-release-nightly-
spec:
pipelineRef:
name: results-release
params:
- name: package
value: $(tt.params.gitrepository)
- name: gitRevision
value: $(tt.params.gitrevision)
- name: imageRegistry
value: $(tt.params.imageRegistry)
- name: imageRegistryPath
value: $(tt.params.imageRegistryPath)
- name: versionTag
value: $(tt.params.versionTag)
- name: serviceAccountPath
value: release.json
- name: releaseBucket
value: gs://tekton-releases-nightly/results
workspaces:
- name: ws
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: release-secret
secret:
secretName: release-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- op: add
path: /spec/interceptors
value:
- cel:
filter: >-
'trigger-template' in body &&
body.params.release.projectName == 'results'

0 comments on commit 1a54ef7

Please sign in to comment.