Skip to content

Commit

Permalink
Add default value for COPR_REPO
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
edewata committed Jun 20, 2023
1 parent 3947a65 commit f271e17
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/acme-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build PKI

on: [push, pull_request]

env:
COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }}

jobs:
init:
name: Initialization
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ipa-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: IPA Tests

on: [push, pull_request]

env:
COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }}

jobs:
init:
name: Initialization
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/sonarcloud-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f271e17

Please sign in to comment.