Azure: Template docs build

The distros may use different sphinx builder paths,
for example, by exporting of SPHINXBUILD env var.

Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin 2021-03-10 23:49:59 +03:00 committed by Florence Blanc-Renaud
parent 85c63fbe62
commit 908e8cf338
6 changed files with 40 additions and 13 deletions

View File

@ -29,7 +29,7 @@ jobs:
- template: templates/${{ variables.BUILD_TEMPLATE }} - template: templates/${{ variables.BUILD_TEMPLATE }}
- template: templates/publish-build.yml - template: templates/publish-build.yml
parameters: parameters:
artifactName: 'packages-$(Build.BuildId)-$(Agent.OS)-$(Agent.OSArchitecture)' artifactName: 'packages'
targetPath: $(Build.Repository.LocalPath)/dist targetPath: $(Build.Repository.LocalPath)/dist
displayName: Publish packages displayName: Publish packages
@ -44,7 +44,7 @@ jobs:
displayName: Create container image for test displayName: Create container image for test
- template: templates/publish-build.yml - template: templates/publish-build.yml
parameters: parameters:
artifactName: 'image-$(Build.BuildId)-$(Agent.OS)-$(Agent.OSArchitecture)' artifactName: 'image'
targetPath: $(Build.Repository.LocalPath)/freeipa-azure-builder-container.tar.gz targetPath: $(Build.Repository.LocalPath)/freeipa-azure-builder-container.tar.gz
displayName: Publish container image displayName: Publish container image
- template: templates/generate-matrix.yml - template: templates/generate-matrix.yml
@ -71,13 +71,13 @@ jobs:
set -e set -e
echo "Running make target 'lint'" echo "Running make target 'lint'"
make V=0 lint make V=0 lint
echo "Building documentation" displayName: Lint sources
make -C doc/ html - template: templates/${{ variables.BUILD_DOCS_TEMPLATE }}
displayName: Lint sources and documentation - template: templates/publish-build.yml
- template: templates/save-test-artifacts.yml
parameters: parameters:
logsPath: doc/_build/html artifactName: 'docs'
logsArtifact: docs-$(System.JobIdentifier)-$(Build.BuildId)-$(System.StageAttempt)-$(System.PhaseAttempt)-$(System.JobPositionInPhase) targetPath: doc/_build/html
displayName: Publish docs
- job: Tox - job: Tox
pool: pool:
@ -129,6 +129,9 @@ jobs:
pool: pool:
vmImage: $(VM_IMAGE) vmImage: $(VM_IMAGE)
dependsOn: Build dependsOn: Build
variables:
IPA_IMAGE_ARTIFACT: $[ dependencies.Build.outputs['artifacts_image.image'] ]
IPA_PACKAGES_ARTIFACT: $[ dependencies.Build.outputs['artifacts_packages.packages'] ]
condition: succeeded() condition: succeeded()
strategy: strategy:
matrix: $[ dependencies.Build.outputs['base_matrix.matrix'] ] matrix: $[ dependencies.Build.outputs['base_matrix.matrix'] ]
@ -140,6 +143,9 @@ jobs:
pool: pool:
vmImage: $(VM_IMAGE) vmImage: $(VM_IMAGE)
dependsOn: Build dependsOn: Build
variables:
IPA_IMAGE_ARTIFACT: $[ dependencies.Build.outputs['artifacts_image.image'] ]
IPA_PACKAGES_ARTIFACT: $[ dependencies.Build.outputs['artifacts_packages.packages'] ]
condition: succeeded() condition: succeeded()
strategy: strategy:
matrix: $[ dependencies.Build.outputs['gating_matrix.matrix'] ] matrix: $[ dependencies.Build.outputs['gating_matrix.matrix'] ]

View File

@ -0,0 +1,6 @@
steps:
- script: |
set -e
echo "Building documentation"
make -C doc/ html
displayName: Build documentation

View File

