Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 115 additions & 3 deletions .github/actions/download-podman-nightly/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ inputs:
description: 'The tag for the builder-image to be used for downloading Podman.'
required: true
podman-download-url:
description: 'The URL to download the Podman nightly build from.'
required: true
description: 'The URL to download the Podman build from.'
required: false
default: ''
podman-local-installer:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why cannot we just pass an url to the nightly so that the action/image can pull the installer and use it?

description: 'Local MSI path on the runner for GitHub Actions nightly artifacts.'
required: false
default: ''
podman-provider:
description: 'The Podman provider to be used.'
required: false
Expand All @@ -51,9 +56,83 @@ inputs:
runs:
using: 'composite'
steps:
- name: 'Install Podman from local nightly artifact'
if: inputs.podman-local-installer != ''
shell: bash
run: |
set -euo pipefail

TARGET_HOST="$(cat host)"
TARGET_USER="$(cat username)"
KEY_PATH="id_rsa"
TARGET_FOLDER="${{ inputs.target-folder }}"
RESULTS_FOLDER="${{ inputs.results-folder }}"
LOCAL_INSTALLER="${{ inputs.podman-local-installer }}"

if [ ! -f "$LOCAL_INSTALLER" ]; then
echo "Error: Local installer not found at $LOCAL_INSTALLER"
exit 1
fi

chmod 600 "$KEY_PATH"
REMOTE_TOOLS='tools'
REMOTE_MSI="${REMOTE_TOOLS}/podman.msi"
REMOTE_SCRIPT="${RESULTS_FOLDER}/scripts/install-local-podman.ps1"

ssh -i "$KEY_PATH" -o StrictHostKeyChecking=no "${TARGET_USER}@${TARGET_HOST}" \
"powershell -NoProfile -Command \"New-Item -ItemType Directory -Force -Path '${REMOTE_TOOLS}', '${TARGET_FOLDER}/${RESULTS_FOLDER}/scripts' | Out-Null\""

scp -i "$KEY_PATH" -o StrictHostKeyChecking=no "$LOCAL_INSTALLER" \
"${TARGET_USER}@${TARGET_HOST}:${REMOTE_MSI}"

cat > install-local-podman.ps1 <<EOF
\$resultsFolder = Join-Path (Get-Location) '${{ inputs.results-folder }}'
\$toolsInstallDir = Join-Path \$env:USERPROFILE 'tools'
\$msiPath = Join-Path \$toolsInstallDir 'podman.msi'
New-Item -ItemType Directory -Force -Path \$resultsFolder | Out-Null
\$msiLogFile = Join-Path \$resultsFolder 'podman-msi.log'

Write-Host "Installing Podman MSI from \$msiPath"
\$process = Start-Process msiexec.exe -ArgumentList '/package', \$msiPath, '/quiet', '/l*v', \$msiLogFile -PassThru -Wait
Write-Host "Install process exit code: \$(\$process.ExitCode)"
if (\$process.ExitCode -ne 0) {
if (Test-Path \$msiLogFile) {
Get-Content \$msiLogFile | ForEach-Object { Write-Host \$_ }
}
throw "Podman MSI installation failed with exit code: \$(\$process.ExitCode)"
}

\$podmanPath = Join-Path \$env:LOCALAPPDATA 'Programs/Podman/'
if (-not (Test-Path \$podmanPath)) {
throw "Expected Podman path \$podmanPath does not exist"
}

