6
6
- main
7
7
workflow_dispatch :
8
8
inputs :
9
- fork :
10
- default : ' podman-desktop'
11
- description : ' Podman Desktop repo fork'
12
- type : string
13
- required : true
14
- branch :
15
- default : ' main'
16
- description : ' Podman Desktop repo branch'
9
+ pd_repo_options :
10
+ default : ' REPO=podman-desktop,FORK=podman-desktop,BRANCH=main'
11
+ description : ' Podman Desktop Extension repo, fork and branch'
17
12
type : string
18
13
required : true
19
14
ext_repo_options :
20
- default : ' REPO=podman-desktop-redhat-account-ext,FORK=redhat-developer,BRANCH=main'
15
+ default : ' REPO=podman-desktop-redhat-account-ext,FORK=redhat-developer,BRANCH=main,TESTS=1 '
21
16
description : ' Podman Desktop Extension repo, fork and branch'
22
17
type : string
23
18
required : true
24
- ext_tests :
25
- default : ' 1'
26
- description : ' Run E2E tests from extension'
27
- type : string
28
- required : true
29
19
npm_target :
30
- default : ' test:e2e'
20
+ default : ' test:e2e:run '
31
21
description : ' npm target to run tests'
32
22
type : string
33
23
required : true
34
24
podman_remote_url :
35
- default : ' https://github.com/containers/podman/releases/download/v5.3.1 /podman-5.3.1 -setup.exe'
36
- description : ' podman setup exe'
25
+ default : ' https://github.com/containers/podman/releases/download/v5.4.0 /podman-5.4.0 -setup.exe'
26
+ description : ' podman latest released version exe'
37
27
type : string
38
28
required : true
29
+ podman_desktop_url :
30
+ description : ' podman desktop testing-prerelease setup-exe url'
31
+ type : string
32
+ required : false
39
33
podman_options :
40
34
default : ' INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
41
35
description : ' Podman machine configuration options, no spaces'
42
36
type : ' string'
43
37
required : true
38
+ podman_provider :
39
+ type : choice
40
+ description : ' Podman virtualization provider, default is wsl, alternative hyperv'
41
+ options :
42
+ - wsl
43
+ - hyperv
44
+ required : true
44
45
env_vars :
45
- default : ' TEST_PODMAN_MACHINE =true'
46
+ default : ' ELECTRON_ENABLE_INSPECT =true'
46
47
description : ' Env. Variables passed into target machine, ie: VAR1=xxx,VAR2=true,VAR3=15,VAR4="Pass me along"'
47
48
type : ' string'
48
- required : true
49
- podman_provider :
50
- default : ' wsl'
51
- description : ' Podman virtualization provider'
52
- type : ' string'
53
- required : true
49
+ required : false
54
50
images_version :
55
51
default : ' BUILDER="v0.0.3",PODMAN="v0.0.3",RUNNER="v0.0.3"'
56
52
description : ' Testing images versions, no spaces'
62
58
name : windows-${{ matrix.windows-version }}-${{ matrix.windows-featurepack }}
63
59
runs-on : ubuntu-latest
64
60
env :
65
- MAPT_VERSION : v0.7.3
61
+ MAPT_VERSION : v0.8.0
66
62
MAPT_IMAGE : quay.io/redhat-developer/mapt
67
63
strategy :
68
64
fail-fast : false
@@ -73,30 +69,55 @@ jobs:
73
69
steps :
74
70
- name : Get Podman version used by Desktop
75
71
run : |
76
- version=$(curl https://raw.githubusercontent.com/containers /podman-desktop/main/extensions/podman/packages/extension/src/podman5.json | jq -r '.version')
72
+ version=$(curl https://raw.githubusercontent.com/podman-desktop /podman-desktop/main/extensions/podman/packages/extension/src/podman5.json | jq -r '.version')
77
73
echo "Default Podman Version from Podman Desktop: ${version}"
78
74
echo "PD_PODMAN_VERSION=${version}" >> $GITHUB_ENV
75
+
76
+ - name : Get Latest Podman Desktop testing prerelease
77
+ env :
78
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79
+ run : |
80
+ tag=$(curl --request GET \
81
+ -H "Accept: application/vnd.github+json" \
82
+ -H "Authorization: Bearer ${{ env.GH_TOKEN }}" \
83
+ -H "X-GitHub-Api-Version: 2022-11-28" \
84
+ "https://api.github.com/repos/podman-desktop/testing-prereleases/tags?pages=1" | jq -r '.[0].name')
85
+ echo "Tag: $tag"
86
+ # releaes id
87
+ id=$(curl --request GET \
88
+ -H "Accept: application/vnd.github+json" \
89
+ -H "Authorization: Bearer ${{ env.GH_TOKEN }}" \
90
+ -H "X-GitHub-Api-Version: 2022-11-28" \
91
+ "https://api.github.com/repos/podman-desktop/testing-prereleases/releases/tags/$tag" | jq -r '.id')
92
+ echo "Release ID: $id"
93
+ # list assets with setup-x64.exe suffix
94
+ url=$(curl --request GET \
95
+ -H "Accept: application/vnd.github+json" \
96
+ -H "Authorization: Bearer ${{ env.GH_TOKEN }}" \
97
+ -H "X-GitHub-Api-Version: 2022-11-28" \
98
+ "https://api.github.com/repos/podman-desktop/testing-prereleases/releases/$id/assets" | jq -r '.[] | select (.name | test("setup-x64.exe$"))' | jq -r '.browser_download_url')
99
+ echo "Podman Desktop testing prerelease url: ${url}"
100
+ echo "DEFAULT_PD_URL=${url}" >> $GITHUB_ENV
101
+
79
102
- name : Set the default env. variables
80
103
env :
81
- DEFAULT_FORK : ' podman-desktop'
82
- DEFAULT_BRANCH : ' main'
83
- DEFAULT_EXT_TESTS : ' 1'
84
- DEFAULT_NPM_TARGET : ' test:e2e'
104
+ DEFAULT_PD_REPO_OPTIONS : ' REPO=podman-desktop,FORK=podman-desktop,BRANCH=main'
105
+ DEFAULT_NPM_TARGET : ' test:e2e:run'
85
106
DEFAULT_ENV_VARS : ' TEST_PODMAN_MACHINE=true'
86
107
DEFAULT_PODMAN_OPTIONS : ' INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
87
108
DEFAULT_PODMAN_PROVIDER : ' wsl'
88
- DEFAULT_VERSION : " ${{ env.PD_PODMAN_VERSION || '5.3.1' }}"
89
- DEFAULT_EXT_REPO_OPTIONS : ' REPO=podman-desktop-redhat-account-ext,FORK=redhat-developer,BRANCH=main'
109
+ DEFAULT_VERSION : " ${{ env.PD_PODMAN_VERSION || '5.4.0' }}"
90
110
DEFAULT_URL : " https://github.com/containers/podman/releases/download/v$DEFAULT_VERSION/podman-$DEFAULT_VERSION-setup.exe"
111
+ DEFAULT_EXT_REPO_OPTIONS : ' REPO=podman-desktop-redhat-account-ext,FORK=redhat-developer,BRANCH=main,TESTS=1'
91
112
DEFAULT_IMAGES_VERSIONS : ' BUILDER="v0.0.3",PODMAN="v0.0.3",RUNNER="v0.0.3"'
92
113
run : |
93
- echo "FORK=${{ github.event.inputs.fork || env.DEFAULT_FORK }}" >> $GITHUB_ENV
94
- echo "BRANCH=${{ github.event.inputs.branch || env.DEFAULT_BRANCH }}" >> $GITHUB_ENV
95
114
echo "NPM_TARGET=${{ github.event.inputs.npm_target || env.DEFAULT_NPM_TARGET }}" >> $GITHUB_ENV
96
- echo "ENV_VARS=${{ github.event.inputs.env_vars || env.DEFAULT_ENV_VARS }}" >> $GITHUB_ENV
97
115
echo "PODMAN_PROVIDER=${{ github.event.inputs.podman_provider || env.DEFAULT_PODMAN_PROVIDER }}" >> $GITHUB_ENV
98
116
echo "PODMAN_URL=${{ github.event.inputs.podman_remote_url || env.DEFAULT_URL }}" >> $GITHUB_ENV
99
- echo "EXT_TESTS=${{ github.event.inputs.ext_tests || env.DEFAULT_EXT_TESTS }}" >> $GITHUB_ENV
117
+ echo "PD_URL=${{ github.event.inputs.podman_desktop_url || env.DEFAULT_PD_URL }}" >> $GITHUB_ENV
118
+ echo "ENV_VARS=${{ github.event.inputs.env_vars || env.DEFAULT_ENV_VARS }}" >> $GITHUB_ENV
119
+ echo "${{ github.event.inputs.pd_repo_options || env.DEFAULTPD_REPO_OPTIONS }}" | awk -F ',' \
120
+ '{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PD_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
100
121
echo "${{ github.event.inputs.podman_options || env.DEFAULT_PODMAN_OPTIONS }}" | awk -F ',' \
101
122
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PODMAN_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
102
123
echo "${{ github.event.inputs.ext_repo_options || env.DEFAULT_EXT_REPO_OPTIONS }}" | awk -F ',' \
@@ -121,9 +142,9 @@ jobs:
121
142
--windows-version '${{ matrix.windows-version }}' \
122
143
--windows-featurepack '${{ matrix.windows-featurepack }}' \
123
144
--nested-virt \
124
- --cpus 8 \
145
+ --cpus 4 \
125
146
--memory 16 \
126
- --tags project=podman-desktop \
147
+ --tags project=podman-desktop,source=github,org=${{github.repository_owner}},run=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} \
127
148
--spot
128
149
# Check logs
129
150
podman logs -f windows-create
@@ -192,8 +213,10 @@ jobs:
192
213
-targetFolder pd-e2e \
193
214
-resultsFolder results \
194
215
-podmanPath $(cat results/podman-location.log) \
195
- -fork ${{ env.FORK }} \
196
- -branch ${{ env.BRANCH }} \
216
+ -pdUrl ${{ env.PD_URL }} \
217
+ -fork ${{ env.PD_FORK }} \
218
+ -repo ${{ env.PD_REPO }} \
219
+ -branch ${{ env.PD_BRANCH }} \
197
220
-extRepo ${{ env.EXT_REPO }} \
198
221
-extFork ${{ env.EXT_FORK }} \
199
222
-extBranch ${{ env.EXT_BRANCH }} \
0 commit comments