podman

Форк
0
/
.cirrus.yml 
1222 строки · 41.9 Кб
1
---
2

3
# Main collection of env. vars to set for all tasks and scripts.
4
env:
5
    ####
6
    #### Global variables used for all tasks
7
    ####
8
    # Name of the ultimate destination branch for this CI run, PR or post-merge.
9
    DEST_BRANCH: "main"
10
    # Sane (default) value for GOPROXY and GOSUMDB.
11
    GOPROXY: "https://proxy.golang.org,direct"
12
    GOSUMDB: "sum.golang.org"
13
    # Overrides default location (/tmp/cirrus) for repo clone
14
    GOPATH: &gopath "/var/tmp/go"
15
    GOCACHE: "${GOPATH}/cache"
16
    GOSRC: &gosrc "/var/tmp/go/src/github.com/containers/podman"
17
    CIRRUS_WORKING_DIR: *gosrc
18
    # The default is 'sh' if unspecified
19
    CIRRUS_SHELL: "/bin/bash"
20
    # Save a little typing (path relative to $CIRRUS_WORKING_DIR)
21
    SCRIPT_BASE: "./contrib/cirrus"
22
    # Runner statistics log file path/name
23
    STATS_LOGFILE_SFX: 'runner_stats.log'
24
    STATS_LOGFILE: '$GOSRC/${CIRRUS_TASK_NAME}-${STATS_LOGFILE_SFX}'
25

26
    ####
27
    #### Cache-image names to test with (double-quotes around names are critical)
28
    ####
29
    FEDORA_NAME: "fedora-39"
30
    FEDORA_AARCH64_NAME: "${FEDORA_NAME}-aarch64"
31
    PRIOR_FEDORA_NAME: "fedora-38"
32
    RAWHIDE_NAME: "rawhide"
33
    DEBIAN_NAME: "debian-13"
34

35
    # Image identifiers
36
    IMAGE_SUFFIX: "c20240409t192511z-f39f38d13"
37

38
    # EC2 images
39
    FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"
40
    FEDORA_AARCH64_AMI: "fedora-podman-aws-arm64-${IMAGE_SUFFIX}"
41
    # GCP Images
42
    FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
43
    PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
44
    RAWHIDE_CACHE_IMAGE_NAME: "rawhide-${IMAGE_SUFFIX}"
45
    DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}"
46
    # Container FQIN's
47
    FEDORA_CONTAINER_FQIN: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}"
48
    PRIOR_FEDORA_CONTAINER_FQIN: "quay.io/libpod/prior-fedora_podman:${IMAGE_SUFFIX}"
49
    WINDOWS_AMI: "win-server-wsl-${IMAGE_SUFFIX}"
50
    ####
51
    #### Control variables that determine what to run and how to run it.
52
    #### N/B: Required ALL of these are set for every single task.
53
    ####
54
    TEST_FLAVOR:             # int, sys, ext_svc, validate, automation, etc.
55
    TEST_ENVIRON: host       # 'host', or 'container'.
56
    PODBIN_NAME: podman      # 'podman' or 'remote'
57
    PRIV_NAME: root          # 'root' or 'rootless'
58
    DISTRO_NV:               # any {PRIOR_,}{FEDORA,DEBIAN}_NAME value
59
    VM_IMAGE_NAME:           # One of the "Google-cloud VM Images" (above)
60
    CTR_FQIN:                # One of the "Container FQIN's" (above)
61
    CI_DESIRED_DATABASE: sqlite # 'sqlite' or 'boltdb'
62
    CI_DESIRED_STORAGE: overlay # overlay or vfs
63

64
    # Curl-command prefix for downloading task artifacts, simply add the
65
    # the url-encoded task name, artifact name, and path as a suffix.
66
    ART_URL: https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}
67
    ARTCURL: >-
68
        curl --retry 5 --retry-delay 8 --fail --location -O
69
        --url ${ART_URL}
70

71

72
# Default timeout for each task
73
timeout_in: 60m
74

75

76
gcp_credentials: ENCRYPTED[a28959877b2c9c36f151781b0a05407218cda646c7d047fc556e42f55e097e897ab63ee78369dae141dcf0b46a9d0cdd]
77

78
aws_credentials: ENCRYPTED[4ca070bffe28eb9b27d63c568b52970dd46f119c3a83b8e443241e895dbf1737580b4d84eed27a311a2b74287ef9f79f]
79

80

81
# N/B: This matrix of build tasks are critical to CI, along with the following
82
# aarch64 task. They build binaries for all CI platforms, and versions. On
83
# success, the contents of the repository are preserved as an artifact for
84
# consumption by most subsequent CI tasks.  This saves about 3-5 minutes of
85
# otherwise duplicative effort in most tasks.
86
build_task:
87
    alias: 'build'
88
    name: 'Build for $DISTRO_NV'
89
    gce_instance: &standardvm
90
        image_project: libpod-218412
91
        zone: "us-central1-a"
92
        cpu: 2
93
        memory: "4Gb"
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: "${VM_IMAGE_NAME}"  # from stdenvars
98
    matrix: &platform_axis
99
        # Ref: https://cirrus-ci.org/guide/writing-tasks/#matrix-modification
100
        - env: &stdenvars
101
              DISTRO_NV: ${FEDORA_NAME}
102
              # Not used here, is used in other tasks
103
              VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
104
              CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
105
              # ID for re-use of build output
106
              CI_DESIRED_RUNTIME: crun
107
        - env:
108
              DISTRO_NV: ${PRIOR_FEDORA_NAME}
109
              VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
110
              CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
111
              CI_DESIRED_RUNTIME: crun
112
              CI_DESIRED_DATABASE: boltdb
113
              CI_DESIRED_STORAGE: vfs
114
              # Catch invalid "TMPDIR == /tmp" assumptions; PR #19281
115
              TMPDIR: /var/tmp
116
        - env:
117
              <<: *stdenvars
118
              DISTRO_NV: ${RAWHIDE_NAME}
119
              VM_IMAGE_NAME: ${RAWHIDE_CACHE_IMAGE_NAME}
120
              CTR_FQIN: ""
121
        - env:
122
              DISTRO_NV: ${DEBIAN_NAME}
123
              VM_IMAGE_NAME: ${DEBIAN_CACHE_IMAGE_NAME}
124
              CI_DESIRED_RUNTIME: runc
125
              CI_DESIRED_NETWORK: netavark
126
              # Ignore cgroups-v1 warnings on debian
127
              PODMAN_IGNORE_CGROUPSV1_WARNING: true
128
    env:
129
        TEST_FLAVOR: build
130
    # NOTE: The default way Cirrus-CI clones is *NOT* compatible with
131
    #       environment expectations in contrib/cirrus/lib.sh.  Specifically
132
    #       the 'origin' remote must be defined, and all remote branches/tags
133
    #       must be available for reference from CI scripts.
134
    clone_script: &full_clone |
135
          set -exo pipefail
136
          cd /
137
          rm -rf $CIRRUS_WORKING_DIR
138
          mkdir -p $CIRRUS_WORKING_DIR
139
          git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
140
          cd $CIRRUS_WORKING_DIR
141
          git remote update origin
142
          if [[ -n "$CIRRUS_PR" ]]; then # running for a PR
143
              git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
144
              git checkout pull/$CIRRUS_PR
145
          else
146
              git reset --hard $CIRRUS_CHANGE_IN_REPO
147
          fi
148
    # Attempt to prevent flakes by confirming basic environment expectations,
149
    # network service connectivity and essential container image availability.
150
    prebuild_script: &prebuild $SCRIPT_BASE/prebuild.sh
151
    # Standard setup stage call, used by nearly every task in CI.
152
    setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
153
    # Attempt to prevent flakes by confirming automation environment and
154
    # all required external/3rd-party services are available and functional.
155
    # Standard main execution stage call, used by nearly every task in CI.
156
    main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
157
    # Attempt to catch code-quality and vendoring problems early.
158
    postbuild_script: &postbuild $SCRIPT_BASE/postbuild.sh
159
    # Cirrus-CI is very slow uploading one file at time, and the repo contains
160
    # thousands of files.  Speed this up by archiving into tarball first.
161
    repo_prep_script: &repo_prep >-
162
        tar cjf /tmp/repo.tbz -C $GOSRC . && mv /tmp/repo.tbz $GOSRC/
163
    repo_artifacts: &repo_artifacts
164
        path: ./repo.tbz
165
        type: application/octet-stream
166
    always: &runner_stats
167
        runner_stats_artifacts:
168
            path: ./*-${STATS_LOGFILE_SFX}
169
            type: text/plain
170

171

172
# Confirm the result of building on at least one platform appears sane.
173
# This confirms the binaries can be executed, checks --help vs docs, and
174
# other essential post-build validation checks.
175
validate_task:
176
    name: "Validate ${DISTRO_NV} Build"
177
    alias: validate
178
    # This task is primarily intended to catch human-errors early on, in a
179
    # PR.  Skip it for branch-push, branch-create, and tag-push to improve
180
    # automation reliability/speed in those contexts.  Any missed errors due
181
    # to nonsequential PR merging practices, will be caught on a future PR,
182
    # build or test task failures.
183
    # Docs: ./contrib/cirrus/CIModes.md
184
    only_if: &is_pr "$CIRRUS_PR != ''"
185
    depends_on:
186
        - build
187
    # golangci-lint is a very, very hungry beast.
188
    gce_instance: &bigvm
189
        <<: *standardvm
190
        cpu: 8
191
        memory: "16Gb"
192
    matrix:
193
        - env:
194
            <<: *stdenvars
195
            VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
196
            DISTRO_NV: ${FEDORA_NAME}
197
        - env:
198
            <<: *stdenvars
199
            VM_IMAGE_NAME: ${RAWHIDE_CACHE_IMAGE_NAME}
200
            DISTRO_NV: ${RAWHIDE_NAME}
201
    env:
202
        TEST_FLAVOR: validate
203
    # N/B: This script depends on ${DISTRO_NV} being defined for the task.
204
    clone_script: &get_gosrc |
205
        cd /tmp
206
        echo "$ARTCURL/Build%20for%20${DISTRO_NV}/repo/repo.tbz"
207
        time $ARTCURL/Build%20for%20${DISTRO_NV}/repo/repo.tbz
208
        time tar xjf /tmp/repo.tbz -C $GOSRC
209
    setup_script: *setup
210
    main_script: *main
211
    always: *runner_stats
212

213

214
build_aarch64_task:
215
    alias: 'build_aarch64'
216
    name: 'Build for $DISTRO_NV'
217
    ec2_instance: &standard_build_ec2_aarch64
218
        image: ${VM_IMAGE_NAME}
219
        type: ${EC2_INST_TYPE}
220
        region: us-east-1
221
        architecture: arm64  # CAUTION: This has to be "arm64", not "aarch64".
222
    env: &stdenvars_aarch64
223
        EC2_INST_TYPE: "t4g.xlarge"
224
        DISTRO_NV: ${FEDORA_AARCH64_NAME}
225
        VM_IMAGE_NAME: ${FEDORA_AARCH64_AMI}
226
        CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
227
        CI_DESIRED_RUNTIME: crun
228
        TEST_FLAVOR: build
229
    clone_script: *full_clone
230
    prebuild_script: *prebuild
231
    setup_script: *setup
232
    postbuild_script: *postbuild
233
    main_script: *main
234
    # Cirrus-CI is very slow uploading one file at time, and the repo contains
235
    # thousands of files.  Speed this up by archiving into tarball first.
236
    repo_prep_script: &repo_prep_aarch64 >-
237
        tar cjf /tmp/repo.tbz -C $GOSRC . && mv /tmp/repo.tbz $GOSRC/
238
    repo_artifacts: &repo_artifacts_aarch64
239
        path: ./repo.tbz
240
        type: application/octet-stream
241
    always: *runner_stats
242

243

244
# Confirm the result of building on at least one platform appears sane.
245
# This confirms the binaries can be executed, checks --help vs docs, and
246
# other essential post-build validation checks.
247
validate_aarch64_task:
248
    name: "Validate $DISTRO_NV Build"
249
    alias: validate_aarch64
250
    # This task is primarily intended to catch human-errors early on, in a
251
    # PR.  Skip it for branch-push, branch-create, and tag-push to improve
252
    # automation reliability/speed in those contexts.  Any missed errors due
253
    # to nonsequential PR merging practices, will be caught on a future PR,
254
    # build or test task failures.
255
    # Docs: ./contrib/cirrus/CIModes.md
256
    only_if: *is_pr
257
    depends_on:
258
        - build_aarch64
259
    ec2_instance: *standard_build_ec2_aarch64
260
    env:
261
        <<: *stdenvars_aarch64
262
        TEST_FLAVOR: validate
263
        DISTRO_NV: ${FEDORA_AARCH64_NAME}
264
    # N/B: This script depends on ${DISTRO_NV} being defined for the task.
265
    clone_script: &get_gosrc_aarch64 |
266
        cd /tmp
267
        echo "$ARTCURL/build_aarch64/repo/repo.tbz"
268
        time $ARTCURL/build_aarch64/repo/repo.tbz
269
        time tar xjf /tmp/repo.tbz -C $GOSRC
270
    setup_script: *setup
271
    main_script: *main
272
    always: *runner_stats
273

274

275
# There are several other important variations of podman which
276
# must always build successfully.  Most of them are handled in
277
# this task, though a few need dedicated tasks which follow.
278
alt_build_task:
279
    name: "$ALT_NAME"
280
    alias: alt_build
281
    # Don't create task for [CI:DOCS], or rhel-release builds
282
    # Docs: ./contrib/cirrus/CIModes.md
283
    only_if: &no_rhel_release |
284
        $CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
285
        $CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
286
    env:
287
        <<: *stdenvars
288
        TEST_FLAVOR: "altbuild"
289
    gce_instance: *standardvm
290
    matrix:
291
      - env:
292
            ALT_NAME: 'Build Each Commit'
293
      - env:
294
            # TODO: Replace with task using `winmake` to build
295
            # binary and archive installation zip file.
296
            ALT_NAME: 'Windows Cross'
297
      - env:
298
            ALT_NAME: 'Alt Arch. x86 Cross'
299
      - env:
300
            ALT_NAME: 'Alt Arch. ARM Cross'
301
      - env:
302
            ALT_NAME: 'Alt Arch. MIPS Cross'
303
      - env:
304
            ALT_NAME: 'Alt Arch. MIPS64 Cross'
305
      - env:
306
            ALT_NAME: 'Alt Arch. Other Cross'
307
    # This task cannot make use of the shared repo.tbz artifact.
308
    clone_script: *full_clone
309
    setup_script: *setup
310
    main_script: *main
311
    # Produce a new repo.tbz artifact for consumption by 'artifacts' task.
312
    repo_prep_script: *repo_prep
313
    repo_artifacts: *repo_artifacts
314
    always: *runner_stats
315

316

317
# Confirm building the remote client, natively on a Mac OS-X VM.
318
osx_alt_build_task:
319
    name: "OSX Cross"
320
    alias: osx_alt_build
321
    # Docs: ./contrib/cirrus/CIModes.md
322
    only_if: *no_rhel_release  # RHEL never releases podman mac installer binary
323
    persistent_worker: &mac_pw
324
        labels:
325
            os: darwin
326
            arch: arm64
327
            purpose: prod
328
    env: &mac_env
329
        CIRRUS_SHELL: "/bin/bash"  # sh is the default
330
        CIRRUS_WORKING_DIR: "$HOME/ci/task-${CIRRUS_TASK_ID}"  # Isolation: $HOME will be set to "ci" dir.
331
        # Prevent cache-pollution fron one task to the next.
332
        GOPATH: "$CIRRUS_WORKING_DIR/.go"
333
        GOCACHE: "$CIRRUS_WORKING_DIR/.go/cache"
334
        GOENV: "$CIRRUS_WORKING_DIR/.go/support"
335
        GOSRC: "$HOME/ci/task-${CIRRUS_TASK_ID}"
336
    clone_script: *full_clone
337
    # This host is/was shared with potentially many other CI tasks.
338
    # The previous task may have been canceled or aborted.
339
    prep_script: &mac_cleanup "contrib/cirrus/mac_cleanup.sh"
340
    lint_script:
341
        - make golangci-lint
342
    basic_build_script:
343
        - make .install.ginkgo
344
        - make podman-remote
345
        - make podman-mac-helper
346
    build_pkginstaller_script:
347
        - pushd contrib/pkginstaller
348
        - make ARCH=amd64 NO_CODESIGN=1 pkginstaller
349
        - make ARCH=aarch64 NO_CODESIGN=1 pkginstaller
350
        - make ARCH=universal NO_CODESIGN=1 pkginstaller
351
        - popd
352
    build_amd64_script:
353
        - make podman-remote-release-darwin_amd64.zip
354
    # Building arm podman needs to be the last thing built in this task
355
    # The Mac tests rely this Podman binary to run, and the CI Mac is ARM-based
356
    build_arm64_script:
357
        - make podman-remote-release-darwin_arm64.zip
358
    # Produce a new repo.tbz artifact for consumption by dependent tasks.
359
    repo_prep_script: *repo_prep
360
    repo_artifacts: *repo_artifacts
361
    # This host is/was shared with potentially many other CI tasks.
362
    # Ensure nothing is left running while waiting for the next task.
363
    always:
364
        task_cleanup_script: *mac_cleanup
365

366

367
# Build freebsd release natively on a FreeBSD VM.
368
freebsd_alt_build_task:
369
    name: "FreeBSD Cross"
370
    alias: freebsd_alt_build
371
    # Only run on 'main' and PRs against 'main'
372
    # Docs: ./contrib/cirrus/CIModes.md
373
    only_if: |
374
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*' &&
375
        ( $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'main' )
376
    env:
377
        <<: *stdenvars
378
        # Functional FreeBSD builds must be built natively since they depend on CGO
379
        DISTRO_NV: freebsd-13
380
        VM_IMAGE_NAME: notyet
381
        CTR_FQIN: notyet
382
        CIRRUS_SHELL: "/bin/sh"
383
        TEST_FLAVOR: "altbuild"
384
        ALT_NAME: 'FreeBSD Cross'
385
    freebsd_instance:
386
        image_family: freebsd-13-3
387
    setup_script:
388
        - pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf
389
    build_amd64_script:
390
        - gmake podman-release
391
    # This task cannot make use of the shared repo.tbz artifact and must
392
    # produce a new repo.tbz artifact for consumption by 'artifacts' task.
393
    repo_prep_script: *repo_prep
394
    repo_artifacts: *repo_artifacts
395

396

397
# Status aggregator for all builds.  This task simply makes dependency
398
# management easier, and results in a simpler graph that using YAML
399
# anchors/aliases.
400
build_success_task:
401
    name: "Total Build Success"
402
    alias: build_success
403
    depends_on:
404
        - build
405
        - validate
406
        - build_aarch64
407
        - validate_aarch64
408
        - alt_build
409
        - osx_alt_build
410
        - freebsd_alt_build
411
    env:
412
        CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
413
    container: &smallcontainer
414
        image: ${CTR_FQIN}
415
        # Resources are limited across ALL currently executing tasks
416
        # ref: https://cirrus-ci.org/guide/linux/#linux-containers
417
        cpu: 1
418
        memory: 1
419
    clone_script:  &noop mkdir -p "$CIRRUS_WORKING_DIR"
420
    script: *noop
421

422

423
# Exercise the "libpod" API with a small set of common
424
# operations to ensure they are functional.
425
bindings_task:
426
    name: "Test Bindings"
427
    alias: bindings
428
    # Don't create task for PRs using [CI:DOCS] or [CI:BUILD]
429
    # Docs: ./contrib/cirrus/CIModes.md
430
    only_if: >-
431
        $CIRRUS_PR != '' &&
432
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
433
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
434
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*'
435
    depends_on: &build
436
        - build_success
437
    gce_instance: *standardvm
438
    env:
439
        <<: *stdenvars
440
        TEST_FLAVOR: bindings
441
    clone_script: *get_gosrc
442
    setup_script: *setup
443
    main_script: *main
444
    always: &logs_artifacts
445
        <<: *runner_stats
446
        # Required for `contrib/cirrus/logformatter` to work properly
447
        html_artifacts:
448
            path: ./*.html
449
            type: text/html
450
        server_log_artifacts:
451
            path: ./podman-server.log
452
            type: text/plain
453
        df_script: '$SCRIPT_BASE/logcollector.sh df'
454
        audit_log_script: '$SCRIPT_BASE/logcollector.sh audit'
455
        journal_script: '$SCRIPT_BASE/logcollector.sh journal'
456
        podman_system_info_script: '$SCRIPT_BASE/logcollector.sh podman'
457
        time_script: '$SCRIPT_BASE/logcollector.sh time'
458

459

460
# Build the "libpod" API documentation `swagger.yaml` and
461
# publish it to google-cloud-storage (GCS).
462
swagger_task:
463
    name: "Test Swagger"
464
    alias: swagger
465
    # Don't create task for [CI:BUILD]
466
    # Docs: ./contrib/cirrus/CIModes.md
467
    only_if: |
468
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
469
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*'
470
    depends_on: *build
471
    gce_instance: *standardvm
472
    env:
473
        <<: *stdenvars
474
        TEST_FLAVOR: swagger
475
        CTR_FQIN: 'quay.io/libpod/gcsupld:${IMAGE_SUFFIX}'
476
        GCPJSON: ENCRYPTED[927dc01e755eaddb4242b0845cf86c9098d1e3dffac38c70aefb1487fd8b4fe6dd6ae627b3bffafaba70e2c63172664e]
477
        GCPNAME: ENCRYPTED[c145e9c16b6fb88d476944a454bf4c1ccc84bb4ecaca73bdd28bdacef0dfa7959ebc8171a27b2e4064d66093b2cdba49]
478
        GCPPROJECT: 'libpod-218412'
479
    clone_script: *get_gosrc
480
    setup_script: *setup
481
    main_script: *main
482
    always:
483
        <<: *runner_stats
484
        swagger_artifacts:
485
            path: ./swagger.yaml
486
            type: text/plain
487

488

489
win_installer_task:
490
    name: "Verify Win Installer Build"
491
    alias: win_installer
492
    only_if:  # RHEL never releases podman windows installer binary
493
      $CIRRUS_TAG == '' &&
494
      $CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
495
      $CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
496
    depends_on: *build
497
    ec2_instance: &windows
498
        image: "${WINDOWS_AMI}"
499
        type: m5.large
500
        region: us-east-1
501
        platform: windows
502
    env: &winenv
503
        CIRRUS_WORKING_DIR: &wincwd "${LOCALAPPDATA}\\cirrus-ci-build"
504
        CIRRUS_SHELL: powershell
505
        PATH: "${PATH};C:\\ProgramData\\chocolatey\\bin"
506
        DISTRO_NV: "windows"
507
        PRIV_NAME: "rootless"
508
        # Fake version, we are only testing the installer functions, so version doesn't matter
509
        WIN_INST_VER: 9.9.9
510
    # It's HIGHLY desireable to use the same binary throughout CI.  Otherwise, if
511
    # there's a toolchain or build-environment specific problem, it can be incredibly
512
    # difficult (and non-obvious) to debug.
513
    clone_script: &winclone |
514
        $ErrorActionPreference = 'Stop'
515
        $ProgressPreference = 'SilentlyContinue'
516
        New-Item -ItemType Directory -Force -Path "$ENV:CIRRUS_WORKING_DIR"
517
        Set-Location "$ENV:CIRRUS_WORKING_DIR"
518
        $uri = "${ENV:ART_URL}/Windows Cross/repo/repo.tbz"
519
        Write-Host "Downloading $uri"
520
        For($i = 0;;) {
521
            Try {
522
                Invoke-WebRequest -UseBasicParsing -ErrorAction Stop -OutFile "repo.tbz2" `
523
                  -Uri "$uri"
524
                Break
525
            } Catch {
526
                if (++$i -gt 6) {
527
                    throw $_.Exception
528
                }
529
                Write-Host "Download failed - retrying:" $_.Exception.Response.StatusCode
530
                Start-Sleep -Seconds 10
531
            }
532
        }
533
        arc unarchive repo.tbz2 .\
534
        if ($LASTEXITCODE -ne 0) {
535
            throw "Unarchive repo.tbz2 failed"
536
            Exit 1
537
        }
538
        Get-ChildItem -Path .\repo
539
    main_script: ".\\repo\\contrib\\cirrus\\win-installer-main.ps1"
540

541

542
# Verify podman is compatible with the docker python-module.
543
docker-py_test_task:
544
    name: Docker-py Compat.
545
    alias: docker-py_test
546
    # Don't create task for tags, branches, or PRs w/ [CI:<magic>]
547
    # N/B: for PRs $CIRRUS_BRANCH == 'pull/<number>'
548
    # Docs: ./contrib/cirrus/CIModes.md
549
    only_if: &not_tag_branch_build_docs_machine >-
550
        $CIRRUS_PR != '' &&
551
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
552
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
553
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*'
554
    depends_on: *build
555
    gce_instance: *standardvm
556
    env:
557
        <<: *stdenvars
558
        TEST_FLAVOR: docker-py
559
        TEST_ENVIRON: container
560
    clone_script: *get_gosrc
561
    setup_script: *setup
562
    main_script: *main
563
    always: *runner_stats
564

565

566
# Does exactly what it says, execute the podman unit-tests on Fedora.
567
unit_test_task:
568
    name: "Unit tests on $DISTRO_NV"
569
    alias: unit_test
570
    # Docs: ./contrib/cirrus/CIModes.md
571
    only_if: *not_tag_branch_build_docs_machine
572
    depends_on: *build
573
    matrix:
574
        - env: *stdenvars
575
        # Special-case: Rootless on latest Fedora (standard) VM
576
        - name: "Rootless unit on $DISTRO_NV"
577
          env:
578
              <<: *stdenvars
579
              PRIV_NAME: rootless
580
    gce_instance: *standardvm
581
    env:
582
        TEST_FLAVOR: unit
583
    clone_script: *get_gosrc
584
    setup_script: *setup
585
    main_script: *main
586
    always: *logs_artifacts
587

588

589
apiv2_test_task:
590
    name: "APIv2 test on $DISTRO_NV ($PRIV_NAME)"
591
    alias: apiv2_test
592
    # Docs: ./contrib/cirrus/CIModes.md
593
    only_if: *not_tag_branch_build_docs_machine
594
    depends_on: *build
595
    gce_instance: *standardvm
596
    # Test is normally pretty quick, about 10-minutes.  If it hangs,
597
    # don't make developers wait the full 1-hour timeout.
598
    timeout_in: 20m
599
    env:
600
        <<: *stdenvars
601
        TEST_FLAVOR: apiv2
602
    matrix:
603
      - env:
604
          PRIV_NAME: root
605
      - env:
606
          PRIV_NAME: rootless
607
    clone_script: *get_gosrc
608
    setup_script: *setup
609
    main_script: *main
610
    always: *logs_artifacts
611

612

613
compose_test_task:
614
    name: "$TEST_FLAVOR test on $DISTRO_NV ($PRIV_NAME)"
615
    alias: compose_test
616
    # Docs: ./contrib/cirrus/CIModes.md
617
    only_if: *not_tag_branch_build_docs_machine
618
    depends_on: *build
619
    gce_instance: *standardvm
620
    matrix:
621
      - env:
622
            PRIV_NAME: root
623
      - env:
624
            PRIV_NAME: rootless
625
    env:
626
        <<: *stdenvars
627
        TEST_FLAVOR: compose_v2
628
    clone_script: *get_gosrc
629
    setup_script: *setup
630
    main_script: *main
631
    always: *logs_artifacts
632

633

634
# versions, as root, without involving the podman-remote client.
635
local_integration_test_task: &local_integration_test_task
636
    # Integration-test task name convention:
637
    # <int.|sys.> <podman|remote> <Distro NV> <root|rootless>
638
    name: &std_name_fmt "$TEST_FLAVOR $PODBIN_NAME $DISTRO_NV $PRIV_NAME $TEST_ENVIRON ${CI_DESIRED_DATABASE}"
639
    alias: local_integration_test
640
    # Docs: ./contrib/cirrus/CIModes.md
641
    only_if: *not_tag_branch_build_docs_machine
642
    depends_on: *build
643
    matrix: *platform_axis
644
    gce_instance: *standardvm
645
    timeout_in: 50m
646
    env:
647
        TEST_FLAVOR: int
648
    clone_script: *get_gosrc
649
    setup_script: *setup
650
    main_script: *main
651
    always: &int_logs_artifacts
652
        <<: *logs_artifacts
653
        ginkgo_node_logs_artifacts:
654
            path: ./test/e2e/ginkgo-node-*.log
655
            type: text/plain
656
        ginkgo_json_artifacts:
657
            path: ./ginkgo-e2e.json
658
            type: application/json
659

660

661
# Nearly identical to `local_integration_test` except all operations
662
# are performed through the podman-remote client vs a podman "server"
663
# running on the same host.
664
remote_integration_test_task:
665
    <<: *local_integration_test_task
666
    alias: remote_integration_test
667
    env:
668
        TEST_FLAVOR: int
669
        PODBIN_NAME: remote
670

671

672
# Run the complete set of integration tests from inside a container.
673
# This verifies all/most operations function with "podman-in-podman".
674
container_integration_test_task:
675
    name: *std_name_fmt
676
    alias: container_integration_test
677
    # Docs: ./contrib/cirrus/CIModes.md
678
    only_if: *not_tag_branch_build_docs_machine
679
    depends_on: *build
680
    matrix: &fedora_vm_axis
681
        - env:
682
              DISTRO_NV: ${FEDORA_NAME}
683
              VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
684
              CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
685
              CI_DESIRED_RUNTIME: crun
686
        - env:
687
              DISTRO_NV: ${PRIOR_FEDORA_NAME}
688
              VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
689
              CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
690
              CI_DESIRED_RUNTIME: crun
691
              CI_DESIRED_DATABASE: boltdb
692
    gce_instance: *standardvm
693
    timeout_in: 50m
694
    env:
695
        TEST_FLAVOR: int
696
        TEST_ENVIRON: container
697
    clone_script: *get_gosrc
698
    setup_script: *setup
699
    main_script: *main
700
    always: *int_logs_artifacts
701

702

703
# Execute most integration tests as a regular (non-root) user.
704
rootless_integration_test_task:
705
    name: *std_name_fmt
706
    alias: rootless_integration_test
707
    # Docs: ./contrib/cirrus/CIModes.md
708
    only_if: *not_tag_branch_build_docs_machine
709
    depends_on: *build
710
    matrix: *platform_axis
711
    gce_instance: *standardvm
712
    timeout_in: 50m
713
    env:
714
        TEST_FLAVOR: int
715
        PRIV_NAME: rootless
716
    clone_script: *get_gosrc
717
    setup_script: *setup
718
    main_script: *main
719
    always: *int_logs_artifacts
720

721

722
podman_machine_task:
723
    name: *std_name_fmt
724
    alias: podman_machine
725
    # Only run for PRs and never [CI:DOCS] or [CI:BUILD]
726
    # Docs: ./contrib/cirrus/CIModes.md
727
    only_if: &machine_cron_not_tag_build_docs >-
728
        ($CIRRUS_PR != '' &&
729
         $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
730
         $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*'
731
        ) || $CIRRUS_CRON == "main"
732
    depends_on: *build
733
    ec2_instance:
734
        image: "${VM_IMAGE_NAME}"
735
        type: "${EC2_INST_TYPE}"
736
        region: us-east-1
737
    env:
738
      EC2_INST_TYPE: "m5zn.metal"  # Bare-metal instance is required
739
      TEST_FLAVOR: "machine-linux"
740
      PRIV_NAME: "rootless"  # intended use-case
741
      DISTRO_NV: "${FEDORA_NAME}"
742
      VM_IMAGE_NAME: "${FEDORA_AMI}"
743
    clone_script: *get_gosrc
744
    setup_script: *setup
745
    main_script: *main
746
    always: *int_logs_artifacts
747

748

749
podman_machine_aarch64_task:
750
    name: *std_name_fmt
751
    alias: podman_machine_aarch64
752
    only_if: *machine_cron_not_tag_build_docs
753
    depends_on: *build
754
    ec2_instance:
755
        <<: *standard_build_ec2_aarch64
756
    env:
757
        TEST_FLAVOR: "machine-linux"
758
        EC2_INST_TYPE: c6g.metal
759
        PRIV_NAME: "rootless"  # intended use-case
760
        DISTRO_NV: "${FEDORA_AARCH64_NAME}"
761
        VM_IMAGE_NAME: "${FEDORA_AARCH64_AMI}"
762
    clone_script: *get_gosrc_aarch64
763
    setup_script: *setup
764
    main_script: *main
765
    always: *int_logs_artifacts
766

767

768
podman_machine_windows_task:
769
    name: *std_name_fmt
770
    alias: podman_machine_windows
771
    # Only run for non-docs/copr PRs and non-release branch builds
772
    # and never for tags.  Docs: ./contrib/cirrus/CIModes.md
773
    only_if: *machine_cron_not_tag_build_docs
774
    depends_on: *build
775
    ec2_instance:
776
        <<: *windows
777
        type: m5zn.metal
778
        platform: windows
779
    env: *winenv
780
    matrix:
781
      - env:
782
          TEST_FLAVOR: "machine-wsl"
783
      - env:
784
          TEST_FLAVOR: "machine-hyperv"
785
    clone_script: *winclone
786
    main_script: ".\\repo\\contrib\\cirrus\\win-podman-machine-main.ps1"
787
    always:
788
        # Required for `contrib/cirrus/logformatter` to work properly
789
        html_artifacts:
790
            path: ./*.html
791
            type: text/html
792

793

794
podman_machine_mac_task:
795
    name: *std_name_fmt
796
    alias: podman_machine_mac
797
    only_if: *machine_cron_not_tag_build_docs
798
    depends_on: *build
799
    persistent_worker: *mac_pw
800
    env:
801
        <<: *mac_env
802
        # Consumed by podman-machine ginkgo tests
803
        CONTAINERS_MACHINE_PROVIDER: "applehv"
804
        # TODO: Should not require a special image, for now it does.
805
        # Simply remove the line below when a mac image is GA.
806
        # MACHINE_IMAGE: "https://fedorapeople.org/groups/podman/testing/applehv/arm64/fedora-coreos-38.20230925.dev.0-applehv.aarch64.raw.gz"
807
        # Values necessary to populate std_name_fmt alias
808
        TEST_FLAVOR: "machine-mac"
809
        DISTRO_NV: "darwin"
810
        PRIV_NAME: "rootless"  # intended use-case
811
    clone_script:  # artifacts from osx_alt_build_task
812
        - mkdir -p $CIRRUS_WORKING_DIR
813
        - cd $CIRRUS_WORKING_DIR
814
        - $ARTCURL/OSX%20Cross/repo/repo.tbz
815
        - tar xjf repo.tbz
816
    # This host is/was shared with potentially many other CI tasks.
817
    # The previous task may have been canceled or aborted.
818
    prep_script: *mac_cleanup
819
    setup_script: "contrib/cirrus/mac_setup.sh"
820
    env_script: "contrib/cirrus/mac_env.sh"
821
    # TODO: Timeout bumped b/c initial image download (~5min) and VM
822
    #       resize (~2min) causes test-timeout (90s default).  Should
823
    #       tests deal with this internally?
824
    test_script:
825
        - "contrib/cirrus/mac_runner.sh"
826
    # This host is/was shared with potentially many other CI tasks.
827
    # Ensure nothing is left running while waiting for the next task.
828
    always:
829
        # Required for `contrib/cirrus/logformatter` to work properly
830
        html_artifacts:
831
            path: ./*.html
832
            type: text/html
833
        task_cleanup_script: *mac_cleanup
834

835

836
# Always run subsequent to integration tests.  While parallelism is lost
837
# with runtime, debugging system-test failures can be more challenging
838
# for some golang developers.  Otherwise the following tasks run across
839
# the same matrix as the integration-tests (above).
840
local_system_test_task: &local_system_test_task
841
    name: *std_name_fmt
842
    alias: local_system_test
843
    # Don't create task for tags, or if using [CI:*] magic
844
    # Docs: ./contrib/cirrus/CIModes.md
845
    only_if: &not_tag_magic >-
846
        $CIRRUS_TAG == '' &&
847
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
848
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
849
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*'
850
    depends_on: *build
851
    matrix: *platform_axis
852
    gce_instance: *standardvm
853
    env:
854
        TEST_FLAVOR: sys
855
    clone_script: *get_gosrc
856
    setup_script: *setup
857
    main_script: *main
858
    always: *logs_artifacts
859

860

861
local_system_test_aarch64_task: &local_system_test_task_aarch64
862
    name: *std_name_fmt
863
    alias: local_system_test_aarch64
864
    # Don't create task for tags, or if using [CI:DOCS], [CI:BUILD]
865
    # Docs: ./contrib/cirrus/CIModes.md
866
    only_if: *not_tag_magic
867
    depends_on: *build
868
    persistent_worker: *mac_pw
869
    ec2_instance: *standard_build_ec2_aarch64
870
    env:
871
        <<: *stdenvars_aarch64
872
        TEST_FLAVOR: sys
873
        DISTRO_NV: ${FEDORA_AARCH64_NAME}
874
    clone_script: *get_gosrc_aarch64
875
    setup_script: *setup
876
    main_script: *main
877
    always: *logs_artifacts
878

879

880
remote_system_test_task:
881
    <<: *local_system_test_task
882
    alias: remote_system_test
883
    env:
884
        TEST_FLAVOR: sys
885
        PODBIN_NAME: remote
886

887

888
remote_system_test_aarch64_task:
889
    <<: *local_system_test_task_aarch64
890
    alias: remote_system_test_aarch64
891
    env:
892
        TEST_FLAVOR: sys
893
        PODBIN_NAME: remote
894

895

896
rootless_remote_system_test_task:
897
    matrix:
898
        # Minimal sanity testing: only the latest Fedora
899
        - env:
900
              DISTRO_NV: ${FEDORA_NAME}
901
              # Not used here, is used in other tasks
902
              VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
903
              CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
904
              CI_DESIRED_RUNTIME: crun
905
    <<: *local_system_test_task
906
    alias: rootless_remote_system_test
907
    gce_instance: *standardvm
908
    env:
909
        TEST_FLAVOR: sys
910
        PODBIN_NAME: remote
911
        PRIV_NAME: rootless
912

913

914
rootless_system_test_task:
915
    name: *std_name_fmt
916
    alias: rootless_system_test
917
    # Docs: ./contrib/cirrus/CIModes.md
918
    only_if: *not_tag_magic
919
    depends_on: *build
920
    matrix: *platform_axis
921
    gce_instance: *standardvm
922
    env:
923
        TEST_FLAVOR: sys
924
        PRIV_NAME: rootless
925
    clone_script: *get_gosrc
926
    setup_script: *setup
927
    main_script: *main
928
    always: *logs_artifacts
929

930

931
minikube_test_task:
932
    name: *std_name_fmt
933
    alias: minikube_test
934
    # Docs: ./contrib/cirrus/CIModes.md
935
    only_if: *not_tag_magic
936
    depends_on: *build
937
    gce_instance: *standardvm
938
    env:
939
        <<: *stdenvars
940
        TEST_FLAVOR: minikube
941
        PRIV_NAME: rootless
942
    clone_script: *get_gosrc
943
    setup_script: *setup
944
    main_script: *main
945
    always: *logs_artifacts
946

947
farm_test_task:
948
    name: *std_name_fmt
949
    alias: farm_test
950
    # Docs: ./contrib/cirrus/CIModes.md
951
    only_if: *not_tag_magic
952
    depends_on: *build
953
    gce_instance: *standardvm
954
    env:
955
        <<: *stdenvars
956
        TEST_FLAVOR: farm
957
        PRIV_NAME: rootless
958
    clone_script: *get_gosrc
959
    setup_script: *setup
960
    main_script: *main
961
    always: *logs_artifacts
962

963
buildah_bud_test_task:
964
    name: *std_name_fmt
965
    alias: buildah_bud_test
966
    # Docs: ./contrib/cirrus/CIModes.md
967
    only_if: *not_tag_magic
968
    depends_on: *build
969
    env:
970
        <<: *stdenvars
971
        TEST_FLAVOR: bud
972
    matrix:
973
        - env:
974
            PODBIN_NAME: podman
975
        - env:
976
            PODBIN_NAME: remote
977
    gce_instance: *standardvm
978
    timeout_in: 45m
979
    clone_script: *get_gosrc
980
    setup_script: *setup
981
    main_script: *main
982
    always: *int_logs_artifacts
983

984
upgrade_test_task:
985
    name: "Upgrade test: from $PODMAN_UPGRADE_FROM"
986
    alias: upgrade_test
987
    # Docs: ./contrib/cirrus/CIModes.md
988
    only_if: *not_tag_magic
989
    depends_on: *build
990
    matrix:
991
        - env:
992
              # 2024-02: as long as possible/reasonable, try to keep
993
              #   one version < 4.8 so we can test boltdb. v4.3.1 is
994
              #   the lowest we can go right now, builds before that
995
              #   have netavark <1.4 which hangs on f39 kernel (#21863).
996
              PODMAN_UPGRADE_FROM: v4.3.1
997
        - env:
998
              PODMAN_UPGRADE_FROM: v4.8.0
999
    gce_instance: *standardvm
1000
    env:
1001
        TEST_FLAVOR: upgrade_test
1002
        DISTRO_NV: ${FEDORA_NAME}
1003
        VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
1004
        # Never force a DB, let the old version decide its default
1005
        CI_DESIRED_DATABASE:
1006
    clone_script: *get_gosrc
1007
    setup_script: *setup
1008
    main_script: *main
1009
    always: *logs_artifacts
1010

1011

1012
# This task is critical.  It updates the "last-used by" timestamp stored
1013
# in metadata for all VM images.  This mechanism functions in tandem with
1014
# an out-of-band pruning operation to remove disused VM images.
1015
meta_task:
1016
    name: "VM img. keepalive"
1017
    alias: meta
1018
    container:
1019
        cpu: 2
1020
        memory: 2
1021
        image: quay.io/libpod/imgts:latest
1022
    env:
1023
        # Space-separated list of images used by this repository state
1024
        IMGNAMES: >-
1025
            ${FEDORA_CACHE_IMAGE_NAME}
1026
            ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
1027
            ${RAWHIDE_CACHE_IMAGE_NAME}
1028
            ${DEBIAN_CACHE_IMAGE_NAME}
1029
        EC2IMGNAMES: >-
1030
          ${FEDORA_AARCH64_AMI}
1031
          ${FEDORA_AMI}
1032
          ${WINDOWS_AMI}
1033
        BUILDID: "${CIRRUS_BUILD_ID}"
1034
        REPOREF: "${CIRRUS_REPO_NAME}"
1035
        AWSINI: ENCRYPTED[21b2db557171b11eb5abdbccae593f48c9caeba86dfcc4d4ff109edee9b4656ab6720a110dadfcd51e88cc59a71cc7af]
1036
        GCPJSON: ENCRYPTED[3a198350077849c8df14b723c0f4c9fece9ebe6408d35982e7adf2105a33f8e0e166ed3ed614875a0887e1af2b8775f4]
1037
        GCPNAME: ENCRYPTED[2f9738ef295a706f66a13891b40e8eaa92a89e0e87faf8bed66c41eca72bf76cfd190a6f2d0e8444c631fdf15ed32ef6]
1038
        GCPPROJECT: libpod-218412
1039
    clone_script: *noop
1040
    script: /usr/local/bin/entrypoint.sh
1041

1042

1043
# Status aggregator for all tests.  This task ensures a defined set of tasks
1044
# all passed, and allows confirming that based on the status of this task.
1045
success_task:
1046
    # N/B: The prow merge-bot (tide) is sensitized to this exact name, DO NOT CHANGE IT.
1047
    # Ref: https://github.com/openshift/release/pull/48855
1048
    name: "Total Success"
1049
    alias: success
1050
    # N/B: ALL tasks must be listed here, minus their '_task' suffix.
1051
    depends_on:
1052
        - build_success
1053
        - bindings
1054
        - swagger
1055
        - win_installer
1056
        - docker-py_test
1057
        - unit_test
1058
        - apiv2_test
1059
        - compose_test
1060
        - local_integration_test
1061
        - remote_integration_test
1062
        - container_integration_test
1063
        - rootless_integration_test
1064
        - podman_machine
1065
        - podman_machine_aarch64
1066
        - podman_machine_windows
1067
        - podman_machine_mac
1068
        - local_system_test
1069
        - local_system_test_aarch64
1070
        - remote_system_test
1071
        - remote_system_test_aarch64
1072
        - rootless_remote_system_test
1073
        - rootless_system_test
1074
        - local_system_test
1075
        - local_system_test_aarch64
1076
        - remote_system_test
1077
        - rootless_remote_system_test
1078
        - rootless_system_test
1079
        - minikube_test
1080
        - farm_test
1081
        - buildah_bud_test
1082
        - upgrade_test
1083
        - meta
1084
    env:
1085
        CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
1086
    container: *smallcontainer
1087
    clone_script: *noop
1088
    script: |
1089
        if [[ "$CIRRUS_CHANGE_TITLE" =~ CI:MACHINE ]] && [[ -n "$CIRRUS_PR" ]]; then
1090
            echo "Error: Risk of untested change merge."
1091
            echo "Please remove [CI:MACHINE] from title."
1092
            exit 1
1093
        fi
1094

1095
# WARNING: Most of the artifacts captured here are also have their
1096
# permalinks present in the `DOWNLOADS.md` file.  Any changes made
1097
# here, should probably be reflected in that document.
1098
artifacts_task:
1099
    name: "Artifacts"
1100
    alias: artifacts
1101
    # Docs: ./contrib/cirrus/CIModes.md
1102
    only_if: >-
1103
        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
1104
        $CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
1105
        $CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
1106
    depends_on:
1107
        - success
1108
    # This task is a secondary/convenience for downstream consumers, don't
1109
    # block development progress if there is a failure in a PR, only break
1110
    # when running on branches or tags.
1111
    allow_failures: $CIRRUS_PR != ''
1112
    container: *smallcontainer
1113
    env:
1114
        CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
1115
        TEST_ENVIRON: container
1116
    # In order to keep the download URL and Cirrus-CI artifact.zip contents
1117
    # simple, nothing should exist in $CIRRUS_WORKING_DIR except for artifacts.
1118
    clone_script: *noop
1119
    fedora_binaries_script:
1120
        - mkdir -p /tmp/fed
1121
        - cd /tmp/fed
1122
        - $ARTCURL/Build%20for%20${FEDORA_NAME}/repo/repo.tbz
1123
        - tar xjf repo.tbz
1124
        - cp ./bin/* $CIRRUS_WORKING_DIR/
1125
    alt_binaries_intel_script:
1126
        - mkdir -p /tmp/alt
1127
        - cd /tmp/alt
1128
        - $ARTCURL/Alt%20Arch.%20x86%20Cross/repo/repo.tbz
1129
        - tar xjf repo.tbz
1130
        - mv ./*.tar.gz $CIRRUS_WORKING_DIR/
1131
    alt_binaries_arm_script:
1132
        - mkdir -p /tmp/alt
1133
        - cd /tmp/alt
1134
        - $ARTCURL/Alt%20Arch.%20ARM%20Cross/repo/repo.tbz
1135
        - tar xjf repo.tbz
1136
        - mv ./*.tar.gz $CIRRUS_WORKING_DIR/
1137
    alt_binaries_mips_script:
1138
        - mkdir -p /tmp/alt
1139
        - cd /tmp/alt
1140
        - $ARTCURL/Alt%20Arch.%20MIPS%20Cross/repo/repo.tbz
1141
        - tar xjf repo.tbz
1142
        - mv ./*.tar.gz $CIRRUS_WORKING_DIR/
1143
    alt_binaries_mips64_script:
1144
        - mkdir -p /tmp/alt
1145
        - cd /tmp/alt
1146
        - $ARTCURL/Alt%20Arch.%20MIPS64%20Cross/repo/repo.tbz
1147
        - tar xjf repo.tbz
1148
        - mv ./*.tar.gz $CIRRUS_WORKING_DIR/
1149
    alt_binaries_other_script:
1150
        - mkdir -p /tmp/alt
1151
        - cd /tmp/alt
1152
        - $ARTCURL/Alt%20Arch.%20Other%20Cross/repo/repo.tbz
1153
        - tar xjf repo.tbz
1154
        - mv ./*.tar.gz $CIRRUS_WORKING_DIR/
1155
    win_binaries_script:
1156
        - mkdir -p /tmp/win
1157
        - cd /tmp/win
1158
        - $ARTCURL/Windows%20Cross/repo/repo.tbz
1159
        - tar xjf repo.tbz
1160
        - mv ./podman-remote*.zip $CIRRUS_WORKING_DIR/
1161
    osx_binaries_script:
1162
        - mkdir -p /tmp/osx
1163
        - cd /tmp/osx
1164
        - $ARTCURL/OSX%20Cross/repo/repo.tbz
1165
        - tar xjf repo.tbz
1166
        - mv ./podman-remote-release-darwin_*.zip $CIRRUS_WORKING_DIR/
1167
        - mv ./contrib/pkginstaller/out/podman-installer-macos-*.pkg $CIRRUS_WORKING_DIR/
1168
    always:
1169
      contents_script: ls -la $CIRRUS_WORKING_DIR
1170
      # Produce downloadable files and an automatic zip-file accessible
1171
      # by a consistent URL, based on contents of $CIRRUS_WORKING_DIR
1172
      # Ref: https://cirrus-ci.org/guide/writing-tasks/#latest-build-artifacts
1173
      binary_artifacts:
1174
          path: ./*
1175
          type: application/octet-stream
1176

1177

1178
# When a new tag is pushed, confirm that the code and commits
1179
# meet criteria for an official release.
1180
release_task:
1181
    name: "Verify Release"
1182
    alias: release
1183
    # This should _only_ run for new tags
1184
    # Docs: ./contrib/cirrus/CIModes.md
1185
    only_if: $CIRRUS_TAG != ''
1186
    depends_on:
1187
        - build_success
1188
        - success
1189
    gce_instance: *standardvm
1190
    env:
1191
        <<: *stdenvars
1192
        TEST_FLAVOR: release
1193
    clone_script: *get_gosrc
1194
    setup_script: *setup
1195
    main_script: *main
1196

1197

1198
# When preparing to release a new version, this task may be manually
1199
# activated at the PR stage to verify the build is proper for a potential
1200
# podman release.
1201
#
1202
# Note: This cannot use a YAML alias on 'release_task' as of this
1203
# comment, it is incompatible with 'trigger_type: manual'
1204
release_test_task:
1205
    name: "Optional Release Test"
1206
    alias: release_test
1207
    # Release-PRs always include "release" or "Bump" in the title
1208
    # Docs: ./contrib/cirrus/CIModes.md
1209
    only_if: $CIRRUS_CHANGE_TITLE =~ '.*((release)|(bump)).*'
1210
    # Allow running manually only as part of release-related builds
1211
    # see RELEASE_PROCESS.md
1212
    trigger_type: manual
1213
    depends_on:
1214
        - build_success
1215
        - success
1216
    gce_instance: *standardvm
1217
    env:
1218
        <<: *stdenvars
1219
        TEST_FLAVOR: release
1220
    clone_script: *get_gosrc
1221
    setup_script: *setup
1222
    main_script: *main
1223

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.