\$env:Path += ";\$podmanPath"
\$currentUserPath = [Environment]::GetEnvironmentVariable('Path', 'User')
if ([string]::IsNullOrWhiteSpace(\$currentUserPath)) {
[Environment]::SetEnvironmentVariable('Path', \$podmanPath, 'User')
} elseif (-not \$currentUserPath.Contains(\$podmanPath)) {
[Environment]::SetEnvironmentVariable('Path', (\$currentUserPath + ';' + \$podmanPath), 'User')
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

podman version
EOF

scp -i "$KEY_PATH" -o StrictHostKeyChecking=no install-local-podman.ps1 \
"${TARGET_USER}@${TARGET_HOST}:${TARGET_FOLDER}/${REMOTE_SCRIPT}"

ssh -i "$KEY_PATH" -o StrictHostKeyChecking=no "${TARGET_USER}@${TARGET_HOST}" \
"cd '${TARGET_FOLDER}' && powershell -NoProfile -ExecutionPolicy Bypass -File '${REMOTE_SCRIPT}'"

- name: 'Download Podman nightly, do not initialize'
if: inputs.podman-local-installer == ''
shell: bash
run: |
if [ -z "${{ inputs.podman-download-url }}" ]; then
echo "Error: podman-download-url is required when podman-local-installer is not provided"
exit 1
fi

CMD="podman run --rm -d --name pde2e-podman-run \
-e TARGET_HOST=$(cat host) \
-e TARGET_HOST_USERNAME=$(cat username) \
Expand Down Expand Up @@ -85,4 +164,37 @@ runs:
eval "$CMD"

# Check logs
podman logs -f pde2e-podman-run
podman logs -f pde2e-podman-run

- name: 'Configure Podman provider after local install'
if: inputs.podman-local-installer != ''
shell: bash
run: |
CMD="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=${{ inputs.target-folder }} \
-e TARGET_CLEANUP=${{ inputs.target-cleanup }} \
-e TARGET_RESULTS=${{ inputs.results-folder }} \
-e OUTPUT_FOLDER=/data \
-e DEBUG=${{ inputs.debug-mode }} \
-v $PWD:/data:z \
${{ inputs.builder-image }}:${{ inputs.podman-image-tag }}-windows \
pd-e2e/podman.ps1 \
-downloadUrl https://example.invalid/podman.msi \
-targetFolder ${{ inputs.target-folder }} \
-resultsFolder ${{ inputs.results-folder }} \
-initialize 0 \
-rootful 0 \
-start 0"

if [[ -n "${{ inputs.podman-provider }}" ]]; then
CMD+=" -podmanProvider ${{ inputs.podman-provider }}"
else
CMD+=" -installWSL 0"
fi

echo "$CMD"
eval "$CMD"
podman logs -f pde2e-podman-run
8 changes: 7 additions & 1 deletion .github/workflows/desktop-e2e-podman-windows-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
name: ${{ matrix.windows-version }} - ${{ matrix.rootful == '0' && 'rootless' || 'rootful' }} ${{ matrix.user-networking == '1' && '- user mode networking enabled' || '' }}
timeout-minutes: 180
runs-on: ubuntu-latest
permissions:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this.

contents: read
actions: read
strategy:
fail-fast: false
matrix:
Expand All @@ -76,7 +79,7 @@ jobs:
steps:
- name: Fetch latest Podman version
id: fetch-podman
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@aea6ff44f2a4a82da13d22061ce73443a125925d
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@60b05ab5b050c9f8ec8dff7e0377f8bf36c39207
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
version_input: ${{ github.event.inputs.podman_version || 'latest' }}
file_type: 'msi'
Expand All @@ -94,6 +97,7 @@ jobs:
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print kv[1]"="kv[2]}}' >> $GITHUB_ENV
# Set podman configuration variables from fetched version
echo "PODMAN_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
echo "PODMAN_LOCAL_INSTALLER=${{ steps.fetch-podman.outputs.local_installer_path }}" >> $GITHUB_ENV
echo "${{ github.event.inputs.podman_machine_options || env.DEFAULT_PODMAN_MACHINE_OPTIONS }}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); print "PODMAN_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "PODMAN_PROVIDER=${{ github.event.inputs.podman_provider || env.DEFAULT_PODMAN_PROVIDER }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -142,6 +146,8 @@ jobs:
with:
podman-image-tag: ${{ env.PDE2E_PODMAN }}
podman-download-url: ${{ env.PODMAN_URL }}
podman-local-installer: ${{ env.PODMAN_LOCAL_INSTALLER }}
podman-provider: ${{ env.PODMAN_PROVIDER }}

