Skip to content

Commit c69caf6

Browse files
committed
Update from pipeline-templates
1 parent c47559a commit c69caf6

File tree

2 files changed

+64
-24
lines changed

2 files changed

+64
-24
lines changed

ci/pipeline.yml

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ meta:
1818
url: (( param "Please specify the full url of the target Concourse CI" ))
1919
pipeline: (( concat meta.name "-boshrelease" ))
2020

21+
image: docker:///starkandwayne/concourse
22+
2123
aws:
2224
bucket: (( concat meta.pipeline "-pipeline" ))
2325
access_key: (( param "Please set your AWS Access Key ID for your pipeline S3 Bucket" ))
@@ -39,13 +41,13 @@ meta:
3941

4042
slack:
4143
webhook: (( param "Please specify your Slack Incoming Webhook Integration URL" ))
44+
success_moji: ":airplane_departure:"
4245
fail_moji: ":airplane_arriving:"
4346
upset_moji: ":sad_panda:"
44-
build_failure: '(( concat "$BUILD_PIPELINE_NAME: " meta.slack.fail_moji " <" meta.url "/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME| Failed to ship a new bosh release. " meta.slack.upset_moji ">" ))'
45-
test_failure: '(( concat "$BUILD_PIPELINE_NAME: " meta.slack.fail_moji " <" meta.url "/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME| Tests failed! " meta.slack.upset_moji ">" ))'
4647
channel: (( param "Please specify the channel (#name) or user (@user) to send messages to" ))
4748
username: concourse
4849
icon: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
50+
fail_url: '(( concat "<" meta.url "/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME| Concourse Failure! " meta.slack.upset_moji ">" ))'
4951

5052
groups:
5153
- name: (( grab meta.pipeline ))
@@ -61,12 +63,13 @@ jobs:
6163
public: true
6264
serial: true
6365
plan:
66+
- do:
6467
- aggregate:
6568
- { get: git, trigger: true }
6669
- task: testflight
6770
config:
6871
platform: linux
69-
image: docker:///starkandwayne/concourse
72+
rootfs_uri: (( grab meta.image ))
7073
inputs:
7174
- { name: git }
7275
run:
@@ -78,46 +81,74 @@ jobs:
7881
BOSH_LITE_USERNAME: (( grab meta.bosh-lite.username ))
7982
BOSH_LITE_PASSWORD: (( grab meta.bosh-lite.password ))
8083
BOSH_LITE_DEPLOYMENT: (( grab meta.bosh-lite.deployment ))
81-
on_failure:
82-
put: notify
83-
params:
84-
channel: (( grab meta.slack.channel ))
85-
username: (( grab meta.slack.username ))
86-
icon_url: (( grab meta.slack.icon ))
87-
text: (( grab meta.slack.test_failure ))
84+
TEST_ERRAND: (( grab meta.test-errand || ~ ))
85+
on_failure:
86+
put: notify
87+
params:
88+
channel: (( grab meta.slack.channel ))
89+
username: (( grab meta.slack.username ))
90+
icon_url: (( grab meta.slack.icon ))
91+
text: '(( concat meta.slack.fail_url " " meta.pipeline ": test job failed" ))'
8892

8993
- name: rc
9094
public: true
9195
plan:
96+
- do:
9297
- aggregate:
9398
- { get: git, trigger: true, passed: [testflight] }
9499
- { get: version, trigger: true, params: {pre: rc} }
95100
- put: version
96101
params: {file: version/number}
102+
on_failure:
103+
put: notify
104+
params:
105+
channel: (( grab meta.slack.channel ))
106+
username: (( grab meta.slack.username ))
107+
icon_url: (( grab meta.slack.icon ))
108+
text: '(( concat meta.slack.fail_url " " meta.pipeline ": rc job failed" ))'
97109

98110
- name: minor
99111
public: true
100112
plan:
113+
- do:
101114
- { get: version, trigger: false, params: {bump: minor} }
102115
- { put: version, params: {file: version/number} }
116+
on_failure:
117+
put: notify
118+
params:
119+
channel: (( grab meta.slack.channel ))
120+
username: (( grab meta.slack.username ))
121+
icon_url: (( grab meta.slack.icon ))
122+
text: '(( concat meta.slack.fail_url " " meta.pipeline ": minor job failed" ))'
103123

104124
- name: major
105125
public: true
106126
plan:
127+
- do:
107128
- { get: version, trigger: false, params: {bump: major} }
108129
- { put: version, params: {file: version/number} }
130+
on_failure:
131+
put: notify
132+
params:
133+
channel: (( grab meta.slack.channel ))
134+
username: (( grab meta.slack.username ))
135+
icon_url: (( grab meta.slack.icon ))
136+
text: '(( concat meta.slack.fail_url " " meta.pipeline ": major job failed" ))'
109137

110138
- name: shipit
111139
public: true
112140
serial: true
113141
plan:
114-
- aggregate:
142+
- do:
143+
- name: inputs
144+
aggregate:
115145
- { get: version, passed: [rc], params: {bump: final} }
116146
- { get: git, passed: [rc] }
117-
- task: release
147+
- name: release
148+
task: release
118149
config:
119-
image: docker:///starkandwayne/concourse
120150
platform: linux
151+
rootfs_uri: (( grab meta.image ))
121152
inputs:
122153
- name: version
123154
- name: git
@@ -142,30 +173,34 @@ jobs:
142173

143174
AWS_ACCESS_KEY: (( grab meta.aws.access_key ))
144175
AWS_SECRET_KEY: (( grab meta.aws.secret_key ))
145-
on_failure:
146-
put: notify
147-
params:
148-
channel: (( grab meta.slack.channel ))
149-
username: (( grab meta.slack.username ))
150-
icon_url: (( grab meta.slack.icon ))
151-
text: (( grab meta.slack.build_failure ))
152176

153-
- put: git
177+
- name: upload-git
178+
put: git
154179
params:
155180
rebase: true
156181
repository: pushme/git
157-
- put: s3
182+
- name: tarball
183+
put: s3
158184
params:
159185
file: (( concat "gh/artifacts/" meta.name "-*.tgz" ))
160-
- put: github
186+
- name: github-release
187+
put: github
161188
params:
162189
name: gh/name
163190
tag: gh/tag
164191
body: gh/notes.md
165192
globs: [gh/artifacts/*]
166-
- put: version
193+
- name: version-bump
194+
put: version
167195
params:
168196
bump: patch
197+
on_failure:
198+
put: notify
199+
params:
200+
channel: (( grab meta.slack.channel ))
201+
username: (( grab meta.slack.username ))
202+
icon_url: (( grab meta.slack.icon ))
203+
text: '(( concat meta.slack.fail_url " " meta.pipeline ": shipit job failed" ))'
169204

170205
resource_types:
171206
- name: slack-notification

ci/scripts/testflight

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ header "Deploying to BOSH-lite..."
4545
./templates/make_manifest warden
4646
bosh -n deploy
4747

48+
if [[ -n ${TEST_ERRAND} ]]; then
49+
header "Running '${TEST_ERRAND}' validation errand"
50+
bosh -n run errand ${TEST_ERRAND}
51+
fi
52+
4853
header "Cleaning up..."
4954
bosh -n delete deployment ${BOSH_LITE_DEPLOYMENT} --force || echo "continuing on..."
5055
bosh -n cleanup || echo "continuing on..."

0 commit comments

Comments
 (0)