Skip to content

Commit

Permalink
Fix BASE_IMAGE param
Browse files Browse the repository at this point in the history
The Azure pipeline has been modified to support BASE_IMAGE
param so it can be used to test different platforms.

The RPM spec file has been modified to depend specifically
on maven-local-openjdk17 to ensure that the build is done
consistently using OpenJDK 17 across platforms.

https://github.com/dogtagpki/pki/wiki/Configuring-Test-OS
  • Loading branch information
edewata committed Feb 20, 2024
1 parent 2a24da9 commit 00fdb21
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@ jobs:
pool:
vmImage: ubuntu-latest
steps:
- task: PythonScript@0
displayName: Set environment variables
inputs:
scriptSource: inline
script: |
import os
value = os.getenv('BASE_IMAGE', 'registry.fedoraproject.org/fedora:latest')
print('BASE_IMAGE: {value}'.format(value=value))
print('##vso[task.setvariable variable=BASE_IMAGE]{value}'.format(value=value))
- script: |
docker build \
--build-arg BASE_IMAGE=$BASE_IMAGE \
--target pki-base \
--tag pki-base:latest \
.
Expand All @@ -27,8 +39,9 @@ jobs:
displayName: Create runner container
- script: |
docker exec runner dnf install -y dnf-plugins-core rpm-build maven
docker exec runner dnf copr enable -y ${COPR_REPO:-@pki/master}
docker exec runner dnf install -y dnf-plugins-core rpm-build
if [ -n "$COPR_REPO" ]; then docker exec runner dnf copr enable -y $COPR_REPO; fi
docker exec runner dnf builddep -y --spec /root/src/pki.spec
docker exec runner dnf install -y dogtag-console-framework
displayName: Install PKI dependencies
Expand Down
2 changes: 1 addition & 1 deletion pki.spec
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ BuildRequires: policycoreutils

# Java build dependencies
BuildRequires: %{java_devel}
BuildRequires: maven-local
BuildRequires: maven-local-openjdk17
%if 0%{?fedora}
BuildRequires: xmvn-tools
%endif
Expand Down

0 comments on commit 00fdb21

Please sign in to comment.