diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cac75b9b130..4e947430960 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 \ . @@ -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 diff --git a/pki.spec b/pki.spec index bc315290ca6..5634f55c51f 100644 --- a/pki.spec +++ b/pki.spec @@ -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