From 4200eff6e1b5b135566ccd5458eb7e869681eadc Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 17:29:20 +0200 Subject: [PATCH 01/11] [qe] fix check for condition for a starting cluster behind proxy A condition to ensure the state of the cluster after starting it behind a proxy was introduce in https://github.com/crc-org/crc/commit/4a9a35bb1e3f954560d59dce7736606ec29bd320 that check is using a function which relies on the shell instance but that instance is not initialize anywhere as so the check is failing with an error showing shell instance is not initialize. This commit initialize the instance and now the check is working as expected Signed-off-by: Adrian Riobo Lorenzo --- test/integration/testsuite_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/testsuite_test.go b/test/integration/testsuite_test.go index c95ed59845..0e9ecdba1b 100644 --- a/test/integration/testsuite_test.go +++ b/test/integration/testsuite_test.go @@ -63,6 +63,10 @@ var _ = BeforeSuite(func() { err = util.RemoveCRCConfig() Expect(err).NotTo(HaveOccurred()) + // start shell instance + err = util.StartHostShellInstance("") + Expect(err).NotTo(HaveOccurred()) + // set credPath credPath = filepath.Join(userHome, ".crc", "machines", "crc", "id_rsa") From 97972d13bc7a1f4e0c5c1d124d957c2318036ecb Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Thu, 25 Apr 2024 11:06:57 +0530 Subject: [PATCH 02/11] Chocolatey: Update project url for crc spec https://crc.dev/blog/about is no longer works and `about` section is removed, this pr update to latest valid url It will also fix the issue which described in https://community.chocolatey.org/packages/crc/2.34.1#dependencies one. --- packaging/chocolatey/crc/crc.nuspec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/chocolatey/crc/crc.nuspec.in b/packaging/chocolatey/crc/crc.nuspec.in index 270bc9f11d..7370b50e5a 100755 --- a/packaging/chocolatey/crc/crc.nuspec.in +++ b/packaging/chocolatey/crc/crc.nuspec.in @@ -6,7 +6,7 @@ anjannath CRC - Runs Containers https://github.com/crc-org - https://crc.dev/blog/about + https://crc.dev/blog https://github.com/crc-org/crc/issues https://cdn.statically.io/gh/crc-org/blog/main/static/crc-upstream-logo.png https://github.com/crc-org/crc/blob/main/LICENSE From 958210e1ced1ef7aee50f6db220bae4e746f0670 Mon Sep 17 00:00:00 2001 From: Matus Skvarla Date: Wed, 3 Apr 2024 11:24:22 +0200 Subject: [PATCH 03/11] telemetry: add no-op functionality Currently, when telemetry initialization fails, this is a hard failure for the `crc` command and daemon, and they exit. This commit handles this more gracefully, when there's a telemetry initialization failure, an empty `Noop Client` instance is returned, and all `Client` methods check for this `Noop` instance and return early if needed. --- cmd/crc/cmd/root.go | 3 ++- pkg/crc/segment/segment.go | 30 ++++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/cmd/crc/cmd/root.go b/cmd/crc/cmd/root.go index f257844cab..28d3bab37c 100644 --- a/cmd/crc/cmd/root.go +++ b/cmd/crc/cmd/root.go @@ -61,7 +61,8 @@ func init() { // Initiate segment client if segmentClient, err = segment.NewClient(config, httpproxy.HTTPTransport()); err != nil { - logging.Fatal(err.Error()) + logging.Warn(err.Error()) + logging.Warn("Error during segment client initialization, telemetry will be unavailable in this session") } // subcommands diff --git a/pkg/crc/segment/segment.go b/pkg/crc/segment/segment.go index ee6c0cc594..5426728702 100644 --- a/pkg/crc/segment/segment.go +++ b/pkg/crc/segment/segment.go @@ -39,17 +39,24 @@ type Client struct { identifyHashPath string } +var NoopClient = &Client{} + func NewClient(config *crcConfig.Config, transport http.RoundTripper) (*Client, error) { - return newCustomClient(config, transport, + client, err := newCustomClient(config, transport, filepath.Join(constants.GetHomeDir(), ".redhat", "anonymousId"), filepath.Join(constants.CrcBaseDir, "segmentIdentifyHash"), analytics.DefaultEndpoint) + if err != nil { + // Return empty client (noop client) -- telemetry will not be available + return NoopClient, err + } + return client, nil } func newCustomClient(config *crcConfig.Config, transport http.RoundTripper, telemetryFilePath, identifyHashFilePath, segmentEndpoint string) (*Client, error) { userID, err := getUserIdentity(telemetryFilePath) if err != nil { - return nil, err + return NoopClient, err } client, err := analytics.NewWithConfig(WriteKey, analytics.Config{ Endpoint: segmentEndpoint, @@ -60,12 +67,12 @@ func newCustomClient(config *crcConfig.Config, transport http.RoundTripper, tele Transport: transport, }) if err != nil { - return nil, err + return NoopClient, err } identifyHash, err := readIdentifyHash(identifyHashFilePath) if err != nil { - return nil, err + return NoopClient, err } return &Client{ @@ -79,15 +86,24 @@ func newCustomClient(config *crcConfig.Config, transport http.RoundTripper, tele } func (c *Client) Close() error { + if c == NoopClient { + return nil + } return c.segmentClient.Close() } func (c *Client) UploadAction(action, source, status string) error { + if c == NoopClient { + return nil + } return c.upload(action, baseProperties(source). Set("status", status)) } func (c *Client) UploadCmd(ctx context.Context, action string, duration time.Duration, err error) error { + if c == NoopClient { + return nil + } return c.upload(action, properties(ctx, err, duration)) } @@ -159,6 +175,9 @@ func writeIdentifyHash(client *Client) error { } func (c *Client) identifyNew() *analytics.Identify { + if c == NoopClient { + return &analytics.Identify{} + } return &analytics.Identify{ UserId: c.userID, Traits: addConfigTraits(c.config, traits()), @@ -166,6 +185,9 @@ func (c *Client) identifyNew() *analytics.Identify { } func (c *Client) upload(action string, a analytics.Properties) error { + if c == NoopClient { + return nil + } if c.config.Get(crcConfig.ConsentTelemetry).AsString() != "yes" { return nil } From f8b4f1da8f4e924f9978b0ef4407d358eef25553 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 10:07:57 +0200 Subject: [PATCH 04/11] [qe] Use ubi8 image as builder for qe images As part of commit https://github.com/crc-org/crc/commit/ae4e57fea6881f4920c3dca397a165bf409d7092 we changed the e2e and integration images; as ubi9 based images were used to build the e2e and integration binaries those can not be executed on RHEL8 target hosts. This fix change the builders to use ubi8 based images Signed-off-by: Adrian Riobo Lorenzo --- images/build-e2e/Containerfile | 2 +- images/build-integration/Containerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/build-e2e/Containerfile b/images/build-e2e/Containerfile index 25160ba121..94aaa7634c 100644 --- a/images/build-e2e/Containerfile +++ b/images/build-e2e/Containerfile @@ -1,5 +1,5 @@ -FROM registry.access.redhat.com/ubi9/go-toolset:1.20 AS builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.20 AS builder USER root diff --git a/images/build-integration/Containerfile b/images/build-integration/Containerfile index 6eda99fd71..ca498f963a 100644 --- a/images/build-integration/Containerfile +++ b/images/build-integration/Containerfile @@ -1,5 +1,5 @@ -FROM registry.access.redhat.com/ubi9/go-toolset:1.20 AS builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.20 AS builder USER root From be2c439ee0e362c8955826ee397558ece5931229 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 10:10:45 +0200 Subject: [PATCH 05/11] [qe] fix integration image scripts The scripts used to run the integration tests require to set several environment variables to customize the execution; the way the script try to set them and run the integration binary inheriting them was not right. This fix export those variables and execute the integration binary properly Signed-off-by: Adrian Riobo Lorenzo --- images/build-integration/lib/darwin/run.sh | 8 ++++---- images/build-integration/lib/linux/run.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/images/build-integration/lib/darwin/run.sh b/images/build-integration/lib/darwin/run.sh index 4665cca7f5..d8346eacf1 100755 --- a/images/build-integration/lib/darwin/run.sh +++ b/images/build-integration/lib/darwin/run.sh @@ -32,14 +32,14 @@ done mkdir -p $targetFolder/results # Run tests -PATH="$PATH:${HOME}/$targetFolder/bin" -PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" +export PATH="$PATH:${HOME}/$targetFolder/bin" +export PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" if [ ! -z "$bundleLocation" ] then - BUNDLE_PATH="$bundleLocation" + export BUNDLE_PATH="$bundleLocation" fi cd $targetFolder/bin -. integration.test > integration.results +./integration.test > integration.results # Copy results cd .. diff --git a/images/build-integration/lib/linux/run.sh b/images/build-integration/lib/linux/run.sh index 4665cca7f5..d8346eacf1 100755 --- a/images/build-integration/lib/linux/run.sh +++ b/images/build-integration/lib/linux/run.sh @@ -32,14 +32,14 @@ done mkdir -p $targetFolder/results # Run tests -PATH="$PATH:${HOME}/$targetFolder/bin" -PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" +export PATH="$PATH:${HOME}/$targetFolder/bin" +export PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" if [ ! -z "$bundleLocation" ] then - BUNDLE_PATH="$bundleLocation" + export BUNDLE_PATH="$bundleLocation" fi cd $targetFolder/bin -. integration.test > integration.results +./integration.test > integration.results # Copy results cd .. From af9b70e8a5361ceafb3be258dcdae6220c77d410 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 10:11:50 +0200 Subject: [PATCH 06/11] [qe] change the httpd image used within e2e to registry.access.redhat.com/ubi8/httpd-24:latest This image was partially used within e2e, now we extend its usage to all the remainig places Signed-off-by: Adrian Riobo Lorenzo --- test/e2e/features/story_openshift.feature | 4 ++-- test/e2e/testsuite/testsuite.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/features/story_openshift.feature b/test/e2e/features/story_openshift.feature index 8d0bab8484..3419f87ac9 100644 --- a/test/e2e/features/story_openshift.feature +++ b/test/e2e/features/story_openshift.feature @@ -41,7 +41,7 @@ Feature: 4 Openshift stories Given executing "oc new-project testproj" succeeds # mirror When executing "oc registry login --insecure=true" succeeds - Then executing "oc image mirror quay.io/centos7/httpd-24-centos7:centos7=default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test --insecure=true --filter-by-os=linux/amd64" succeeds + Then executing "oc image mirror registry.access.redhat.com/ubi8/httpd-24:latest=default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test --insecure=true --filter-by-os=linux/amd64" succeeds And executing "oc set image-lookup hello" succeeds # deploy When executing "oc apply -f hello.yaml" succeeds @@ -56,7 +56,7 @@ Feature: 4 Openshift stories Scenario: Pull image locally, push to registry, deploy Given podman command is available And executing "oc new-project testproj" succeeds - When pulling image "quay.io/centos7/httpd-24-centos7:centos7", logging in, and pushing local image to internal registry succeeds + When pulling image "registry.access.redhat.com/ubi8/httpd-24:latest", logging in, and pushing local image to internal registry succeeds And executing "oc apply -f hello.yaml" succeeds When executing "oc rollout status deployment hello" succeeds Then stdout should contain "successfully rolled out" diff --git a/test/e2e/testsuite/testsuite.go b/test/e2e/testsuite/testsuite.go index 400a8e3e90..75a430d735 100644 --- a/test/e2e/testsuite/testsuite.go +++ b/test/e2e/testsuite/testsuite.go @@ -996,7 +996,7 @@ func PullLoginTagPushImageSucceeds(image string) error { return err } - _, err = cmd.RunPodmanExpectSuccess("push", "default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test", "--tls-verify=false") + _, err = cmd.RunPodmanExpectSuccess("push", "default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test", "--remove-signatures", "--tls-verify=false") if err != nil { return err } From 7c1818dc2455801e0a9e40358b149e0ab36bf0ab Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Tue, 30 Apr 2024 09:19:49 +0530 Subject: [PATCH 07/11] Update OpenShift version to 4.15.10 (latest channel) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b71593cf07..01fa935130 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: install SHELL := /bin/bash -OPENSHIFT_VERSION ?= 4.15.3 +OPENSHIFT_VERSION ?= 4.15.10 PODMAN_VERSION ?= 4.4.4 OKD_VERSION ?= 4.15.0-0.okd-2024-02-23-163410 MICROSHIFT_VERSION ?= 4.15.3 From a569a0e5be49725737a25672cac67208bf03a47e Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Tue, 30 Apr 2024 09:20:23 +0530 Subject: [PATCH 08/11] Update microshift version to 4.15.9 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 01fa935130..6496d29f81 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SHELL := /bin/bash OPENSHIFT_VERSION ?= 4.15.10 PODMAN_VERSION ?= 4.4.4 OKD_VERSION ?= 4.15.0-0.okd-2024-02-23-163410 -MICROSHIFT_VERSION ?= 4.15.3 +MICROSHIFT_VERSION ?= 4.15.9 BUNDLE_EXTENSION = crcbundle CRC_VERSION = 2.34.1 COMMIT_SHA?=$(shell git rev-parse --short=6 HEAD) From fdef61bb2775be908dcacf45af0660ebe33bf156 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Tue, 30 Apr 2024 09:21:04 +0530 Subject: [PATCH 09/11] cut v4.15.10 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6496d29f81..24f445483e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ PODMAN_VERSION ?= 4.4.4 OKD_VERSION ?= 4.15.0-0.okd-2024-02-23-163410 MICROSHIFT_VERSION ?= 4.15.9 BUNDLE_EXTENSION = crcbundle -CRC_VERSION = 2.34.1 +CRC_VERSION = 2.35.0 COMMIT_SHA?=$(shell git rev-parse --short=6 HEAD) MACOS_INSTALL_PATH = /usr/local/crc CONTAINER_RUNTIME ?= podman From 2e6b0d063683f570cbea55b9903f7c0163a11888 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Tue, 30 Apr 2024 14:53:19 +0200 Subject: [PATCH 10/11] test with download by gh Signed-off-by: Adrian Riobo Lorenzo --- .github/workflows/windows-e2e.yml | 4 +- .github/workflows/windows-qe-tpl.yml | 186 ++------------------------- 2 files changed, 15 insertions(+), 175 deletions(-) diff --git a/.github/workflows/windows-e2e.yml b/.github/workflows/windows-e2e.yml index 7438c3236e..a61414d004 100644 --- a/.github/workflows/windows-e2e.yml +++ b/.github/workflows/windows-e2e.yml @@ -8,7 +8,7 @@ on: jobs: windows-e2e-ocp: - uses: crc-org/crc/.github/workflows/windows-qe-tpl.yml@main + uses: adrianriobo/crc/.github/workflows/windows-qe-tpl.yml@main strategy: fail-fast: false matrix: @@ -22,7 +22,7 @@ jobs: - qe-type: 'integration' preset: 'microshift' with: - trigger-workflow-id: ${{ github.event.workflow_run.workflow_id }} + trigger-workflow-run-id: ${{ github.event.workflow_run.id }} qe-type: ${{matrix.qe-type}} preset: ${{matrix.preset}} secrets: inherit diff --git a/.github/workflows/windows-qe-tpl.yml b/.github/workflows/windows-qe-tpl.yml index 1cd1e70169..bbf57ef62c 100644 --- a/.github/workflows/windows-qe-tpl.yml +++ b/.github/workflows/windows-qe-tpl.yml @@ -5,7 +5,8 @@ name: windows-qe-tpl on: workflow_call: inputs: - trigger-workflow-id: + trigger-workflow-run-id: + description: run-id of the workflow which originate the execution and where the artifacts have been built required: true type: string qe-type: @@ -31,187 +32,26 @@ jobs: steps: - name: Download gh context id: download-gh-context-artifact - uses: dawidd6/action-download-artifact@v3 + uses: actions/download-artifact@v4 with: - workflow: ${{inputs.trigger-workflow-id}} name: gh-context + run-id: ${{inputs.trigger-workflow-run-id}} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Download windows installer id: download-windows-installer-artifact - uses: dawidd6/action-download-artifact@v3 + uses: actions/download-artifact@v4 with: - workflow: ${{inputs.trigger-workflow-id}} name: windows-installer - + run-id: ${{inputs.trigger-workflow-run-id}} + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Download qe oci image id: download-qe-oci-image-artifact - uses: dawidd6/action-download-artifact@v3 + uses: actions/download-artifact@v4 with: - workflow: ${{inputs.trigger-workflow-id}} name: crc-${{inputs.qe-type}}-windows-amd64 + run-id: ${{inputs.trigger-workflow-run-id}} + github-token: ${{ secrets.GITHUB_TOKEN }}git - - name: Correlate - env: - PULL_SECRET: ${{ secrets.PULL_SECRET }} - run: | - # Get origin commit sha for testing - commit_sha=$(cat gh_context.json | jq -r '.event.after') - if [[ -z "${commit_sha}" ]]; then - # on first PR creation .event.after is empty, then .sha is used as commit instead - commit_sha=$(cat gh_context.json | jq -r '.sha') - fi - echo "commit_sha=${commit_sha}" >> "$GITHUB_ENV" - - # Set status_context - status_context="ci/gh/${{inputs.qe-type}}" - if [[ "${{inputs.qe-type}}" == "e2e" ]]; then - status_context="${status_context}-${{inputs.preset}}" - fi - status_context="${status_context}/windows-${{matrix.windows-version}}-${{matrix.windows-featurepack}}" - echo "status_context=${status_context}" >> "$GITHUB_ENV" - - # Save pull-secret as file - echo "${PULL_SECRET}" > pull-secret - - - name: Add status to the PR check - run: | - set -xuo - # Status msg - data="{\"state\":\"pending\"" - data="${data},\"description\":\"Running ${{inputs.qe-type}}-${{inputs.preset}} on Windows\"" - data="${data},\"context\":\"${{ env.status_context }}\"" - data="${data},\"target_url\":\"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" - # Create status by API call - curl -L -v -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ github.token }}" \ - https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.commit_sha }} \ - -d "${data}" - - - name: Create Windows instance - run: | - # 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 AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \ - -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \ - quay.io/rhqp/qenvs:v0.6.3 azure \ - windows create \ - --project-name 'windows-desktop-${{ matrix.windows-version }}-${{ matrix.windows-featurepack }}-${{inputs.qe-type}}-${{inputs.preset}}' \ - --backed-url azblob://crc-qenvs-state/${{ env.commit_sha }} \ - --conn-details-output '/workspace' \ - --windows-version '${{matrix.windows-version}}' \ - --windows-featurepack '${{matrix.windows-featurepack}}' \ - --tags project=openshift-local,source=github,org=${{github.repository_owner}} \ - --spot - podman logs -f windows-create - - - name: Install CRC on host - run: | - podman run --rm -d --name crc-win-support \ - -e TARGET_HOST=$(cat host) \ - -e TARGET_HOST_USERNAME=$(cat username) \ - -e TARGET_HOST_KEY_PATH=/data/id_rsa \ - -e TARGET_FOLDER=crc-support \ - -e TARGET_CLEANUP='false' \ - -e OUTPUT_FOLDER=/data \ - -e DEBUG='true' \ - -v ${PWD}:/data:z \ - -v ${PWD}/crc-windows-installer.zip:/opt/crc-support/crc-windows-installer.zip:z \ - quay.io/rhqp/crc-support:v0.5-windows crc-support/run.ps1 \ - -targetPath "/Users/$(cat username)/crc-support" \ - -download 'false' \ - -install 'true' \ - -forceFresh 'false' - podman logs -f crc-win-support - - - name: Run CRC ${{inputs.qe-type}} - run: | - # load image - podman load -i crc-${{inputs.qe-type}}-windows-amd64.tar - # run - cmd="crc-qe/run.ps1 -junitFilename crc-${{inputs.qe-type}}-junit.xml -targetFolder crc-qe" - if [[ "${{inputs.qe-type}}" == "e2e" ]]; then - if [[ "${{inputs.preset}}" == "microshift" ]]; then - cmd="${cmd} -e2eTagExpression '@story_microshift'" - else - cmd="${cmd} -e2eTagExpression '~@minimal && ~@story_microshift'" - fi - fi - podman run --rm -d --name crc-${{inputs.qe-type}} \ - -e TARGET_HOST=$(cat host) \ - -e TARGET_HOST_USERNAME=$(cat username) \ - -e TARGET_HOST_KEY_PATH=/data/id_rsa \ - -e TARGET_FOLDER=crc-qe \ - -e TARGET_RESULTS=results \ - -e OUTPUT_FOLDER=/data \ - -e DEBUG=true \ - -v $PWD/pull-secret:/opt/crc/pull-secret:z \ - -v $PWD:/data:z \ - quay.io/crcont/crc-${{inputs.qe-type}}:gh-windows-amd64 \ - ${cmd} - podman logs -f crc-${{inputs.qe-type}} - - - name: Test Report - id: test-report - uses: mikepenz/action-junit-report@v4 - if: always() - with: - fail_on_failure: true - include_passed: true - detailed_summary: true - require_tests: true - report_paths: '**/*.xml' - - - name: Upload ${{inputs.qe-type}} results - uses: actions/upload-artifact@v4 - if: always() - with: - name: windows-${{inputs.qe-type}}-${{inputs.preset}}-${{matrix.windows-version}}${{matrix.windows-featurepack}} - path: | - **/*.xml - **/*.results - **/*.log - - - name: Update status of the PR check - if: always() - run: | - set -xuo - # Status msg - data="{\"state\":\"success\"" - if [[ ${{steps.test-report.outcome}} != "success" ]]; then - data="{\"state\":\"failure\"" - fi - data="${data},\"description\":\"Finished ${{inputs.qe-type}}-${{inputs.preset}} on Windows\"" - data="${data},\"context\":\"${{ env.status_context }}\"" - data="${data},\"target_url\":\"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" - # Create status by API call - curl -L -v -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ github.token }}" \ - https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.commit_sha }} \ - -d "${data}" - - - name: Destroy instance - if: always() - run: | - # Make sure lock is removed - rm -rf .pulumi/locks/* - # 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 AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \ - -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \ - quay.io/rhqp/qenvs:v0.6.3 azure \ - windows destroy \ - --project-name 'windows-desktop-${{ matrix.windows-version }}-${{ matrix.windows-featurepack }}-${{inputs.qe-type}}-${{inputs.preset}}' \ - --backed-url azblob://crc-qenvs-state/${{ env.commit_sha }} - podman logs -f windows-destroy + \ No newline at end of file From 77dfcd436783c6d0f533ede8ea310ccfdcc6cf1c Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Tue, 30 Apr 2024 14:55:39 +0200 Subject: [PATCH 11/11] fake Signed-off-by: Adrian Riobo Lorenzo --- .github/workflows/windows-qe-tpl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-qe-tpl.yml b/.github/workflows/windows-qe-tpl.yml index bbf57ef62c..302c21c1df 100644 --- a/.github/workflows/windows-qe-tpl.yml +++ b/.github/workflows/windows-qe-tpl.yml @@ -14,7 +14,7 @@ on: required: true type: string preset: - description: preset type only required if qe-type is e2e + description: preset type only required if qe-type is e2ea type: string jobs: