Azure: Run Lint task as separate job

Lint task uses PyPI to get the latest Pylint, which may pull in
any other packages as dependencies. For distro isolation the Lint
job should not produce any meaningful artifacts or they should not
be used in subsequent jobs. So, this job have to be isolated from
the others.

Fixes: https://pagure.io/freeipa/issue/8772
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin
2021-03-25 22:56:58 +03:00
committed by Florence Blanc-Renaud
parent 91e7452393
commit 7855c77f93
5 changed files with 26 additions and 0 deletions

View File

@@ -66,12 +66,23 @@ jobs:
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker
steps:
- template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }}
- template: templates/${{ variables.PREPARE_LINT_TEMPLATE }}
- template: templates/${{ variables.AUTOCONF_TEMPLATE }}
- script: |
set -e
echo "Running make target 'lint'"
make V=0 lint
displayName: Lint sources
- job: Docs
pool:
vmImage: $(VM_IMAGE)
container:
image: $(DOCKER_BUILD_IMAGE)
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker
steps:
- template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }}
- template: templates/${{ variables.AUTOCONF_TEMPLATE }}
- template: templates/${{ variables.BUILD_DOCS_TEMPLATE }}
- template: templates/publish-build.yml
parameters:

View File

@@ -0,0 +1,7 @@
steps:
- script: |
set -e
sudo dnf -y install python3-pip
# https://pagure.io/freeipa/issue/8771
python3 -m pip install --user --upgrade astroid pylint==2.7.1
displayName: Install Lint dependencies

View File

@@ -17,6 +17,9 @@ variables:
PREPARE_TOX_TEMPLATE: ${{ format('prepare-tox-{0}.yml', variables.IPA_PLATFORM) }}
PREPARE_WEBUI_TEMPLATE: ${{ format('prepare-webui-{0}.yml', variables.IPA_PLATFORM) }}
# the template to install Lint dependencies
PREPARE_LINT_TEMPLATE: ${{ format('prepare-lint-{0}.yml', variables.IPA_PLATFORM) }}
# the template to build sphinx docs
BUILD_DOCS_TEMPLATE: ${{ format('build-docs-{0}.yml', variables.IPA_PLATFORM) }}

View File

@@ -20,6 +20,9 @@ variables:
PREPARE_TOX_TEMPLATE: ${{ format('prepare-tox-{0}.yml', variables.IPA_PLATFORM) }}
PREPARE_WEBUI_TEMPLATE: ${{ format('prepare-webui-{0}.yml', variables.IPA_PLATFORM) }}
# the template to install Lint dependencies
PREPARE_LINT_TEMPLATE: ${{ format('prepare-lint-{0}.yml', variables.IPA_PLATFORM) }}
# the template to build sphinx docs
BUILD_DOCS_TEMPLATE: ${{ format('build-docs-{0}.yml', variables.IPA_PLATFORM) }}