From 83e16a4e47fcf488aa5f9aab6c0f0424990ab171 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Wed, 17 Feb 2021 18:29:02 +0300 Subject: [PATCH] Azure: Run rpmlint on Fedora Template the autoconf phase. Fixes: https://pagure.io/freeipa/issue/8768 Signed-off-by: Stanislav Levin Reviewed-By: Rob Crittenden Reviewed-By: Alexander Bokovoy --- freeipa.spec.in | 4 ++-- ipatests/azure/azure-pipelines.yml | 18 +++--------------- ipatests/azure/templates/autoconf-fedora.yml | 12 ++++++++++++ ipatests/azure/templates/variables-fedora.yml | 3 +++ ipatests/azure/templates/variables-rawhide.yml | 3 +++ 5 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 ipatests/azure/templates/autoconf-fedora.yml diff --git a/freeipa.spec.in b/freeipa.spec.in index cfa7bc788..7a665e0c4 100755 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -49,9 +49,9 @@ # lint is not executed during rpmbuild # %%global with_lint 1 %if %{with lint} - %global linter_options --enable-pylint --with-jslint + %global linter_options --enable-pylint --with-jslint --enable-rpmlint %else - %global linter_options --disable-pylint --without-jslint + %global linter_options --disable-pylint --without-jslint --disable-rpmlint %endif # Include SELinux subpackage diff --git a/ipatests/azure/azure-pipelines.yml b/ipatests/azure/azure-pipelines.yml index e90f37e32..3367b7678 100644 --- a/ipatests/azure/azure-pipelines.yml +++ b/ipatests/azure/azure-pipelines.yml @@ -19,11 +19,7 @@ jobs: options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker steps: - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }} - - script: | - set -e - echo "Running autoconf generator" - ./autogen.sh - displayName: Configure the project + - template: templates/${{ variables.AUTOCONF_TEMPLATE }} - script: | set -e git update-ref refs/heads/$(System.PullRequest.TargetBranch) origin/$(System.PullRequest.TargetBranch) @@ -70,11 +66,7 @@ jobs: options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker steps: - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }} - - script: | - set -e - echo "Running autoconf generator" - ./autogen.sh - displayName: Configure the project + - template: templates/${{ variables.AUTOCONF_TEMPLATE }} - script: | set -e echo "Running make target 'lint'" @@ -119,11 +111,7 @@ jobs: steps: - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }} - template: templates/${{ variables.PREPARE_WEBUI_TEMPLATE }} - - script: | - set -e - echo "Running autoconf generator" - ./autogen.sh - displayName: Configure the project + - template: templates/${{ variables.AUTOCONF_TEMPLATE }} - script: | set -e echo "Running WebUI unit tests" diff --git a/ipatests/azure/templates/autoconf-fedora.yml b/ipatests/azure/templates/autoconf-fedora.yml new file mode 100644 index 000000000..df820e44c --- /dev/null +++ b/ipatests/azure/templates/autoconf-fedora.yml @@ -0,0 +1,12 @@ +parameters: + options: '' + +steps: +- script: | + set -e + echo "Running autoconf generator" + ./autogen.sh \ + ${{ parameters.options }} \ + --enable-rpmlint \ + + displayName: Configure the project diff --git a/ipatests/azure/templates/variables-fedora.yml b/ipatests/azure/templates/variables-fedora.yml index 3e8f878c2..133a4a10a 100644 --- a/ipatests/azure/templates/variables-fedora.yml +++ b/ipatests/azure/templates/variables-fedora.yml @@ -6,6 +6,9 @@ variables: # the Dockerfile to build Docker image for running IPA tests DOCKER_DOCKERFILE: ${{ format('Dockerfile.build.{0}', variables.IPA_PLATFORM) }} + # the template to autoconf the project + AUTOCONF_TEMPLATE: ${{ format('autoconf-{0}.yml', variables.IPA_PLATFORM) }} + # the template to install IPA's buildtime dependencies PREPARE_BUILD_TEMPLATE: ${{ format('prepare-build-{0}.yml', variables.IPA_PLATFORM) }} diff --git a/ipatests/azure/templates/variables-rawhide.yml b/ipatests/azure/templates/variables-rawhide.yml index 6cbc78d18..3fb0cddc3 100644 --- a/ipatests/azure/templates/variables-rawhide.yml +++ b/ipatests/azure/templates/variables-rawhide.yml @@ -9,6 +9,9 @@ variables: # the Dockerfile to build Docker image for running IPA tests DOCKER_DOCKERFILE: 'Dockerfile.build.rawhide' + # the template to autoconf the project + AUTOCONF_TEMPLATE: ${{ format('autoconf-{0}.yml', variables.IPA_PLATFORM) }} + # the template to install IPA's buildtime dependencies PREPARE_BUILD_TEMPLATE: ${{ format('prepare-build-{0}.yml', variables.IPA_PLATFORM) }}