@@ -79,6 +79,48 @@ gcp_credentials: ENCRYPTED[a28959877b2c9c36f151781b0a05407218cda646c7d047fc556e4
79
79
aws_credentials : ENCRYPTED[4ca070bffe28eb9b27d63c568b52970dd46f119c3a83b8e443241e895dbf1737580b4d84eed27a311a2b74287ef9f79f]
80
80
81
81
82
+ validate-source_task :
83
+ name : " Validate source code changes"
84
+ alias : validate-source
85
+ # This task is primarily intended to catch human-errors early on, in a
86
+ # PR context. Skip running it everywhere else.
87
+ only_if : &is_pr "$CIRRUS_PR != ''"
88
+ gce_instance :
89
+ image_project : libpod-218412
90
+ zone : " us-central1-a"
91
+ # golangci-lint is a very, very hungry beast.
92
+ cpu : 8
93
+ memory : " 16Gb"
94
+ # Required to be 200gig, do not modify - has i/o performance impact
95
+ # according to gcloud CLI tool warning messages.
96
+ disk : 200
97
+ image_name : " ${FEDORA_CACHE_IMAGE_NAME}" # from stdenvars
98
+ env :
99
+ TEST_FLAVOR : validate-source
100
+ # NOTE: The default way Cirrus-CI clones is *NOT* compatible with
101
+ # environment expectations in contrib/cirrus/lib.sh. Specifically
102
+ # the 'origin' remote must be defined, and all remote branches/tags
103
+ # must be available for reference from CI scripts.
104
+ clone_script : &full_clone |
105
+ set -exo pipefail
106
+ cd /
107
+ rm -rf $CIRRUS_WORKING_DIR
108
+ mkdir -p $CIRRUS_WORKING_DIR
109
+ git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
110
+ cd $CIRRUS_WORKING_DIR
111
+ git remote update origin
112
+ if [[ -n "$CIRRUS_PR" ]]; then # running for a PR
113
+ git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
114
+ git checkout pull/$CIRRUS_PR
115
+ else
116
+ git reset --hard $CIRRUS_CHANGE_IN_REPO
117
+ fi
118
+ # Standard setup stage call, used by nearly every task in CI.
119
+ setup_script : &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
120
+ # Standard main execution stage call, used by nearly every task in CI.
121
+ main_script : &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
122
+
123
+
82
124
# N/B: This matrix of build tasks are critical to CI, along with the following
83
125
# aarch64 task. They build binaries for all CI platforms, and versions. On
84
126
# success, the contents of the repository are preserved as an artifact for
@@ -120,33 +162,15 @@ build_task:
120
162
CI_DESIRED_NETWORK : netavark
121
163
env :
122
164
TEST_FLAVOR : build
123
- # NOTE: The default way Cirrus-CI clones is *NOT* compatible with
124
- # environment expectations in contrib/cirrus/lib.sh. Specifically
125
- # the 'origin' remote must be defined, and all remote branches/tags
126
- # must be available for reference from CI scripts.
127
- clone_script : &full_clone |
128
- set -exo pipefail
129
- cd /
130
- rm -rf $CIRRUS_WORKING_DIR
131
- mkdir -p $CIRRUS_WORKING_DIR
132
- git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
133
- cd $CIRRUS_WORKING_DIR
134
- git remote update origin
135
- if [[ -n "$CIRRUS_PR" ]]; then # running for a PR
136
- git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
137
- git checkout pull/$CIRRUS_PR
138
- else
139
- git reset --hard $CIRRUS_CHANGE_IN_REPO
140
- fi
165
+ clone_script : *full_clone
141
166
# Attempt to prevent flakes by confirming basic environment expectations,
142
167
# network service connectivity and essential container image availability.
168
+ # TODO: Rename to "ci-sanity" and move into task that runs in parallel to build
143
169
prebuild_script : &prebuild $SCRIPT_BASE/prebuild.sh
144
- # Standard setup stage call, used by nearly every task in CI.
145
- setup_script : &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
170
+ setup_script : *setup
146
171
# Attempt to prevent flakes by confirming automation environment and
147
172
# all required external/3rd-party services are available and functional.
148
- # Standard main execution stage call, used by nearly every task in CI.
149
- main_script : &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
173
+ main_script : *main
150
174
# Attempt to catch code-quality and vendoring problems early.
151
175
postbuild_script : &postbuild $SCRIPT_BASE/postbuild.sh
152
176
# Cirrus-CI is very slow uploading one file at time, and the repo contains
@@ -162,48 +186,6 @@ build_task:
162
186
type : text/plain
163
187
164
188
165
- # Confirm the result of building on at least one platform appears sane.
166
- # This confirms the binaries can be executed, checks --help vs docs, and
167
- # other essential post-build validation checks.
168
- validate_task :
169
- name : " Validate ${DISTRO_NV} Build"
170
- alias : validate
171
- # This task is primarily intended to catch human-errors early on, in a
172
- # PR. Skip it for branch-push, branch-create, and tag-push to improve
173
- # automation reliability/speed in those contexts. Any missed errors due
174
- # to nonsequential PR merging practices, will be caught on a future PR,
175
- # build or test task failures.
176
- # Docs: ./contrib/cirrus/CIModes.md
177
- only_if : &is_pr "$CIRRUS_PR != ''"
178
- depends_on :
179
- - build
180
- # golangci-lint is a very, very hungry beast.
181
- gce_instance : &bigvm
182
- << : *standardvm
183
- cpu : 8
184
- memory : " 16Gb"
185
- matrix :
186
- - env :
187
- << : *stdenvars
188
- VM_IMAGE_NAME : ${FEDORA_CACHE_IMAGE_NAME}
189
- DISTRO_NV : ${FEDORA_NAME}
190
- - env :
191
- << : *stdenvars
192
- VM_IMAGE_NAME : ${RAWHIDE_CACHE_IMAGE_NAME}
193
- DISTRO_NV : ${RAWHIDE_NAME}
194
- env :
195
- TEST_FLAVOR : validate
196
- # N/B: This script depends on ${DISTRO_NV} being defined for the task.
197
- clone_script : &get_gosrc |
198
- cd /tmp
199
- echo "$ARTCURL/Build%20for%20${DISTRO_NV}/repo/repo.tbz"
200
- time $ARTCURL/Build%20for%20${DISTRO_NV}/repo/repo.tbz
201
- time tar xjf /tmp/repo.tbz -C $GOSRC
202
- setup_script : *setup
203
- main_script : *main
204
- always : *runner_stats
205
-
206
-
207
189
build_aarch64_task :
208
190
alias : ' build_aarch64'
209
191
name : ' Build for $DISTRO_NV'
@@ -219,6 +201,7 @@ build_aarch64_task:
219
201
CTR_FQIN : ${FEDORA_CONTAINER_FQIN}
220
202
TEST_FLAVOR : build
221
203
clone_script : *full_clone
204
+ # TODO: Rename to "ci-sanity" and move into task that runs in parallel to build
222
205
prebuild_script : *prebuild
223
206
setup_script : *setup
224
207
postbuild_script : *postbuild
@@ -233,37 +216,6 @@ build_aarch64_task:
233
216
always : *runner_stats
234
217
235
218
236
- # Confirm the result of building on at least one platform appears sane.
237
- # This confirms the binaries can be executed, checks --help vs docs, and
238
- # other essential post-build validation checks.
239
- validate_aarch64_task :
240
- name : " Validate $DISTRO_NV Build"
241
- alias : validate_aarch64
242
- # This task is primarily intended to catch human-errors early on, in a
243
- # PR. Skip it for branch-push, branch-create, and tag-push to improve
244
- # automation reliability/speed in those contexts. Any missed errors due
245
- # to nonsequential PR merging practices, will be caught on a future PR,
246
- # build or test task failures.
247
- # Docs: ./contrib/cirrus/CIModes.md
248
- only_if : *is_pr
249
- depends_on :
250
- - build_aarch64
251
- ec2_instance : *standard_build_ec2_aarch64
252
- env :
253
- << : *stdenvars_aarch64
254
- TEST_FLAVOR : validate
255
- DISTRO_NV : ${FEDORA_AARCH64_NAME}
256
- # N/B: This script depends on ${DISTRO_NV} being defined for the task.
257
- clone_script : &get_gosrc_aarch64 |
258
- cd /tmp
259
- echo "$ARTCURL/build_aarch64/repo/repo.tbz"
260
- time $ARTCURL/build_aarch64/repo/repo.tbz
261
- time tar xjf /tmp/repo.tbz -C $GOSRC
262
- setup_script : *setup
263
- main_script : *main
264
- always : *runner_stats
265
-
266
-
267
219
# There are several other important variations of podman which
268
220
# must always build successfully. Most of them are handled in
269
221
# this task, though a few need dedicated tasks which follow.
@@ -393,10 +345,9 @@ build_success_task:
393
345
name : " Total Build Success"
394
346
alias : build_success
395
347
depends_on :
348
+ - validate-source
396
349
- build
397
- - validate
398
350
- build_aarch64
399
- - validate_aarch64
400
351
- alt_build
401
352
- osx_alt_build
402
353
- freebsd_alt_build
@@ -430,7 +381,12 @@ bindings_task:
430
381
env :
431
382
<< : *stdenvars
432
383
TEST_FLAVOR : bindings
433
- clone_script : *get_gosrc
384
+ # N/B: This script depends on ${DISTRO_NV} being defined for the task.
385
+ clone_script : &get_gosrc |
386
+ cd /tmp
387
+ echo "$ARTCURL/Build%20for%20${DISTRO_NV}/repo/repo.tbz"
388
+ time $ARTCURL/Build%20for%20${DISTRO_NV}/repo/repo.tbz
389
+ time tar xjf /tmp/repo.tbz -C $GOSRC
434
390
setup_script : *setup
435
391
main_script : *main
436
392
always : &logs_artifacts
@@ -781,7 +737,12 @@ podman_machine_aarch64_task:
781
737
PRIV_NAME : " rootless" # intended use-case
782
738
DISTRO_NV : " ${FEDORA_AARCH64_NAME}"
783
739
VM_IMAGE_NAME : " ${FEDORA_AARCH64_AMI}"
784
- clone_script : *get_gosrc_aarch64
740
+ # N/B: This script depends on ${DISTRO_NV} being defined for the task.
741
+ clone_script : &get_gosrc_aarch64 |
742
+ cd /tmp
743
+ echo "$ARTCURL/build_aarch64/repo/repo.tbz"
744
+ time $ARTCURL/build_aarch64/repo/repo.tbz
745
+ time tar xjf /tmp/repo.tbz -C $GOSRC
785
746
setup_script : *setup
786
747
main_script : *main
787
748
always : *int_logs_artifacts
0 commit comments