- name: Run Podman Desktop Playwright E2E tests
uses: podman-desktop/e2e/.github/actions/run-playwright-test@main
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/desktop-e2e-test-job-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
required: true
podman_options:
default: 'PODMAN_VERSION=latest,INIT=1,START=1,ROOTFUL=1,NETWORKING=0,PROVIDER=wsl'
description: 'Podman configuration options with provider choice. For PODMAN_VERSION use "latest" or a version like "v5.6.2"; for PROVIDER use "wsl" or "hyperv" options.'
description: 'Podman configuration options with provider choice. For PODMAN_VERSION use "latest", "nightly", or a version like "v5.6.2"; for PROVIDER use "wsl" or "hyperv" options.'
type: string
required: true
env_vars:
Expand Down Expand Up @@ -55,6 +55,9 @@ jobs:
name: ${{ matrix.windows-version }} - Debug
timeout-minutes: 180
runs-on: ubuntu-latest
permissions:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it needed?

contents: read
actions: read
strategy:
fail-fast: false
matrix:
Expand All @@ -73,7 +76,7 @@ jobs:

- name: Fetch Podman version
id: fetch-podman
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@aea6ff44f2a4a82da13d22061ce73443a125925d
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@60b05ab5b050c9f8ec8dff7e0377f8bf36c39207
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
version_input: ${{ steps.extract-version.outputs.podman_version }}
file_type: 'msi'
Expand All @@ -88,6 +91,7 @@ jobs:
echo "${PODMAN_OPTS}" | awk -F ',' \
'{for (i=1; i<=NF; i++) {split($i, kv, "="); if(kv[1] != "PODMAN_VERSION") print "PODMAN_"kv[1]"="kv[2]}}' >> $GITHUB_ENV
echo "PODMAN_REMOTE_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
echo "PODMAN_LOCAL_INSTALLER=${{ steps.fetch-podman.outputs.local_installer_path }}" >> $GITHUB_ENV
echo "${{ github.event.inputs.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 }}" | awk -F ',' \
Expand Down Expand Up @@ -135,6 +139,8 @@ jobs:
with:
podman-image-tag: ${{ env.PDE2E_PODMAN }}
podman-download-url: ${{ env.PODMAN_REMOTE_URL }}
podman-local-installer: ${{ env.PODMAN_LOCAL_INSTALLER }}
podman-provider: ${{ env.PODMAN_PROVIDER }}

- name: Run Podman Desktop Playwright E2E tests
uses: podman-desktop/e2e/.github/actions/run-playwright-test@main
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/podman-desktop-e2e-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
permissions:
contents: read
checks: write
actions: read
strategy:
fail-fast: false
matrix:
Expand All @@ -71,7 +72,7 @@ jobs:
steps:
- name: Fetch latest Podman version
id: fetch-podman
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@aea6ff44f2a4a82da13d22061ce73443a125925d
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@60b05ab5b050c9f8ec8dff7e0377f8bf36c39207
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
version_input: ${{ github.event.inputs.podman_version || 'latest' }}
file_type: 'msi'
Expand All @@ -90,6 +91,7 @@ jobs:
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_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
echo "PODMAN_LOCAL_INSTALLER=${{ steps.fetch-podman.outputs.local_installer_path }}" >> $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

Expand Down Expand Up @@ -127,6 +129,8 @@ jobs:
with:
podman-image-tag: ${{ env.PDE2E_PODMAN }}
podman-download-url: ${{ env.PODMAN_URL }}
podman-local-installer: ${{ env.PODMAN_LOCAL_INSTALLER }}
podman-provider: ${{ env.PODMAN_PROVIDER }}

- name: Run Podman Desktop Playwright E2E tests
uses: podman-desktop/e2e/.github/actions/run-playwright-test@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
permissions:
contents: read
checks: write
actions: read
strategy:
fail-fast: false
matrix:
Expand All @@ -78,7 +79,7 @@ jobs:

- name: Fetch latest Podman version
id: fetch-podman
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@aea6ff44f2a4a82da13d22061ce73443a125925d
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@60b05ab5b050c9f8ec8dff7e0377f8bf36c39207
with:
version_input: ${{ github.event.inputs.podman_version || 'latest' }}
file_type: 'msi'
Expand All @@ -98,6 +99,7 @@ jobs:
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_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
echo "PODMAN_LOCAL_INSTALLER=${{ steps.fetch-podman.outputs.local_installer_path }}" >> $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

Expand Down Expand Up @@ -141,6 +143,7 @@ jobs:
with:
podman-image-tag: ${{ env.PDE2E_PODMAN }}
podman-download-url: ${{ env.PODMAN_URL }}
podman-local-installer: ${{ env.PODMAN_LOCAL_INSTALLER }}
podman-provider: ${{ env.PODMAN_PROVIDER }}

