Skip to content

Commit

Permalink
Added Slack notifications after tests; moved test tasks to different …
Browse files Browse the repository at this point in the history
…files
  • Loading branch information
vshatravenko committed Nov 2, 2017
1 parent e98e636 commit 495e6b9
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/pipelines/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
tag: tag/name
- put: slack-alert
params:
channel: 'general'
channel: '#ci-alerts'
text: |
kite master branch was built and pushed!
Check it out at:
Expand Down
65 changes: 53 additions & 12 deletions tpl/service/%output_path%/pipelines/review.yml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,37 @@ jobs:
path: pull-requests
status: pending
- task: run-tests
file: pull-requests/<%= @output %>/pipelines/tasks/run-tests.yml
on_failure:
put: pull-requests
params:
path: pull-requests
status: failure
file: pull-requests/<%= @output %>/pipelines/tasks/run-pr-tests.yml
on_success:
put: pull-requests
params:
path: pull-requests
status: success
do:
- put: pull-requests
params:
path: pull-requests
status: success
- put: slack-alert
params:
channel: '#ci-alerts'
text: |
<%= @name %> PR tests have passed! :thumbsup_all:
Check it out at:
$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
$ATC_EXTERNAL_URL/builds/$BUILD_ID
on_failure:
do:
- put: pull-requests
params:
path: pull-requests
status: failure
- put: slack-alert
params:
channel: '#ci-alerts'
text: |
<%= @name %> PR tests have failed! :thumbsdown_all:
Check it out at:
$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
$ATC_EXTERNAL_URL/builds/$BUILD_ID

- name: master-build
serial: true
Expand All @@ -91,7 +111,7 @@ jobs:
tag: tag/name
- put: slack-alert
params:
channel: 'general'
channel: '#ci-alerts'
text: |
<%= @name %> master branch was built and pushed!
Check it out at:
Expand All @@ -109,4 +129,25 @@ jobs:
passed: [master-build]
trigger: true
- task: run-tests
file: <%= @name %>-repository/<%= @output %>/pipelines/tasks/run-tests.yml
file: <%= @name %>-repository/<%= @output %>/pipelines/tasks/run-master-tests.yml
on_success:
put: slack-alert
params:
channel: '#ci-alerts'
text: |
<%= @name %> master tests have passed! :thumbsup_all:
Check it out at:
$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
$ATC_EXTERNAL_URL/builds/$BUILD_ID
on_failure:
put: slack-alert
params:
channel: '#ci-alerts'
text: |
<%= @name %> master tests have failed! :thumbsdown_all:
Check it out at:
$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
$ATC_EXTERNAL_URL/builds/$BUILD_ID

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ image_resource:
repository: <%= @image %>
username: _json_key
password: ((gcr_password))

run:
path: sh
args: ["-exc", "echo Success"]
12 changes: 12 additions & 0 deletions tpl/service/%output_path%/pipelines/tasks/run-pr-tests.yml.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
platform: linux
image_resource:
type: docker-image
source:
repository: <%= @image %>
username: _json_key
password: ((gcr_password))

run:
path: sh
args: ["-exc", "echo Success"]

0 comments on commit 495e6b9

Please sign in to comment.