-
Notifications
You must be signed in to change notification settings - Fork 14
218 lines (204 loc) · 10.5 KB
/
Copy pathrhel-e2e-nightly-windows.yaml
File metadata and controls
218 lines (204 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
#
# Copyright (C) 2025 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Podman Desktop RHEL Extension E2E Nightly
on:
schedule:
- cron: '0 4 * * *' # At 04:00 every day
workflow_dispatch:
inputs:
podman_desktop_repo_args:
default: 'REPO=podman-desktop,FORK=podman-desktop,BRANCH=main'
description: 'Podman Desktop repo fork and branch'
type: string
required: true
ext_repo_options:
default: 'REPO=podman-desktop-rhel-ext,FORK=redhat-developer,BRANCH=main'
description: 'Podman Desktop Extension repo, fork and branch'
type: string
required: true
ext_tests_options:
default: 'EXT_RUN_TESTS_FROM_EXTENSION=1,EXT_RUN_TESTS_AS_ADMIN=1'
description: 'E2E tests options in format VAR1=xxx,VAR2=true,VAR3=15 etc.'
type: string
required: true
npm_target:
default: 'test:e2e'
description: 'npm target to run tests'
type: string
required: true
podman_remote_url:
default: 'https://github.com/containers/podman/releases/download/v5.6.1/podman-5.6.1-setup.exe'
description: 'podman remote setup exe'
type: string
required: true
podman_options:
default: 'INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
description: 'Podman machine configuration options, no spaces'
type: string
required: true
env_vars:
default: 'TEST_PODMAN_MACHINE=true,ELECTRON_ENABLE_INSPECT=true'
description: 'Env. Variables passed into target machine, ie: VAR1=xxx,VAR2=true...'
type: string
required: true
pde2e_image_version:
default: 'v0.0.3'
description: 'PDE2E runner, builder, podman image versions'
type: string
required: true
podman_provider:
default: 'wsl'
description: 'Podman virtualization provider'
type: 'string'
required: true
mapt_params:
default: 'IMAGE=quay.io/redhat-developer/mapt;VERSION_TAG=v0.12.1;CPUS=8;MEMORY=32;EXCLUDED_REGIONS="westindia,centralindia,southindia,australiacentral,australiacentral2,australiaeast,australiasoutheast,southafricanorth,southafricawest"'
description: 'MAPT image, version tag, cpus and memory request, and excluded regions in format IMAGE=xxx;VERSION_TAG=xxx;CPUS=xxx;MEMORY=xxx;EXCLUDED_REGIONS=xxx'
required: true
type: string
jobs:
windows:
timeout-minutes: 120
name: windows-${{ matrix.windows-version }}-${{ matrix.windows-featurepack }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
windows-version: ['10', '11']
windows-featurepack: ['22h2-ent', '23h2-ent']
exclude:
- windows-version: '10'
windows-featurepack: '23h2-ent'
- windows-version: '11'
windows-featurepack: '22h2-ent'
steps:
- name: Get Podman version used by Desktop
run: |
version=$(curl https://raw.githubusercontent.com/containers/podman-desktop/main/extensions/podman/packages/extension/src/podman5.json | jq -r '.version')
echo "Default Podman Version from Podman Desktop: ${version}"
echo "PD_PODMAN_VERSION=${version}" >> $GITHUB_ENV
- name: Set the default env. variables
env:
DEFAULT_PODMAN_DESKTOP_REPO_ARGS: 'REPO=podman-desktop,FORK=podman-desktop,BRANCH=main'
DEFAULT_NPM_TARGET: 'test:e2e'
DEFAULT_PODMAN_PROVIDER: 'wsl'
DEFAULT_ENV_VARS: 'TEST_PODMAN_MACHINE=true,ELECTRON_ENABLE_INSPECT=true'
DEFAULT_PODMAN_OPTIONS: 'INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
DEFAULT_EXT_TESTS_OPTIONS: 'EXT_RUN_TESTS_FROM_EXTENSION=1,EXT_RUN_TESTS_AS_ADMIN=0'
DEFAULT_EXT_REPO_OPTIONS: 'REPO=podman-desktop-rhel-ext,FORK=redhat-developer,BRANCH=main'
DEFAULT_PODMAN_VERSION: "${{ env.PD_PODMAN_VERSION || '5.6.1' }}"
DEFAULT_URL: 'https://github.com/containers/podman/releases/download/v$DEFAULT_PODMAN_VERSION/podman-$DEFAULT_PODMAN_VERSION-setup.exe'
DEFAULT_PDE2E_IMAGE_VERSION: 'v0.0.3'
DEFAULT_MAPT_PARAMS: 'IMAGE=${{ vars.MAPT_IMAGE || ''quay.io/redhat-developer/mapt'' }};VERSION_TAG=${{ vars.MAPT_VERSION_TAG || ''v0.12.1'' }};CPUS=${{ vars.MAPT_CPUS || ''8 '' }};MEMORY=${{ vars.MAPT_MEMORY || ''32'' }};EXCLUDED_REGIONS="${{ vars.MAPT_EXCLUDED_REGIONS || ''westindia,centralindia,southindia,australiacentral,australiacentral2,australiaeast,australiasoutheast,southafricanorth,southafricawest'' }}"'
run: |
echo "NPM_TARGET=${{ github.event.inputs.npm_target || env.DEFAULT_NPM_TARGET }}" >> $GITHUB_ENV
echo "ENV_VARS=${{ github.event.inputs.env_vars || env.DEFAULT_ENV_VARS }}" >> $GITHUB_ENV
echo "PODMAN_PROVIDER=${{ github.event.inputs.podman_provider || env.DEFAULT_PODMAN_PROVIDER }}" >> $GITHUB_ENV
echo "PODMAN_URL=${{ github.event.inputs.podman_remote_url || env.DEFAULT_URL }}" >> $GITHUB_ENV
echo "PDE2E_IMAGE_VERSION=${{ github.event.inputs.pde2e_image_version || env.DEFAULT_PDE2E_IMAGE_VERSION }}" >> $GITHUB_ENV
echo "${{ github.event.inputs.podman_desktop_repo_args || env.DEFAULT_PODMAN_DESKTOP_REPO_ARGS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PD_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "${{ github.event.inputs.ext_tests_options || env.DEFAULT_EXT_TESTS_OPTIONS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "${{ github.event.inputs.podman_options || env.DEFAULT_PODMAN_OPTIONS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PODMAN_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "${{ github.event.inputs.ext_repo_options || env.DEFAULT_EXT_REPO_OPTIONS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "EXT_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "${{ github.event.inputs.mapt_params || env.DEFAULT_MAPT_PARAMS }}" | awk -F ';' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "MAPT_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
- name: Set env secrets
env:
DVLPR_USERNAME: ${{ secrets.DVLPR_USERNAME }}
DVLPR_PASSWORD: ${{ secrets.DVLPR_PASSWORD }}
run: |
echo "DVLPR_USERNAME=${DVLPR_USERNAME}" >> secrets.txt
echo "DVLPR_PASSWORD=${DVLPR_PASSWORD}" >> secrets.txt
- name: Create instance
uses: podman-desktop/e2e/.github/actions/create-instance@36e440f2ac18193214f4ffa8f7f1c4c0cb8c9446
with:
mapt-image: ${{ env.MAPT_IMAGE || '' }}
mapt-version: ${{ env.MAPT_VERSION_TAG || '' }}
windows-version: ${{ matrix.windows-version }}
windows-featurepack: ${{ matrix.windows-featurepack }}
cpus: ${{ env.MAPT_CPUS || '' }}
memory: ${{ env.MAPT_MEMORY || '' }}
excluded-regions: ${{ env.MAPT_EXCLUDED_REGIONS || '' }}
arm-tenant-id: ${{ secrets.ARM_TENANT_ID }}
arm-subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
arm-client-id: ${{ secrets.ARM_CLIENT_ID }}
arm-client-secret: ${{ secrets.ARM_CLIENT_SECRET }}
- name: Check instance system info
uses: podman-desktop/e2e/.github/actions/instance-system-info@3548105f45def129d5e3aaa5a3d922e09ac892d9
- name: Emulate X session
uses: podman-desktop/e2e/.github/actions/emulate-x-session@3548105f45def129d5e3aaa5a3d922e09ac892d9
- name: Download Podman, do not initialize
uses: podman-desktop/e2e/.github/actions/download-podman-nightly@952cafee20ca82b1ce48b29c848bac1c31062245
with:
podman-image-tag: ${{ env.PDE2E_IMAGE_VERSION }}
podman-download-url: ${{ env.PODMAN_URL }}
- name: Build Podman Desktop Electron Inspect Enabled binary
uses: podman-desktop/e2e/.github/actions/build-podman-desktop@0c1f0a035e0949941fd6abf959ab556ceec13f03
with:
fork: ${{ env.PD_FORK }}
branch: ${{ env.PD_BRANCH }}
env-vars: ${{ env.ENV_VARS }}
- name: Run Podman Desktop Playwright E2E tests
uses: podman-desktop/e2e/.github/actions/run-playwright-test@db37fcfe19c2265b4840460fa5fed1f130d9a634
with:
pde2e-runner-tag: ${{ env.PDE2E_IMAGE_VERSION }}
podman-desktop-path: true
fork-repo: ${{ env.PD_FORK }}
branch-name: ${{ env.PD_BRANCH }}
ext-repo: ${{ env.EXT_REPO }}
ext-fork: ${{ env.EXT_FORK }}
ext-branch: ${{ env.EXT_BRANCH }}
ext-tests: ${{ env.EXT_RUN_TESTS_FROM_EXTENSION }}
npm-target: ${{ env.NPM_TARGET }}
podman-init: ${{ env.PODMAN_INIT }}
podman-start: ${{ env.PODMAN_START }}
rootful: ${{ env.PODMAN_ROOTFUL }}
user-networking: ${{ env.PODMAN_NETWORKING }}
podman-provider: ${{ env.PODMAN_PROVIDER }}
env-vars: ${{ env.ENV_VARS }}
ci-bot-token: ${{ secrets.PODMAN_DESKTOP_BOT_TOKEN }}
- name: Destroy instance
if: always()
uses: podman-desktop/e2e/.github/actions/destroy-instance@36e440f2ac18193214f4ffa8f7f1c4c0cb8c9446
with:
mapt-image: ${{ env.MAPT_IMAGE }}
mapt-version: ${{ env.MAPT_VERSION_TAG }}
arm-tenant-id: ${{ secrets.ARM_TENANT_ID }}
arm-subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
arm-client-id: ${{ secrets.ARM_CLIENT_ID }}
arm-client-secret: ${{ secrets.ARM_CLIENT_SECRET }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always() # always run even if the previous step fails
with:
annotate_only: true
fail_on_failure: true
include_passed: true
detailed_summary: true
require_tests: true
report_paths: '**/*results.xml'
- name: Upload test artifacts
uses: actions/upload-artifact@v7
if: always()
with:
name: results-e2e-${{ matrix.windows-version }}${{ matrix.windows-featurepack }}
path: |
results/*