- name: Run Podman Desktop Playwright E2E tests
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/podman-desktop-e2e-nightly-windows-wsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ on:
type: 'string'
required: true
podman_version:
default: 'latest'
description: 'Podman version (use "latest" to auto-fetch latest release, or specify version like "v5.6.1")'
default: 'nightly'
description: 'Podman version (use "nightly" for main branch CI artifacts, "latest" for stable release, or specify version like "v5.6.1")'
type: string
required: true
images_version:
Expand Down Expand Up @@ -58,6 +58,7 @@ jobs:
permissions:
contents: read
checks: write
actions: read
strategy:
fail-fast: false
matrix:
Expand All @@ -72,9 +73,9 @@ jobs:
steps:
- name: Fetch latest Podman version
id: fetch-podman
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@aea6ff44f2a4a82da13d22061ce73443a125925d
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@60b05ab5b050c9f8ec8dff7e0377f8bf36c39207
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
version_input: ${{ github.event.inputs.podman_version || 'latest' }}
version_input: ${{ github.event.inputs.podman_version || 'nightly' }}
file_type: 'msi'
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -92,6 +93,7 @@ jobs:
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_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
echo "PODMAN_LOCAL_INSTALLER=${{ steps.fetch-podman.outputs.local_installer_path }}" >> $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

Expand Down Expand Up @@ -135,6 +137,8 @@ jobs:
with:
podman-image-tag: ${{ env.PDE2E_PODMAN }}
podman-download-url: ${{ env.PODMAN_URL }}
podman-local-installer: ${{ env.PODMAN_LOCAL_INSTALLER }}
podman-provider: ${{ env.PODMAN_PROVIDER }}

- name: Run Podman Desktop Playwright E2E tests
uses: podman-desktop/e2e/.github/actions/run-playwright-test@main
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/podman-desktop-e2e-remote-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
name: ${{ matrix.windows-version }} - ${{ matrix.windows-featurepack }}
timeout-minutes: 90
runs-on: ubuntu-latest
permissions:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

contents: read
actions: read
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:

- name: Fetch latest Podman version
id: fetch-podman
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@aea6ff44f2a4a82da13d22061ce73443a125925d
uses: redhat-actions/podman-install/.github/actions/fetch-latest-podman-version-windows@60b05ab5b050c9f8ec8dff7e0377f8bf36c39207
with:
version_input: ${{ github.event.inputs.podman_version || 'latest' }}
file_type: 'msi'
Expand All @@ -116,6 +119,7 @@ jobs:
echo "NPM_TARGET=${{ github.event.inputs.npm_target || env.DEFAULT_NPM_TARGET }}" >> $GITHUB_ENV
echo "PODMAN_PROVIDER=${{ github.event.inputs.podman_provider || env.DEFAULT_PODMAN_PROVIDER }}" >> $GITHUB_ENV
echo "PODMAN_URL=${{ steps.fetch-podman.outputs.download_url }}" >> $GITHUB_ENV
echo "PODMAN_LOCAL_INSTALLER=${{ steps.fetch-podman.outputs.local_installer_path }}" >> $GITHUB_ENV
echo "PD_URL=${{ github.event.inputs.podman_desktop_url || env.DEFAULT_PD_URL }}" >> $GITHUB_ENV
echo "ENV_VARS=${{ github.event.inputs.env_vars || env.DEFAULT_ENV_VARS }}" >> $GITHUB_ENV
echo "${{ github.event.inputs.podman_options || env.DEFAULT_PODMAN_OPTIONS }}" | awk -F ',' \
Expand Down Expand Up @@ -159,6 +163,8 @@ jobs:
with:
podman-image-tag: ${{ env.PDE2E_PODMAN }}
podman-download-url: ${{ env.PODMAN_URL }}
podman-local-installer: ${{ env.PODMAN_LOCAL_INSTALLER }}
podman-provider: ${{ env.PODMAN_PROVIDER }}

- name: Run Podman Desktop Playwright E2E tests
uses: podman-desktop/e2e/.github/actions/run-playwright-test@main
Expand Down
Loading