-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipeline.yml
89 lines (85 loc) · 2.14 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
---
resources:
- name: src
type: git
source:
uri: https://github.com/vponnam/concourse.git
branch: dev
- name: alert
type: email
source:
smtp:
host: {{smtp-host}}
port: {{smtp-port}}
username: {{smtp-username}}
password: {{smtp-password}}
from: {{email-from}}
to: [ {{email-to}} ]
- name: scheduler
type: time
source: {interval: 360m}
resource_types:
- name: email
type: docker-image
source:
repository: pcfseceng/email-resource
jobs:
- name: pcf-smoke-tests
plan:
- get: scheduler
trigger: true
- get: src
- task: smoke-test
file: src/workout/smoke-tests/pcf-smoke-test.yml
params:
user: {{cf-user}}
pwd: {{cf-pwd}}
sys: {{cf-sys}}
org: {{cf-org}}
sn: {{cf-space}}
on_success:
do:
- task: notification-content
config:
platform: linux
inputs:
- name: src
outputs:
- name: content
image_resource:
type: docker-image
source: {repository: busybox}
run:
path: sh
args:
- -exc
- |
echo "PCF Smoke-test is Successful..!" >> content/notification_subject.txt
echo "Successfully completed platform smoke-test" >> content/notification_body.txt
- put: alert
params:
subject: content/notification_subject.txt
body: content/notification_body.txt
on_failure:
do:
- task: notification-content
config:
platform: linux
inputs:
- name: src
outputs:
- name: content
image_resource:
type: docker-image
source: {repository: busybox}
run:
path: sh
args:
- -exc
- |
echo "Smoke-test Failed..!" >> content/notification_subject.txt
echo "Failed running complete-smoke-status; ********Something is broken******** " >> content/notification_body.txt
- put: alert
params:
subject: content/notification_subject.txt
body: content/notification_body.txt