-
Notifications
You must be signed in to change notification settings - Fork 49
/
pipeline.yml
168 lines (157 loc) · 3.96 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
jobs:
- name: build
public: true
serial_groups: [version]
plan:
- in_parallel:
- get: maven-resource
trigger: true
- get: version
params: {pre: rc}
- put: version
params: {file: version/version}
- put: maven-resource-image-rc
params:
build: maven-resource
tag: version/version
tag_as_latest: false
- name: test
public: true
serial_groups: [version]
plan:
- in_parallel:
- get: project
resource: maven-resource
passed: [build]
- get: maven-resource-image-rc
trigger: true
passed: [build]
- get: version
passed: [build]
- task: test
image: maven-resource-image-rc
config:
platform: linux
params:
MVN_REPO_URL: {{repo-url}}
MVN_SNAPSHOT_URL: {{repo-snapshot-url}}
MVN_USERNAME: ((maven.username))
MVN_PASSWORD: ((maven.password))
MVN_SKIP_CERT_CHECK: {{repo-skip-cert-check}}
MVN_REPO_CERT: {{repo-cert}}
MVN_DISABLE_REDEPLOY: {{repo-disable-redeploy}}
run:
path: sh
args:
- -exc
- |
/opt/resource/itest/all.sh
- name: shipit
public: true
serial_groups: [version]
plan:
- in_parallel:
- get: project
resource: maven-resource
passed: [test]
- get: maven-resource-image-rc
passed: [test]
params: {save: true}
- get: version
passed: [test]
params: {bump: final}
- get: pipeline-tasks
- task: generate-github-release
file: pipeline-tasks/generate-github-release/task.yml
output_mapping: {task-output: generate-github-release-output}
- task: generate-commitish
file: pipeline-tasks/generate-commitish/task.yml
output_mapping: {task-output: generate-commitish-output}
- task: generate-release-notes
file: pipeline-tasks/generate-release-notes-from-changelog/task.yml
input_mapping: {task-input: project}
output_mapping: {task-output: generate-release-notes-output}
- put: github-release
params:
name: generate-github-release-output/release-name
tag: generate-github-release-output/release-tag
commitish: generate-commitish-output/commitish
body: generate-release-notes-output/RELEASE_NOTES.md
- put: version
params: {file: version/version}
- put: maven-resource-image-final
params:
load: maven-resource-image-rc
tag: version/version
tag_as_latest: true
- name: major
public: true
serial_groups: [version]
plan:
- get: version
params: {bump: major, pre: rc}
- put: version
params: {file: version/version}
- name: minor
public: true
serial_groups: [version]
plan:
- get: version
params: {bump: minor, pre: rc}
- put: version
params: {file: version/version}
- name: patch
public: true
serial_groups: [version]
plan:
- get: version
passed: [shipit]
params: {bump: patch, pre: rc}
trigger: true
- put: version
params: {file: version/version}
resources:
- name: maven-resource
type: git
source:
uri: {{git-uri}}
branch: {{git-branch}}
private_key: ((git_key.private_key))
ignore_paths:
- LICENSE
- NOTICE.md
- pipeline.yml
- README.md
- name: version
type: semver
source:
driver: git
initial_version: 1.0.0-rc.0
uri: {{git-uri-semver}}
branch: version
file: version
private_key: ((git_key.private_key))
- name: maven-resource-image-rc
type: docker-image
source:
repository: {{docker-repository-rc}}
username: ((docker.username))
password: ((docker.password))
- name: maven-resource-image-final
type: docker-image
source:
repository: {{docker-repository-final}}
username: ((docker.username))
password: ((docker.password))
- name: pipeline-tasks
type: git
source:
uri: {{pipeline-tasks-git-uri}}
branch: {{pipeline-tasks-git-branch}}
- name: github-release
type: github-release
source:
owner: {{github-release-user}}
repository: maven-resource
access_token: ((github_access_token))