Skip to content

Commit

Permalink
Re-generate pipeline from latest templates
Browse files Browse the repository at this point in the history
  • Loading branch information
bgandon committed May 11, 2024
1 parent c740395 commit b06e4ed
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
41 changes: 25 additions & 16 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ meta:
secret_key: (( param "Please set your AWS Secret Key ID" ))

github:
uri: (( concat "[email protected]:" meta.github.owner "/" meta.github.repo ))
owner: (( param "Please specify the name of the user / organization that owns the Github repository" ))
repo: (( param "Please specify the name of the Github repository" ))
branch: master
private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" ))
access_token: (( param "Please generate a Personal Access Token and specify it here" ))
uri: (( concat "[email protected]:" meta.github.owner "/" meta.github.repo ))
owner: (( param "Please specify the name of the user / organization that owns the Github repository" ))
repo: (( param "Please specify the name of the Github repository" ))
branch: master
pr_base_branch: (( grab meta.github.branch ))
release_branch: (( grab meta.github.branch ))
private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" ))
access_token: (( param "Please generate a Personal Access Token and specify it here" ))

dockerhub:
username: (( param "Please specify the username for your Dockerhub account" ))
Expand All @@ -58,8 +60,8 @@ meta:
fail_moji: ":airplane_arriving:"
upset_moji: ":sadpanda:"
pipeline_url: (( concat meta.url "/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}" ))
fail_link: (( concat "<" meta.slack.pipeline_url "/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}| Concourse Failure! " meta.slack.upset_moji ">" ))
fail_text: '(( concat meta.slack.fail_link " " meta.pipeline ": `${BUILD_JOB_NAME}` job failed" ))'
fail_link: (( concat "<" meta.slack.pipeline_url "/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}| Let's go fix it!>" ))
fail_text: '(( concat meta.pipeline ": `${BUILD_JOB_NAME}` job has failed " meta.slack.upset_moji " " meta.slack.fail_link " :hammer_and_wrench:" ))'

groups:
- name: (( grab meta.name ))
Expand Down Expand Up @@ -100,6 +102,7 @@ jobs:

on_failure:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand Down Expand Up @@ -168,6 +171,7 @@ jobs:

on_success:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand Down Expand Up @@ -211,6 +215,7 @@ jobs:
params: { file: version/number }
on_failure:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand All @@ -225,6 +230,7 @@ jobs:
- { put: version, params: { file: version/number } }
on_failure:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand All @@ -239,6 +245,7 @@ jobs:
- { put: version, params: { file: version/number } }
on_failure:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand Down Expand Up @@ -270,13 +277,14 @@ jobs:
path: ./git/ci/scripts/release
args: []
params:
REPO_ROOT: git
RELEASE_ROOT: gh
RELEASE_NAME: (( grab meta.release ))
REPO_OUT: pushme/git
VERSION_FROM: version/number
GIT_EMAIL: (( grab meta.git.email ))
GIT_NAME: (( grab meta.git.name ))
REPO_ROOT: git
RELEASE_ROOT: gh
RELEASE_NAME: (( grab meta.release ))
REPO_OUT: pushme/git
VERSION_FROM: version/number
GIT_EMAIL: (( grab meta.git.email ))
GIT_NAME: (( grab meta.git.name ))
RELEASE_BRANCH: (( grab meta.github.release_branch ))

- load_var: version
file: version/number
Expand Down Expand Up @@ -314,6 +322,7 @@ jobs:
body: gh/notes.md
on_failure:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand Down Expand Up @@ -355,7 +364,7 @@ resources:
source:
access_token: (( grab meta.github.access_token ))
repository: (( concat meta.github.owner "/" meta.github.repo ))
base_branch: (( grab meta.github.branch ))
base_branch: (( grab meta.github.pr_base_branch ))

- name: docker-image-build-task
type: registry-image
Expand Down
2 changes: 1 addition & 1 deletion ci/repipe
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ echo >&2 "Working in $(pwd)"
need_command spruce

# Allow for target-specific settings
settings_file="$(ls -1 settings.yml ${CONCOURSE_TARGET:+"settings-${CONCOURSE_TARGET}.yml"} 2>/dev/null | tail -n1)"
settings_file="$(ls -1 settings.yml ${CONCOURSE_TARGET:+"settings-${CONCOURSE_TARGET}.yml"} 2>/dev/null | head -n1)"
if [[ -z "$settings_file" ]]
then
echo >&2 "Missing local settings in ci/settings.yml${CONCOURSE_TARGET:+" or ci/settings-${CONCOURSE_TARGET}.yml"}!"
Expand Down
7 changes: 6 additions & 1 deletion ci/scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@

set -eu

: ${REPO_ROOT:?required}
: ${RELEASE_ROOT:?required}
: ${RELEASE_NAME:?required}
: ${GIT_EMAIL:?required}
: ${GIT_NAME:?required}
RELEASE_BRANCH=${RELEASE_BRANCH:-"master"}
: ${REPO_OUT:?required}

if [[ ! -f ${REPO_ROOT}/ci/release_notes.md ]]; then
echo >&2 "ci/release_notes.md not found. Did you forget to write them?"
Expand Down Expand Up @@ -46,7 +51,7 @@ if [[ -z $(git config --global user.name) ]]; then
fi

(cd ${REPO_ROOT}
git merge --no-edit master
git merge --no-edit "${RELEASE_BRANCH}"
git add -A
git status
git commit -m "release v${VERSION} [skip ci]")
Expand Down
1 change: 1 addition & 0 deletions ci/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ jobs:
on_failure:
put: notify
no_get: true
params:
channel: (( grab meta.slack.channel ))
username: (( grab meta.slack.username ))
Expand Down

0 comments on commit b06e4ed

Please sign in to comment.