File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed
Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # The easiest way to run this script is through Werft so you don't have to worry
4+ # about installing the appropraite service account etc. locally.
5+ #
6+ # werft job run github -j .werft/platform-trigger-artificial-job.yaml -s .werft/platform-trigger-artificial-job.sh
7+ #
8+
9+ sleep 1
10+
11+ set -Eeuo pipefail
12+
13+ werft log phase " Trigger new job with-preview" " Trigger new job with preview environment"
14+ sudo chown -R gitpod:gitpod /workspace
15+ git config --global user.name roboquat
16+ git config --global user.email roboquat@gitpod.io
17+
18+ git checkout -b " platform-artificial-job-$( echo $RANDOM | md5sum | head -c 20; echo ; ) "
19+
20+ werft run github -a with-preview=true
Original file line number Diff line number Diff line change 1+ # This job is responsible for periodically start a new werft job that spins up
2+ # a preview environment. It is needed to create artificial traffic for the
3+ # Preview Environment starts SLO. It will help us to be more proactive
4+ # to identify failures in the pipeline.
5+ #
6+ # werft job run github -j .werft/platform-trigger-artificial-job.yaml
7+ #
8+ pod :
9+ serviceAccount : werft
10+ affinity :
11+ nodeAffinity :
12+ requiredDuringSchedulingIgnoredDuringExecution :
13+ nodeSelectorTerms :
14+ - matchExpressions :
15+ - key : dev/workload
16+ operator : In
17+ values :
18+ - " builds"
19+ volumes :
20+ - name : github-token-gitpod-bot
21+ secret :
22+ defaultMode : 420
23+ secretName : github-token-gitpod-bot
24+ containers :
25+ - name : build
26+ image : eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-dl.1
27+ workingDir : /workspace
28+ imagePullPolicy : IfNotPresent
29+ volumeMounts :
30+ - mountPath : /mnt/secrets/github-token-gitpod-bot
31+ name : github-token-gitpod-bot
32+ env :
33+ - name : ROBOQUAT_TOKEN
34+ valueFrom :
35+ secretKeyRef :
36+ name : github-roboquat-automatic-changelog
37+ key : token
38+ # Used by the Werft CLI through werft-credential-helper.sh
39+ - name : WERFT_GITHUB_TOKEN_PATH
40+ value : " /mnt/secrets/github-token-gitpod-bot/token"
41+ - name : WERFT_CREDENTIAL_HELPER
42+ value : " /workspace/dev/preview/werft-credential-helper.sh"
43+ command :
44+ - bash
45+ - .werft/platform-trigger-artificial-job.sh
46+
47+ plugins :
48+ cron : " 15 */4 * * *"
You can’t perform that action at this time.
0 commit comments