From 98dd7355f2f9f29e0da965dcf7b8f9bfdb2078e4 Mon Sep 17 00:00:00 2001 From: Xavi Date: Sun, 12 Jul 2020 17:34:47 +0200 Subject: [PATCH] ci(azure-pipelines): change steps order --- azure-pipelines.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index de0e6c47..8e520c07 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,6 +28,14 @@ steps: inputs: versionSpec: '$(python.version)' displayName: 'Prepare Python $(python.version)' +- task: ArchiveFiles@2 + condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8')) + displayName: Zipping apps/controllerx folder + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)/apps/controllerx' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/controllerx.zip' - script: pip install pipenv displayName: 'Install pipenv' - script: python -m pipenv install --dev @@ -41,25 +49,15 @@ steps: - script: pipenv run pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=apps --cov-report=xml --cov-report=html displayName: 'Tests (pytest)' - task: PublishCodeCoverageResults@1 + displayName: Publish code coverage inputs: codeCoverageTool: Cobertura summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' # We run the GitHub release only if it is a tag and the python version is 3.8 # so we only execute this once. -- task: DeleteFiles@1 - condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8')) - inputs: - Contents: 'apps/controllerx/controllerx.egg-info/' -- task: ArchiveFiles@2 - condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8')) - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)/apps/controllerx' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/controllerx.zip' - task: GithubRelease@0 condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8')) - displayName: 'Create GitHub Release' + displayName: Create GitHub Release inputs: gitHubConnection: github.com_xaviml repositoryName: xaviml/controllerx