Skip to content

chore(ci): update tags for azure instances #29

chore(ci): update tags for azure instances

chore(ci): update tags for azure instances #29

name: Debug E2E Testing Pre-Releases

Check failure on line 1 in .github/workflows/prerelease-desktop-e2e-debug-job-windows.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/prerelease-desktop-e2e-debug-job-windows.yaml

Invalid workflow file

(Line: 100, Col: 13): Unrecognized named-value: 'github'. Located at position 1 within expression: github.event.inputs.mapt_ref || 'main', (Line: 133, Col: 13): Unrecognized named-value: 'github'. Located at position 1 within expression: github.event.inputs.mapt_ref || 'main', (Line: 136, Col: 13): Unrecognized named-value: 'github'. Located at position 1 within expression: github.event.inputs.mapt_ref || 'main', (Line: 202, Col: 13): Unrecognized named-value: 'github'. Located at position 1 within expression: github.event.inputs.mapt_ref || 'main'
run-name: Debugging Nightly Podman Desktop E2E Tests
on:
workflow_dispatch:
inputs:
create_machine:
description: 'If to create new machine - defaults to true, or to use existing(requires manual setup)'
type: choice
options:
- 'true'
- 'false'
pd_repo_options:
default: 'REPO=podman-desktop,FORK=podman-desktop,BRANCH=main'
description: 'Podman Desktop Extension repo, fork and branch'
type: string
required: true
ext_repo_options:
default: 'REPO=podman-desktop-extension-ai-lab,FORK=containers,BRANCH=main,TESTS=0'
description: 'Podman Desktop Extension repo, fork, branch and if run ext. tests'
type: string
required: true
npm_target:
default: 'test:e2e'
description: 'npm target to run tests'
type: string
required: true
podman_options:
default: 'WSL Provider: REMOTE_URL=https://github.com/containers/podman/releases/download/v5.3.1/podman-5.3.1-setup.exe,DESKTOP_URL=https://github.com/podman-desktop/testing-prereleases/releases/download/v1.16.0-202501090247-57bf7774e68/podman-desktop-1.16.0-202501090247-57bf7774e68-x64.exe,PROVIDER=wsl,INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
description: 'Podman configuration options with provider choice'
type: choice
required: true
options:
- 'WSL Provider: REMOTE_URL=https://github.com/containers/podman/releases/download/v5.3.1/podman-5.3.1-setup.exe,DESKTOP_URL=https://github.com/podman-desktop/testing-prereleases/releases/download/v1.16.0-202501090247-57bf7774e68/podman-desktop-1.16.0-202501090247-57bf7774e68-x64.exe,PROVIDER=wsl,INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
- 'Hyper-V Provider: REMOTE_URL=https://github.com/containers/podman/releases/download/v5.3.1/podman-5.3.1-setup.exe,DESKTOP_URL=https://github.com/podman-desktop/testing-prereleases/releases/download/v1.16.0-202501090247-57bf7774e68/podman-desktop-1.16.0-202501090247-57bf7774e68-x64.exe,PROVIDER=hyperv,INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
env_vars:
default: 'TEST_PODMAN_MACHINE=true'
description: 'Env. Variables passed into target machine, ie: VAR1=xxx,VAR2=true,VAR3=15,VAR4="Pass me along"'
type: 'string'
required: true
images_version:
default: 'BUILDER="v0.0.3",PODMAN="v0.0.3",RUNNER="v0.0.3"'
description: 'Testing images versions, no spaces'
type: 'string'
required: true
mapt_params:
default: 'IMAGE=quay.io/redhat-developer/mapt,VERSION_TAG=v0.9.7,CPUS=4,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
mapt_ref:
default: 'main'
description: 'Reference to a mapt create/destroy action'
required: false
type: string
jobs:
windows:
name: ${{ matrix.windows-version }} - Debug
timeout-minutes: 180
runs-on: ubuntu-latest
env:
MAPT_VERSION: ${{ vars.MAPT_VERSION_TAG }}
MAPT_IMAGE: quay.io/redhat-developer/mapt
strategy:
fail-fast: false
matrix:
windows-version: ['11']
windows-featurepack: ['24h2-ent']
steps:
- name: Set the default env. variables
env:
DEFAULT_CREATE_MACHINE: true
DEFAULT_NPM_TARGET: 'test:e2e'
DEFAULT_PODMAN_OPTIONS: 'WSL Provider: REMOTE_URL=https://github.com/containers/podman/releases/download/v5.3.1/podman-5.3.1-setup.exe,DESKTOP_URL=https://github.com/podman-desktop/testing-prereleases/releases/download/v1.16.0-202501090247-57bf7774e68/podman-desktop-1.16.0-202501090247-57bf7774e68-x64.exe,PROVIDER=wsl,INIT=1,START=1,ROOTFUL=1,NETWORKING=0'
DEFAULT_EXT_REPO_OPTIONS: 'REPO=podman-desktop-extension-ai-lab,FORK=containers,BRANCH=main,TESTS=0'
DEFAULT_PD_REPO_OPTIONS: 'REPO=podman-desktop,FORK=podman-desktop,BRANCH=main'
DEFAULT_ENV_VARS: 'TEST_PODMAN_MACHINE=true'
DEFAULT_IMAGES_VERSIONS: 'BUILDER="v0.0.3",PODMAN="v0.0.3",RUNNER="v0.0.3"'
DEFAULT_MAPT_PARAMS: "IMAGE=${{ vars.MAPT_IMAGE || 'quay.io/redhat-developer/mapt' }},VERSION_TAG=${{ vars.MAPT_VERSION_TAG || 'v0.9.7' }},CPUS=${{ vars.MAPT_CPUS || '4' }},MEMORY=${{ vars.MAPT_MEMORY || '32' }}"
run: |
echo "CREATE_MACHINE=${{ github.event.inputs.create_machine || env.DEFAULT_CREATE_MACHINE }}" >> $GITHUB_ENV
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
# Extract podman options, removing the descriptive prefix
PODMAN_OPTS="${{ github.event.inputs.podman_options || env.DEFAULT_PODMAN_OPTIONS }}"
echo "${PODMAN_OPTS#*: }" | 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.pd_repo_options || env.DEFAULT_PD_REPO_OPTIONS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PD_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "${{ github.event.inputs.images_version || env.DEFAULT_IMAGES_VERSIONS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PDE2E_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "${{ github.event.inputs.mapt_params }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "MAPT_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
- name: Create instance
if: ${{ env.CREATE_MACHINE == 'true' }}
uses: podman-desktop/e2e/.github/actions/create-instance@${{ github.event.inputs.mapt_ref || 'main' }}
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 || '' }}
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: Setup Connection to Existing instance
if: ${{ env.CREATE_MACHINE == 'false' }}
run: |
# we need to create a content for host, id_rsa, username, userpassword files from repository tmp secrets.
# should be secrets.REMOTE_HOST, secrets.REMOTE_USER, secrets.REMOTE_RSA, secrets.REMOTE_PASS
cat << EOF > ./host
${{ secrets.REMOTE_HOST }}
EOF
cat << EOF > ./username
${{ secrets.REMOTE_USER }}
EOF
cat << EOF > ./id_rsa
${{ secrets.REMOTE_RSA }}
EOF
chmod 600 ./id_rsa
cat << EOF > ./userpassword
${{ secrets.REMOTE_PASS }}
EOF
- name: Check instance system info
uses: podman-desktop/e2e/.github/actions/instance-system-info@${{ github.event.inputs.mapt_ref || 'main' }}
- name: Emulate X session
uses: podman-desktop/e2e/.github/actions/emulate-x-session@${{ github.event.inputs.mapt_ref || 'main' }}
- name: Download Podman nightly, do not initialize
run: |
podman run --rm -d --name pde2e-podman-run \
-e TARGET_HOST=$(cat host) \
-e TARGET_HOST_USERNAME=$(cat username) \
-e TARGET_HOST_KEY_PATH=/data/id_rsa \
-e TARGET_FOLDER=pd-e2e \
-e TARGET_CLEANUP=false \
-e TARGET_RESULTS=results \
-e OUTPUT_FOLDER=/data \
-e DEBUG=true \
-v $PWD:/data:z \
quay.io/odockal/pde2e-podman:${{ env.PDE2E_PODMAN }}-windows \
pd-e2e/podman.ps1 \
-downloadUrl "${{ env.PODMAN_REMOTE_URL }}" \
-targetFolder pd-e2e \
-resultsFolder results \
-initialize 0 \
-rootful 0 \
-start 0 \
-installWSL 0
# check logs
podman logs -f pde2e-podman-run
- name: Run Podman Desktop Playwright E2E tests
env:
PODMANDESKTOP_CI_BOT_TOKEN: ${{ secrets.PODMANDESKTOP_CI_BOT_TOKEN }}
run: |
echo "PODMANDESKTOP_CI_BOT_TOKEN=${PODMANDESKTOP_CI_BOT_TOKEN}" > secrets.txt
podman run -d --name pde2e-runner-run \
-e TARGET_HOST=$(cat host) \
-e TARGET_HOST_USERNAME=$(cat username) \
-e TARGET_HOST_KEY_PATH=/data/id_rsa \
-e TARGET_FOLDER=pd-e2e \
-e TARGET_RESULTS=results \
-e OUTPUT_FOLDER=/data \
-e DEBUG=true \
-v $PWD:/data:z \
-v $PWD/secrets.txt:/opt/pde2e-runner/secrets.txt:z \
quay.io/odockal/pde2e-runner:${{ env.PDE2E_RUNNER }}-windows \
pd-e2e/runner.ps1 \
-targetFolder pd-e2e \
-resultsFolder results \
-podmanPath $(cat results/podman-location.log) \
-pdUrl ${{ env.PODMAN_DESKTOP_URL }} \
-fork ${{ env.PD_FORK }} \
-branch ${{ env.PD_BRANCH }} \
-extRepo ${{ env.EXT_REPO }} \
-extFork ${{ env.EXT_FORK }} \
-extBranch ${{ env.EXT_BRANCH }} \
-extTests ${{ env.EXT_TESTS }} \
-npmTarget ${{ env.NPM_TARGET }} \
-initialize ${{ env.PODMAN_INIT }} \
-rootful ${{ env.PODMAN_ROOTFUL }} \
-start ${{ env.PODMAN_START }} \
-userNetworking ${{ env.PODMAN_NETWORKING }} \
-podmanProvider ${{ env.PODMAN_PROVIDER }} \
-envVars ${{ env.ENV_VARS }} \
-secretFile secrets.txt
# check logs
podman logs -f pde2e-runner-run
- name: Destroy instance
if: ${{ env.CREATE_MACHINE }}
uses: podman-desktop/e2e/.github/actions/destroy-instance@${{ github.event.inputs.mapt_ref || 'main' }}
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@v5
if: always() # always run even if the previous step fails
with:
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@v4
if: always()
with:
name: results-e2e-${{ matrix.windows-version }}-debug
path: |
results/*