From f271e17ac849916349b31d22a1f2ed932908a29a Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 16 Jun 2023 22:39:00 -0500 Subject: [PATCH] Add default value for COPR_REPO The CI has been modified to define the default value for COPR_REPO since PRs do not have access to the upstream project variables. This is necessary to provide the resteasy-servlet-initializer package for CI. --- .github/workflows/acme-tests.yml | 9 +++++---- .github/workflows/build.yml | 17 ++++++++++------- .github/workflows/ipa-tests.yml | 9 ++++++--- .github/workflows/sonarcloud-pull.yml | 9 ++++++--- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/acme-tests.yml b/.github/workflows/acme-tests.yml index 06522234722..be255af5e7e 100644 --- a/.github/workflows/acme-tests.yml +++ b/.github/workflows/acme-tests.yml @@ -4,6 +4,7 @@ on: [push, pull_request] env: NAMESPACE: ${{ vars.REGISTRY_NAMESPACE || github.repository_owner }} + COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} jobs: init: @@ -35,7 +36,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-deps target: pki-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -47,7 +48,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-builder-deps target: pki-builder-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -59,7 +60,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} BUILD_OPTS=--with-pkgs=base,server,ca,acme --without-test tags: pki-runner target: pki-runner @@ -72,7 +73,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} BUILD_OPTS=--with-pkgs=base,server,ca,acme --without-test tags: pki-acme target: pki-acme diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06199f95ea2..e9ff223d4fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,9 @@ name: Build PKI on: [push, pull_request] +env: + COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} + jobs: init: name: Initialization @@ -33,7 +36,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-deps target: pki-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -45,7 +48,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-builder-deps target: pki-builder-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -57,7 +60,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-builder target: pki-builder cache-from: type=local,src=/tmp/.buildx-cache @@ -69,7 +72,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-dist target: pki-dist cache-from: type=local,src=/tmp/.buildx-cache @@ -81,7 +84,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-runner target: pki-runner cache-from: type=local,src=/tmp/.buildx-cache @@ -93,7 +96,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-server target: pki-server cache-from: type=local,src=/tmp/.buildx-cache @@ -105,7 +108,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-ca target: pki-ca cache-from: type=local,src=/tmp/.buildx-cache diff --git a/.github/workflows/ipa-tests.yml b/.github/workflows/ipa-tests.yml index 05a52748fe0..1db761f85d6 100644 --- a/.github/workflows/ipa-tests.yml +++ b/.github/workflows/ipa-tests.yml @@ -2,6 +2,9 @@ name: IPA Tests on: [push, pull_request] +env: + COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} + jobs: init: name: Initialization @@ -32,7 +35,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-deps target: pki-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -44,7 +47,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-builder-deps target: pki-builder-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -56,7 +59,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} BUILD_OPTS=--with-pkgs=base,server,ca,kra,acme --without-test tags: ipa-runner target: ipa-runner diff --git a/.github/workflows/sonarcloud-pull.yml b/.github/workflows/sonarcloud-pull.yml index 2ee89ecdd80..8fff6c5d81d 100644 --- a/.github/workflows/sonarcloud-pull.yml +++ b/.github/workflows/sonarcloud-pull.yml @@ -5,6 +5,9 @@ on: types: - completed +env: + COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} + jobs: retrieve-pr: if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' @@ -110,7 +113,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-deps target: pki-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -122,7 +125,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-builder-deps target: pki-builder-deps cache-to: type=local,dest=/tmp/.buildx-cache @@ -134,7 +137,7 @@ jobs: context: . build-args: | BASE_IMAGE=${{ needs.init.outputs.base-image }} - COPR_REPO=${{ vars.COPR_REPO }} + COPR_REPO=${{ env.COPR_REPO }} tags: pki-runner target: pki-runner cache-from: type=local,src=/tmp/.buildx-cache