22
22
# directory where the images will be placed
23
23
OUTDIR : " outdir"
24
24
25
- HOME : /root
26
25
CIRRUS_WORKING_DIR : /var/tmp/podman-machine-os
27
26
27
+ # Vars used for the macos and windows testing
28
+ MACHINE_IMAGE_URL : " https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/Image Build ${ARCH}/image/${MACHINE_IMAGE}"
29
+ PODMAN_VERSION : 5.3.0
30
+
31
+ gcp_credentials : ENCRYPTED[b06ef3490b73469d9da1402568d6f3e46a852955a4ab0807689d50352ecf2852cb5903e8d3b7603eaab9d1c7c7d851a5]
32
+
28
33
aws_credentials : ENCRYPTED[b01991b35fe3f81eed974cf47b5541ed518eacfee4e430e9fb50fba31090f557ea86b0b79b5f5b4a712218206e0f3f58]
29
34
30
35
# Default timeout
@@ -37,6 +42,8 @@ image_build_task:
37
42
image : " ${VM_IMAGE}"
38
43
type : " ${EC2_INST_TYPE}"
39
44
region : us-east-1
45
+ env :
46
+ HOME : /root
40
47
matrix :
41
48
- env :
42
49
ARCH : " x86_64"
@@ -58,7 +65,7 @@ image_build_task:
58
65
type : application/octet-stream
59
66
60
67
verify_windows_task :
61
- name : " Verify HyperV "
68
+ name : " Verify hyperv "
62
69
alias : " verify_windows"
63
70
depends_on :
64
71
- image_build
@@ -73,23 +80,69 @@ verify_windows_task:
73
80
CIRRUS_SHELL : powershell
74
81
PATH : " ${PATH};C:\\ Program Files\\ RedHat\\ Podman"
75
82
MACHINE_IMAGE : " podman-machine.${ARCH}.hyperv.vhdx.zst"
76
- MACHINE_IMAGE_URL : " https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/Image Build ${ARCH}/image/${MACHINE_IMAGE}"
77
- PODMAN_VERSION : 5.3.0
78
83
setup_script : .\contrib\cirrus\windows_setup.ps1
79
84
main_script : |
80
85
$Env:CONTAINERS_MACHINE_PROVIDER = "hyperv"
81
86
$Env:MACHINE_IMAGE_PATH="..\${ENV:MACHINE_IMAGE}"
82
- .\bin\ginkgo .\verify
87
+ .\bin\ginkgo -v .\verify
83
88
if ( ($LASTEXITCODE -ne $null) -and ($LASTEXITCODE -ne 0) ) {
84
89
throw "Exit code = '$LASTEXITCODE' running ginkgo"
85
90
}
86
91
92
+ verify_macos_task :
93
+ name : " Verify $CONTAINERS_MACHINE_PROVIDER"
94
+ alias : " verify_macos"
95
+ depends_on :
96
+ - image_build
97
+ persistent_worker : &mac_pw
98
+ labels :
99
+ os : darwin
100
+ arch : arm64
101
+ purpose : prod
102
+ env : &mac_env
103
+ ARCH : " aarch64"
104
+ CIRRUS_SHELL : " /bin/bash" # sh is the default
105
+ CIRRUS_WORKING_DIR : " $HOME/ci/task-${CIRRUS_TASK_ID}" # Isolation: $HOME will be set to "ci" dir.
106
+ # Prevent cache-pollution fron one task to the next.
107
+ GOPATH : " $CIRRUS_WORKING_DIR/.go"
108
+ GOCACHE : " $CIRRUS_WORKING_DIR/.go/cache"
109
+ GOENV : " $CIRRUS_WORKING_DIR/.go/support"
110
+ GOSRC : " $HOME/ci/task-${CIRRUS_TASK_ID}"
111
+ MACHINE_IMAGE : " podman-machine.${ARCH}.applehv.raw.zst"
112
+ matrix :
113
+ - env :
114
+ CONTAINERS_MACHINE_PROVIDER : applehv
115
+ - env :
116
+ CONTAINERS_MACHINE_PROVIDER : libkrun
117
+
118
+ prep_script : &mac_cleanup "contrib/cirrus/mac_cleanup.sh"
119
+ setup_script : |
120
+ # curl does not accept URL with spaces, we need to URL encode (string replace with %20)
121
+ MACHINE_IMAGE_URL="${MACHINE_IMAGE_URL// /%20}"
122
+ curl --retry 5 --retry-delay 8 --fail --location -O --url "${MACHINE_IMAGE_URL}"
123
+ git clone --depth 1 --branch v${PODMAN_VERSION} https://github.com/containers/podman.git
124
+ make -C podman podman-remote
125
+ ./podman/bin/darwin/podman --version
126
+ mkdir bin
127
+ cd verify
128
+ go build -o ../bin/ginkgo ./vendor/github.com/onsi/ginkgo/v2/ginkgo
129
+ main_script : |
130
+ export MACHINE_IMAGE_PATH="../${MACHINE_IMAGE}"
131
+ export PODMAN_BINARY=../podman/bin/darwin/podman
132
+ ./bin/ginkgo -v ./verify
133
+
134
+ # This host is/was shared with potentially many other CI tasks.
135
+ # Ensure nothing is left running while waiting for the next task.
136
+ always :
137
+ task_cleanup_script : *mac_cleanup
138
+
87
139
test_task :
88
140
name : " Total Success"
89
141
alias : success
90
142
depends_on :
91
143
- image_build
92
144
- verify_windows
145
+ - verify_macos
93
146
container :
94
147
image : " ${FEDORA_CONTAINER_FQIN}"
95
148
cpu : 1
0 commit comments