homepage/.lighthouse/triggers.yaml
Tom Alexander 3ebe169ee9
All checks were successful
build-homepage-staging Build build-homepage-staging has succeeded
Add a CI job to build the staging image of the homepage.
The staging image will be whatever commit was most recently pushed, deployed instantly to a protected subdomain.
2023-12-23 17:46:10 -05:00

71 lines
2.3 KiB
YAML

apiVersion: config.lighthouse.jenkins-x.io/v1alpha1
kind: TriggerConfig
spec:
postsubmits:
- name: semver
agent: tekton-pipeline
branches:
- ^main$
- ^master$
context: homepage
max_concurrency: 1
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/homepage.git"
pipeline_run_spec:
serviceAccountName: build-bot
pipelineRef:
name: semver
namespace: lighthouse
workspaces:
- name: git-source
volumeClaimTemplate:
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
subPath: homepage-source
params: []
- name: build-homepage-staging
source: "pipeline-build-homepage-staging.yaml"
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/homepage.git"
skip_branches:
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
- name: build-homepage
agent: tekton-pipeline
branches:
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
context: build-docker
max_concurrency: 1
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/homepage.git"
pipeline_run_spec:
serviceAccountName: build-bot
pipelineRef:
name: build-docker-pipeline
workspaces:
- name: git-source
volumeClaimTemplate:
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
subPath: git-source
- name: docker-credentials
secret:
secretName: harbor-plain
params:
- name: image-name
value: "harbor.fizz.buzz/private/homepage"
- name: path-to-image-context
value: .
- name: path-to-dockerfile
value: docker/server/Dockerfile