-
Notifications
You must be signed in to change notification settings - Fork 17
/
pipeline.yml
140 lines (132 loc) · 3.56 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
jobs:
- name: build-jekyll
public: true
plan:
- get: repository
trigger: true
- get: gist
- task: build
config:
platform: linux
image_resource:
type: docker-image
source: {repository: praqma/gh-pages}
inputs:
- name: repository
- name: gist
outputs:
- name: site
run:
path: sh
args:
- -exc
- |
git clone gist site
cd repository && jekyll build && cp _site/* ../site && cd ../site
git config --global user.email "[email protected]"
git config --global user.name "praqma" && git add .
git commit -m "updated gist"
on_failure:
put: slack-alert
params:
channel: '#general'
text: |
The build failed. Please go correct it at:
http://192.168.100.4:8080//teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
http://192.168.100.4:8080//builds/$BUILD_ID
- put: gist
params:
repository: site
- name: test-site
public: true
plan:
- get: repository
passed: [build-jekyll]
trigger: true
- task: curl-site
config:
platform: linux
image_resource:
type: docker-image
source:
repository: praqma/gh-pages
run:
path: sh
args:
- -exc
- |
apt-get update
apt-get install -y curl
curl https://bl.ocks.org/sharor/raw/4b2015849c31bfb860c6a021ba9ed63a/
on_failure:
put: slack-alert
params:
channel: '#general'
text: |
The build failed. Please go correct it at:
http://192.168.100.4:8080//teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
http://192.168.100.4:8080//builds/$BUILD_ID
- task: link-checker
config:
platform: linux
image_resource:
type: docker-image
source: {repository: praqma/linkchecker}
run:
path: sh
args:
- -exc
- |
linkchecker http://bl.ocks.org/sharor/raw/4b2015849c31bfb860c6a021ba9ed63a/
on_failure:
put: slack-alert
params:
channel: '#general'
text: |
The build failed. Please go correct it at:
http://192.168.100.4:8080//teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
or at:
http://192.168.100.4:8080//builds/$BUILD_ID
- name: update-production-site
public: true
plan:
- get: repository
passed: [test-site]
- put: github-pages
params:
repository: repository
force: true
resources:
- name: repository
type: git
source:
uri: https://github.com/Sharor/concourse-workshop.git
branch: master
username: {{github-username}}
password: {{github-password}}
- name: gist
type: git
source:
uri: https://gist.github.com/4b2015849c31bfb860c6a021ba9ed63a.git
branch: master
username: {{github-username}}
password: {{github-password}}
- name: github-pages
type: git
source:
uri: https://github.com/Sharor/concourse-workshop.git
branch: gh-pages
username: {{github-username}}
password: {{github-password}}
- name: slack-alert
type: slack-notification
source:
url: https://hooks.slack.com/services/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
resource_types:
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest