-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpipeline.yml
98 lines (95 loc) · 2.48 KB
/
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
resource_types:
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
resources:
- name: cf-smoke-tests
type: git
source:
uri: https://github.com/cloudfoundry/cf-smoke-tests.git
branch: master
- name: cf-acceptance-tests
type: git
source:
uri: https://github.com/cloudfoundry/cf-acceptance-tests.git
branch: master
- name: pipeline
type: git
source:
uri: https://github.com/dlapiduz/cf-continuous-test.git
branch: master
- name: every-10-minutes
type: time
source:
interval: 10m
- name: every-3-hours
type: time
source:
interval: 3h
- name: slack-alert
type: slack-notification
source:
url: {{slack_hook_url}}
- name: stats-bucket
type: s3
source:
bucket: {{stats_bucket_name}}
regexp: build-time-(.*).txt
access_key_id: {{stats_access_key_id}}
secret_access_key: {{stats_secret_access_key}}
private: true
jobs:
- name: run-smoke-tests
build_logs_to_retain: 250
plan:
- get: cf-smoke-tests
- get: pipeline
trigger: true
- get: every-10-minutes
trigger: true
- task: run-smoke-tests
file: pipeline/tasks/run-smoke-tests.yml
params:
API_URI: {{api_uri}}
APPS_DOMAIN: {{apps_domain}}
CF_USER: {{cf_user}}
CF_PASSOWRD: {{cf_password}}
CF_ORG: {{cf_org}}
CF_SPACE: {{cf_space}}
on_failure:
put: slack-alert
params:
icon_emoji: ":hospital:"
username: Health Bot
text: |
:red_circle: Smoke tests failed: <$ATC_EXTERNAL_URL/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View Build>
- put: stats-bucket
params:
file: run-stats/build-time-*.txt
- name: run-acceptance-tests
build_logs_to_retain: 250
plan:
- get: cf-acceptance-tests
- get: pipeline
trigger: true
- get: every-3-hours
trigger: true
- task: run-smoke-tests
file: pipeline/tasks/run-acceptance-tests.yml
params:
API_URI: {{api_uri}}
APPS_DOMAIN: {{apps_domain}}
CF_USER: {{cf_admin_user}}
CF_PASSOWRD: {{cf_admin_password}}
on_failure:
put: slack-alert
params:
icon_emoji: ":hospital:"
username: Health Bot
text: |
:red_circle: Acceptance tests failed: <$ATC_EXTERNAL_URL/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View Build>
- put: stats-bucket
params:
file: run-stats/acceptance-build-time-*.txt