1
+ ---
2
+ anchors :
3
+ git-repo-resource-source : &git-repo-resource-source
4
+ uri : ((github-repo-uri)) # https://github.com/spring-projects-experimental/spring-boot-migrator
5
+ username : ((github-repo-user)) # fabapp2
6
+ password : ((github-ci-release-token))
7
+ branch : ((branch))
8
+ registry-image-resource-source : ®istry-image-resource-source
9
+ username : ((docker-hub-username))
10
+ password : ((docker-hub-password))
11
+ tag : ((milestone))
12
+ registry_mirror :
13
+ host : ((docker-hub-mirror))
14
+ username : ((docker-hub-mirror-username))
15
+ password : ((docker-hub-mirror-password))
16
+ docker-hub-mirror-vars : &docker-hub-mirror-vars
17
+ docker-hub-mirror : ((docker-hub-mirror))
18
+ docker-hub-mirror-username : ((docker-hub-mirror-username))
19
+ docker-hub-mirror-password : ((docker-hub-mirror-password))
20
+
21
+ resource_types :
22
+ - name : registry-image
23
+ type : registry-image
24
+ source :
25
+ repository : concourse/registry-image-resource
26
+ tag : 1.5.0
27
+ - name : git-pull-request
28
+ type : docker-image
29
+ source :
30
+ repository : ((github-repo-name))
31
+ - name : pull-request
32
+ type : registry-image
33
+ source :
34
+ repository : teliaoss/github-pr-resource
35
+ tag : v0.23.0
36
+
37
+
38
+ resources :
39
+ # The ci dir in the repo, used to trigger an image build on change
40
+ - name : ci-images-git-repo
41
+ type : git
42
+ icon : github
43
+ source :
44
+ uri : ((github-repo-uri))
45
+ branch : ((branch))
46
+ paths : ["ci/images/*"]
47
+ # The git repo
48
+ - name : git-repo
49
+ type : git
50
+ icon : github
51
+ source :
52
+ << : *git-repo-resource-source
53
+ # The image used to run the build
54
+ - name : ci-image
55
+ type : registry-image
56
+ icon : docker
57
+ source :
58
+ << : *registry-image-resource-source
59
+ repository : fkrueger096/spring-boot-migrator-ci
60
+ tag : latest
61
+ # branches for multi-branch pipeline
62
+ # - name: branches
63
+ # type: git-branches
64
+ # source:
65
+ # uri: ((github-repo-uri))
66
+ # branch_regex: '.*'
67
+
68
+
69
+ # git PR
70
+ - name : git-pull-request
71
+ type : pull-request
72
+ icon : source-pull
73
+ source :
74
+ access_token : ((github-ci-pull-request-token))
75
+ repository : ((github-repo-name))
76
+ base_branch : main
77
+ ignore_paths : [ "ci/*" ]
78
+
79
+ image_resource :
80
+ type : registry-image
81
+ source :
82
+ repository : concourse/oci-build-task
83
+ tag : 0.10.0
84
+ registry_mirror :
85
+ host : ((docker-hub-mirror))
86
+ username : ((docker-hub-mirror-username))
87
+ password : ((docker-hub-mirror-password))
88
+
89
+ jobs :
90
+ # Build and push CI image when ci-images-git-repo changed
91
+ - name : build-ci-images
92
+ plan :
93
+ - get : ci-images-git-repo
94
+ trigger : true
95
+ - get : git-repo
96
+ - in_parallel :
97
+ - task : build-ci-image
98
+ privileged : true
99
+ file : git-repo/ci/tasks/build-ci-image.yml
100
+ output_mapping :
101
+ image : ci-image
102
+ vars :
103
+ ci-image-name : ci-image
104
+ << : *docker-hub-mirror-vars
105
+ - in_parallel :
106
+ - put : ci-image
107
+ params :
108
+ image : ci-image/image.tar
109
+
110
+ # Build application
111
+ - name : build
112
+ public : true
113
+ plan :
114
+ - in_parallel :
115
+ - get : ci-image
116
+ - get : git-repo
117
+ trigger : true
118
+ - task : compile
119
+ image : ci-image
120
+ file : git-repo/ci/tasks/maven-build.yml
121
+ # - in_parallel:
122
+ # fail_fast: true
123
+ # steps:
124
+ # - task: run-unit-tests
125
+ # image: ci-image
126
+ # file: git-repo/ci/tasks/maven-unit-test.yml
127
+ # - task: run-integration-tests
128
+ # image: ci-image
129
+ # file: git-repo/ci/tasks/maven-integration-test.yml
130
+
131
+ # - name: set-feature-pipelines
132
+ # plan:
133
+ # - in_parallel:
134
+ # - get: feature-branches
135
+ # trigger: true
136
+ # - get: git-repo
137
+ # - load_var: branches
138
+ # file: feature-branches/branches.json
139
+ # - across:
140
+ # - var: branch
141
+ # values: ((.:branches))
142
+ # set_pipeline: dev
143
+ # file: examples/pipelines/multi-branch/template.yml
144
+ # instance_vars: {feature: ((.:branch.groups.feature))}
145
+ # vars: {branch: ((.:branch.name))}
146
+
147
+ # Build every new PR
148
+ - name : build-pull-requests
149
+ serial : true
150
+ public : true
151
+ plan :
152
+ - get : ci-image
153
+ - get : git-repo
154
+ resource : git-pull-request
155
+ trigger : true
156
+ version : every
157
+ - do :
158
+ - put : git-pull-request
159
+ params :
160
+ path : git-repo
161
+ status : pending
162
+ - task : build-project
163
+ image : ci-image
164
+ file : git-repo/ci/tasks/build-pr-project.yml
165
+ # timeout: 30m # ((task-timeout))
166
+ on_success :
167
+ put : git-pull-request
168
+ params :
169
+ path : git-repo
170
+ status : success
171
+ on_failure :
172
+ put : git-pull-request
173
+ params :
174
+ path : git-repo
175
+ status : failure
176
+
177
+ groups :
178
+ - name : " builds"
179
+ jobs : ["build"]
180
+ # - name: "releases"
181
+ # jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release", "publish-gradle-plugin", "publish-to-sdkman", "update-homebrew-tap"]
182
+ # - name: "system-tests"
183
+ # jobs: ["run-system-tests", "jdk18-run-system-tests"]
184
+ - name : " ci-images"
185
+ jobs : ["build-ci-images"]
186
+ - name : " pull-requests"
187
+ jobs : ["build-pull-requests"]
0 commit comments