@ -4,8 +4,17 @@ parameters:
displayName: '' displayName: ''
steps: steps:
- script: |
set -e
ARTIFACT_NAME="${{ parameters.artifactName }}-$(Build.BuildId)-$(System.StageAttempt)-$(System.PhaseAttempt)-$(Agent.OS)-$(Agent.OSArchitecture)"
echo "Artifact name: '${ARTIFACT_NAME}'"
echo "##vso[task.setvariable variable=${{ parameters.artifactName }};isOutput=true]${ARTIFACT_NAME}"
name: artifacts_${{ parameters.artifactName }}
displayName: Generate unique artifact name for ${{ parameters.artifactName }}
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
inputs: inputs:
artifactName: ${{ parameters.artifactName }} artifactName: $(artifacts_${{ parameters.artifactName }}.${{ parameters.artifactName }})
targetPath: ${{ parameters.targetPath }} targetPath: ${{ parameters.targetPath }}
displayName: ${{ parameters.displayName }} displayName: ${{ parameters.displayName }}

View File

@ -18,15 +18,15 @@ steps:
displayName: Configure NFS to allow NFS server/client within containers displayName: Configure NFS to allow NFS server/client within containers
- task: DownloadPipelineArtifact@0 - task: DownloadPipelineArtifact@0
displayName: Download prebuilt packages displayName: Download prebuilt packages '$(IPA_PACKAGES_ARTIFACT)'
inputs: inputs:
artifactName: 'packages-$(Build.BuildId)-$(Agent.OS)-$(Agent.OSArchitecture)' artifactName: $(IPA_PACKAGES_ARTIFACT)
targetPath: $(Build.Repository.LocalPath)/dist targetPath: $(Build.Repository.LocalPath)/dist
- task: DownloadPipelineArtifact@0 - task: DownloadPipelineArtifact@0
displayName: Download pre-built container displayName: Download pre-built container '$(IPA_IMAGE_ARTIFACT)'
inputs: inputs:
artifactName: 'image-$(Build.BuildId)-$(Agent.OS)-$(Agent.OSArchitecture)' artifactName: $(IPA_IMAGE_ARTIFACT)
targetPath: $(Build.Repository.LocalPath) targetPath: $(Build.Repository.LocalPath)
- script: | - script: |

View File

@ -17,4 +17,7 @@ variables:
PREPARE_TOX_TEMPLATE: ${{ format('prepare-tox-{0}.yml', variables.IPA_PLATFORM) }} PREPARE_TOX_TEMPLATE: ${{ format('prepare-tox-{0}.yml', variables.IPA_PLATFORM) }}
PREPARE_WEBUI_TEMPLATE: ${{ format('prepare-webui-{0}.yml', variables.IPA_PLATFORM) }} PREPARE_WEBUI_TEMPLATE: ${{ format('prepare-webui-{0}.yml', variables.IPA_PLATFORM) }}
# the template to build sphinx docs
BUILD_DOCS_TEMPLATE: ${{ format('build-docs-{0}.yml', variables.IPA_PLATFORM) }}
TOX_COMMAND: tox TOX_COMMAND: tox

View File

@ -20,4 +20,7 @@ variables:
PREPARE_TOX_TEMPLATE: ${{ format('prepare-tox-{0}.yml', variables.IPA_PLATFORM) }} PREPARE_TOX_TEMPLATE: ${{ format('prepare-tox-{0}.yml', variables.IPA_PLATFORM) }}
PREPARE_WEBUI_TEMPLATE: ${{ format('prepare-webui-{0}.yml', variables.IPA_PLATFORM) }} PREPARE_WEBUI_TEMPLATE: ${{ format('prepare-webui-{0}.yml', variables.IPA_PLATFORM) }}
# the template to build sphinx docs
BUILD_DOCS_TEMPLATE: ${{ format('build-docs-{0}.yml', variables.IPA_PLATFORM) }}
TOX_COMMAND: tox TOX_COMMAND: tox