This repository has been archived by the owner on Jan 12, 2023. It is now read-only.
forked from ljfranklin/terraform-resource
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-image-pipeline.yml
73 lines (70 loc) · 2.04 KB
/
build-image-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# uncomment time resource to trigger nightly builds
# uncomment terraform-src trigger to build rc builds
# uncomment slack tasks to trigger alerts on success / failure
shared:
- &failure-alert
put: slack-alert
params:
silent: true
icon_emoji: ":interrobang:"
text: |
*The <$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|$BUILD_PIPELINE_NAME - $BUILD_JOB_NAME> job failed!*
- &success-alert
put: slack-alert
params:
silent: true
icon_emoji: ":rocket:"
text: |
*The <$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|$BUILD_PIPELINE_NAME - $BUILD_JOB_NAME> job passed!*
jobs:
- name: push-custom-image
plan:
- do:
- aggregate:
# - get: nightly
# trigger: true
- get: terraform-src
# trigger: true
- get: resource-src
- task: build-custom-artifacts
file: resource-src/ci/tasks/build-custom-artifacts.yml
- put: resource-custom-image
params:
build: build-artifacts/
# on_success: *success-alert
# on_failure: *failure-alert
resource_types:
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
resources:
- name: resource-src
type: git
source:
uri: {{resource_git_uri}}
branch: {{resource_git_branch}}
- name: terraform-src
type: git
source:
uri: {{terraform_git_uri}}
branch: {{terraform_git_branch}}
tag_filter: {{terraform_git_tag_filter}}
- name: resource-custom-image
type: docker-image
source:
repository: {{docker_repository}}
tag: {{docker_tag}}
email: {{docker_email}}
username: {{docker_username}}
password: {{docker_password}}
# - name: nightly
# type: time
# source:
# start: 12:00 AM -0700
# stop: 12:10 AM -0700
# - name: slack-alert
# type: slack-notification
# source:
# url: {{slack_url}}