Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all #8

Merged
merged 1 commit into from
Mar 26, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/windows-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Upload windows installer artifact
uses: actions/upload-artifact@v4
with:
name: Windows Installer (${{ matrix.os }})
name: windows-installer
path: "./out/windows-amd64/crc-windows-installer.zip"

build-qe:
Expand Down Expand Up @@ -70,13 +70,13 @@ jobs:
- name: Upload e2e ${{matrix.os}}-${{matrix.arch}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME_E2E }}-gh-${{matrix.os}}-${{matrix.arch}}
name: ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}
path: ${{ env.IMAGE_NAME_E2E }}-${{matrix.os}}-${{matrix.arch}}.tar

- name: Upload integration ${{matrix.os}}-${{matrix.arch}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME_INTEGRATION }}-gh-${{matrix.os}}-${{matrix.arch}}
name: ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}
path: ${{ env.IMAGE_NAME_INTEGRATION }}-${{matrix.os}}-${{matrix.arch}}.tar

save-gh-context:
Expand All @@ -93,5 +93,5 @@ jobs:
- name: Upload the GH context artifact
uses: actions/upload-artifact@v4
with:
name: gh_context
name: gh-context
path: gh_context.json
16 changes: 7 additions & 9 deletions .github/workflows/windows-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
windows-e2e-ocp:
uses: adrianriobo/crc/.github/workflows/windows-qe-tpl.yml@fix4040-extended
uses: adrianriobo/crc/.github/workflows/windows-qe-tpl.yml@fix-4040-extended
strategy:
fail-fast: false
matrix:
Expand All @@ -18,14 +18,12 @@ jobs:
- qe-type: 'e2e'
preset: 'all'
- qe-type: 'integration'
preset: ['openshift', 'microshift']
preset: 'openshift'
- qe-type: 'integration'
preset: 'microshift'
with:
workflow-id: ${{ github.event.workflow_run.workflow_id }}
trigger-workflow-id: ${{ github.event.workflow_run.workflow_id }}
qe-type: ${{matrix.qe-type}}
preset: ${{matrix.preset}}
secrets:
pull-secret: ${{secrets.PULL_SECRET}}
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}}
secrets: inherit

65 changes: 32 additions & 33 deletions .github/workflows/windows-qe-tpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: windows-qe-tpl
on:
workflow_call:
inputs:
workflow-id:
trigger-workflow-id:
required: true
type: string
qe-type:
Expand All @@ -15,17 +15,6 @@ on:
preset:
description: preset type only required if qe-type is e2e
type: string
secrets:
pull-secret:
required: true
arm-tenant-id:
required: true
arm-subscription-id:
required: true
arm-client-id:
required: true
arm-client-secret:
required: true

jobs:
windows-qe:
Expand All @@ -36,20 +25,30 @@ jobs:
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'
windows-version: ['11']
windows-featurepack: ['23h2-ent']

steps:
- name: Download artifacts to be tested
- name: Download gh context
id: download-gh-context-artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: ${{inputs.workflow_id}}
workflow: ${{inputs.trigger-workflow-id}}
name: gh-context

- name: Download windows installer
id: download-windows-installer-artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: ${{inputs.trigger-workflow-id}}
name: windows-installer

- name: Download qe oci image
id: download-qe-oci-image-artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: ${{inputs.trigger-workflow-id}}
name: crc-${{inputs.qe-type}}-windows-amd64

- name: Set environment for the run
run: |
Expand All @@ -61,13 +60,13 @@ jobs:
fi
echo "commit_sha=${commit_sha}" >> "$GITHUB_ENV"
# Save pull-secret as file
echo ${{secrets.pull-secret}} > pull-secret
echo ${{secrets.PULL_SECRET}} > pull-secret

- name: Add status to the PR check
run: |
set -xuo
# Status msg
data="{\"state\":\"pending\"
data="{\"state\":\"pending\""
data="${data},\"description\":\"Running ${{inputs.qe-type}} on Windows\""
data="${data},\"context\":\"ci/gh/${{inputs.qe-type}}/windows-${{matrix.windows-version}}-${{matrix.windows-featurepack}}\""
data="${data},\"target_url\":\"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}"
Expand All @@ -83,10 +82,10 @@ jobs:
# Create instance
podman run -d --name windows-create --rm \
-v ${PWD}:/workspace:z \
-e ARM_TENANT_ID=${{secrets.arm-tenant-id}} \
-e ARM_SUBSCRIPTION_ID=${{secrets.arm-subscription-id}} \
-e ARM_CLIENT_ID=${{secrets.arm-client-id}} \
-e ARM_CLIENT_SECRET='${{secrets.arm-client-secret}}' \
-e ARM_TENANT_ID=${{secrets.ARM_TENANT_ID}} \
-e ARM_SUBSCRIPTION_ID=${{secrets.ARM_SUBSCRIPTION_ID}} \
-e ARM_CLIENT_ID=${{secrets.ARM_CLIENT_ID}} \
-e ARM_CLIENT_SECRET='${{secrets.ARM_CLIENT_SECRET}}' \
quay.io/rhqp/qenvs:v0.6.3 azure \
windows create \
--project-name 'windows-desktop' \
Expand Down Expand Up @@ -173,9 +172,9 @@ jobs:
run: |
set -xuo
# Status msg
data="{\"state\":\"success\"
data="{\"state\":\"success\""
if [[ ${{steps.test-report.outcome}} != "success" ]]; then
data="{\"state\":\"failure\"
data="{\"state\":\"failure\""
fi
data="${data},\"description\":\"Finished ${{inputs.qe-type}} on Windows\""
data="${data},\"context\":\"ci/gh/${{inputs.qe-type}}/windows-${{matrix.windows-version}}-${{matrix.windows-featurepack}}\""
Expand All @@ -195,10 +194,10 @@ jobs:
# Destroy
podman run -d --name windows-destroy --rm \
-v ${PWD}:/workspace:z \
-e ARM_TENANT_ID=${{secrets.arm-tenant-id}} \
-e ARM_SUBSCRIPTION_ID=${{secrets.arm-subscription-id}} \
-e ARM_CLIENT_ID=${{secrets.arm-client-id}} \
-e ARM_CLIENT_SECRET='${{secrets.arm-client-secret}}' \
-e ARM_TENANT_ID=${{secrets.ARM_TENANT_ID}} \
-e ARM_SUBSCRIPTION_ID=${{secrets.ARM_SUBSCRIPTION_ID}} \
-e ARM_CLIENT_ID=${{secrets.ARM_CLIENT_ID}} \
-e ARM_CLIENT_SECRET='${{secrets.ARM_CLIENT_SECRET}}' \
quay.io/rhqp/qenvs:v0.6.3 azure \
windows destroy \
--project-name 'windows-desktop' \
Expand Down
Loading