From 6f0da9948d48bdcc758db34f4dddee4f3cdd944c Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:53:13 -0700 Subject: [PATCH] Simplify build yml (#36567) * make advanced build the default build template choice in preparation for pipelinev3 * only build windows and mac packages if necessary, as indicated by a service directory of "storage" * remove job coalesce as unnecessary --------- Co-authored-by: Wes Haggard --- eng/pipelines/templates/jobs/ci.tests.yml | 5 +- eng/pipelines/templates/jobs/ci.yml | 185 ++++++------------ eng/pipelines/templates/jobs/regression.yml | 7 +- .../stages/archetype-python-release.yml | 2 +- .../templates/stages/archetype-sdk-client.yml | 4 - .../steps/build-extended-artifacts.yml | 5 - .../steps/build-package-artifacts.yml | 64 +++--- eng/pipelines/templates/steps/build.yml | 36 ++++ .../steps/download-package-artifacts.yml | 18 ++ .../steps/resolve-build-platforms.yml | 15 ++ .../templates/steps/set-dev-build.yml | 5 +- eng/pipelines/templates/steps/use-venv.yml | 5 + eng/scripts/create-venv.ps1 | 1 + sdk/storage/ci.yml | 1 - 14 files changed, 163 insertions(+), 190 deletions(-) create mode 100644 eng/pipelines/templates/steps/build.yml create mode 100644 eng/pipelines/templates/steps/download-package-artifacts.yml create mode 100644 eng/pipelines/templates/steps/resolve-build-platforms.yml diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index 806d7d0cade7..7219acb71eb3 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -122,10 +122,7 @@ jobs: InjectedPackages: $(InjectedPackages) TestProxy: ${{ parameters.TestProxy }} BeforeTestSteps: - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: 'packages' - targetPath: $(Build.ArtifactStagingDirectory) + - template: /eng/pipelines/templates/steps/download-package-artifacts.yml - template: ../steps/set-dev-build.yml parameters: diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 91f32e7c45f7..0cae4afb350d 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -61,141 +61,68 @@ parameters: - name: GenerateApiReviewForManualOnly type: boolean default: false - - name: AdvancedBuild - type: boolean - default: false jobs: + - job: 'Build_Linux' + timeoutInMinutes: 90 - - ${{ if eq(parameters['AdvancedBuild'], false) }}: - - job: 'Build' - timeoutInMinutes: 90 - - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux - - steps: - - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml - parameters: - BuildTargetingString: ${{ parameters.BuildTargetingString }} - - - template: ../steps/build-package-artifacts.yml - parameters: - ServiceDirectory: ${{ parameters.ServiceDirectory }} - BeforePublishSteps: ${{ parameters.BeforePublishSteps }} - TestPipeline: ${{ parameters.TestPipeline }} - Artifacts: ${{ parameters.Artifacts }} - - - ${{ if eq(parameters['AdvancedBuild'], true) }}: - - job: 'Build_Linux' - timeoutInMinutes: 90 - - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux - - steps: - - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml - parameters: - BuildTargetingString: ${{ parameters.BuildTargetingString }} - - - template: ../steps/build-package-artifacts.yml - parameters: - ServiceDirectory: ${{ parameters.ServiceDirectory }} - BeforePublishSteps: ${{ parameters.BeforePublishSteps }} - TestPipeline: ${{ parameters.TestPipeline }} - Artifacts: ${{ parameters.Artifacts }} - ArtifactSuffix: linux - UseVirtualEnvironment: false - - - job: 'Build_Windows' - timeoutInMinutes: 90 - - pool: - name: $(WINDOWSPOOL) - image: $(WINDOWSVMIMAGE) - os: windows - - steps: - - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml - parameters: - BuildTargetingString: ${{ parameters.BuildTargetingString }} - - - template: ../steps/build-package-artifacts.yml - parameters: - ServiceDirectory: ${{ parameters.ServiceDirectory }} - BeforePublishSteps: ${{ parameters.BeforePublishSteps }} - TestPipeline: ${{ parameters.TestPipeline }} - Artifacts: ${{ parameters.Artifacts }} - ArtifactSuffix: windows - UseVirtualEnvironment: false - - - job: 'Build_MacOS' - timeoutInMinutes: 90 - - pool: - name: $(MACPOOL) - vmImage: $(MACVMIMAGE) - os: macOS - - steps: - - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml - parameters: - BuildTargetingString: ${{ parameters.BuildTargetingString }} + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux - - template: ../steps/build-package-artifacts.yml - parameters: - ServiceDirectory: ${{ parameters.ServiceDirectory }} - BeforePublishSteps: ${{ parameters.BeforePublishSteps }} - TestPipeline: ${{ parameters.TestPipeline }} - Artifacts: ${{ parameters.Artifacts }} - ArtifactSuffix: mac - UseVirtualEnvironment: false + steps: + - template: /eng/pipelines/templates/steps/build.yml + parameters: + ServiceDirectory: ${{ parameters.ServiceDirectory }} + BuildTargetingString: ${{ parameters.BuildTargetingString }} + BeforePublishSteps: ${{ parameters.BeforePublishSteps }} + TestPipeline: ${{ parameters.TestPipeline }} + ArtifactSuffix: linux + Artifacts: ${{ parameters.Artifacts }} - - job: 'CoalesceBuildArtifacts' - displayName: Combine Built Artifacts - dependsOn: - - 'Build_Linux' - - 'Build_Windows' - - 'Build_MacOS' - timeoutInMinutes: 90 + - job: 'Build_Windows' + timeoutInMinutes: 90 - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux + pool: + name: $(WINDOWSPOOL) + image: $(WINDOWSVMIMAGE) + os: windows - steps: - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: 'packages_windows' - targetPath: $(Build.ArtifactStagingDirectory)/packages + steps: + - template: /eng/pipelines/templates/steps/build.yml + parameters: + ServiceDirectory: ${{ parameters.ServiceDirectory }} + BuildTargetingString: ${{ parameters.BuildTargetingString }} + BeforePublishSteps: ${{ parameters.BeforePublishSteps }} + TestPipeline: ${{ parameters.TestPipeline }} + ArtifactSuffix: windows + Artifacts: ${{ parameters.Artifacts }} - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: 'packages_mac' - targetPath: $(Build.ArtifactStagingDirectory)/packages + - job: 'Build_MacOS' + timeoutInMinutes: 90 - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: 'packages_linux' - targetPath: $(Build.ArtifactStagingDirectory)/packages + pool: + name: $(MACPOOL) + vmImage: $(MACVMIMAGE) + os: macOS - - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml - parameters: - ArtifactPath: '$(Build.ArtifactStagingDirectory)/packages' - ArtifactName: 'packages' + steps: + - template: /eng/pipelines/templates/steps/build.yml + parameters: + ServiceDirectory: ${{ parameters.ServiceDirectory }} + BuildTargetingString: ${{ parameters.BuildTargetingString }} + BeforePublishSteps: ${{ parameters.BeforePublishSteps }} + TestPipeline: ${{ parameters.TestPipeline }} + ArtifactSuffix: mac + Artifacts: ${{ parameters.Artifacts }} - job: 'Build_Extended' displayName: Build Extended dependsOn: - - ${{ if eq(parameters['AdvancedBuild'], true) }}: - - 'CoalesceBuildArtifacts' - - ${{ else }}: - - 'Build' + - 'Build_Linux' + - 'Build_Windows' + - 'Build_MacOS' timeoutInMinutes: 90 @@ -205,6 +132,8 @@ jobs: os: linux steps: + - template: /eng/pipelines/templates/steps/download-package-artifacts.yml + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml parameters: BuildTargetingString: ${{ parameters.BuildTargetingString }} @@ -272,10 +201,9 @@ jobs: OsVmImage: azsdk-pool-mms-ubuntu-2004-1espt Pool: azsdk-pool-mms-ubuntu-2004-general DependsOn: - - ${{ if eq(parameters['AdvancedBuild'], true) }}: - - 'CoalesceBuildArtifacts' - - ${{ else }}: - - 'Build' + - 'Build_Linux' + - 'Build_Windows' + - 'Build_MacOS' MatrixConfigs: ${{ parameters.MatrixConfigs }} MatrixFilters: ${{ parameters.MatrixFilters }} MatrixReplace: ${{ parameters.MatrixReplace }} @@ -327,10 +255,9 @@ jobs: CloudConfig: Cloud: Public DependsOn: - - ${{ if eq(parameters['AdvancedBuild'], true) }}: - - 'CoalesceBuildArtifacts' - - ${{ else }}: - - 'Build' + - 'Build_Linux' + - 'Build_Windows' + - 'Build_MacOS' AdditionalParameters: BuildTargetingString: ${{ parameters.BuildTargetingString }} ServiceDirectory: ${{ parameters.ServiceDirectory }} diff --git a/eng/pipelines/templates/jobs/regression.yml b/eng/pipelines/templates/jobs/regression.yml index 2fbf460bd7e7..8c3b559b48c7 100644 --- a/eng/pipelines/templates/jobs/regression.yml +++ b/eng/pipelines/templates/jobs/regression.yml @@ -79,13 +79,10 @@ jobs: displayName: 'Use Python 3.9' inputs: versionSpec: '3.9' - + - template: /eng/pipelines/templates/steps/use-venv.yml - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: 'packages' - targetPath: $(Build.ArtifactStagingDirectory) + - template: /eng/pipelines/templates/steps/download-package-artifacts.yml - pwsh: | mkdir -p $(TEST_PROXY_FOLDER) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index b45f0d861803..3009acce29cd 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -106,6 +106,7 @@ stages: deploy: steps: - checkout: self + - download: current artifact: ${{parameters.ArtifactName}} timeoutInMinutes: 5 @@ -294,7 +295,6 @@ stages: name: azsdk-pool-mms-ubuntu-2004-general os: linux steps: - - checkout: none - download: current artifact: ${{parameters.ArtifactName}} timeoutInMinutes: 5 diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 0ae0ca581f19..12574fd33a96 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -72,9 +72,6 @@ parameters: - name: GenerateApiReviewForManualOnly type: boolean default: false - - name: AdvancedBuild - type: boolean - default: false - name: oneESTemplateTag type: string default: release @@ -113,7 +110,6 @@ extends: ValidateFormatting: ${{ parameters.ValidateFormatting }} TestProxy: ${{ parameters.TestProxy }} GenerateApiReviewForManualOnly: ${{ parameters.GenerateApiReviewForManualOnly }} - AdvancedBuild: ${{ parameters.AdvancedBuild }} variables: - template: /eng/pipelines/templates/variables/globals.yml diff --git a/eng/pipelines/templates/steps/build-extended-artifacts.yml b/eng/pipelines/templates/steps/build-extended-artifacts.yml index 7e68a218e1a2..5cfdb56e2a48 100644 --- a/eng/pipelines/templates/steps/build-extended-artifacts.yml +++ b/eng/pipelines/templates/steps/build-extended-artifacts.yml @@ -24,11 +24,6 @@ parameters: # Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: 'packages' - targetPath: $(Build.ArtifactStagingDirectory) - - task: UsePythonVersion@0 displayName: 'Use Python 3.11' inputs: diff --git a/eng/pipelines/templates/steps/build-package-artifacts.yml b/eng/pipelines/templates/steps/build-package-artifacts.yml index 5b88ab4c2c39..4f0fd376c3be 100644 --- a/eng/pipelines/templates/steps/build-package-artifacts.yml +++ b/eng/pipelines/templates/steps/build-package-artifacts.yml @@ -16,26 +16,19 @@ parameters: default: 'public/azure-sdk-for-python' - name: ArtifactSuffix type: string - default: '' - - name: UseVirtualEnvironment - type: boolean - default: true + default: 'linux' -# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: -# eng/pipelines/templates/jobs/ci.tests.yml -# eng/pipelines/templates/jobs/ci.yml -# eng/pipelines/templates/jobs/live.test.yml +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked wherever +# package targeting needs to be resolved prior to doing any actual work, whether it be build, static analysis, or test. -# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. This variable +# will be updated by PR diff detection as well. -# The variable '$(ArtifactName)' is set at runtime by the strategy for the `Build` job. -# Specifically, one of 3 values `linux`, `mac`, or `windows` will always be populated when invoked from `jobs/ci.yml`. - -# However, please note that this variable will not ALWAYS be set. If using `build-artifacts.yml`, ensure that this variable is set AT LEAST -# to "linux", otherwise the primary tasks will not be run as expected. APIStub, Docs, etc are NOT run on machines that aren't linux. +# In addition, the variable ENABLE_EXTENSION_BUILD is honored to enable builds on windows and mac if necessary. steps: - task: UsePythonVersion@0 displayName: 'Use Python $(PythonVersion)' + condition: and(succeeded(), or(eq(variables['ENABLE_EXTENSION_BUILD'], 'true'), eq('${{ parameters.ArtifactSuffix }}', 'linux'))) inputs: versionSpec: $(PythonVersion) @@ -56,26 +49,20 @@ steps: parameters: VirtualEnvironmentName: "venv" Activate: false - - - bash: | - source $(VENV_LOCATION)/bin/activate - which python - python -m pip install --force -r eng/ci_tools.txt - python -m pip freeze --all - displayName: 'Prep Environment Linux/Mac' - condition: and(succeeded(), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin'))) + Condition: and(succeeded(), or(eq(variables['ENABLE_EXTENSION_BUILD'], 'true'), eq('${{ parameters.ArtifactSuffix }}', 'linux'))) - pwsh: | - . $(VENV_LOCATION)/Scripts/Activate.ps1 + $(VENV_ACTIVATION_SCRIPT) which python python -m pip install --force -r eng/ci_tools.txt python -m pip freeze --all - displayName: 'Prep Environment Windows' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + displayName: 'Prep Environment' + condition: and(succeeded(), or(eq(variables['ENABLE_EXTENSION_BUILD'], 'true'), eq('${{ parameters.ArtifactSuffix }}', 'linux'))) - template: set-dev-build.yml@self parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} + Condition: and(succeeded(), or(eq(variables['ENABLE_EXTENSION_BUILD'], 'true'), eq('${{ parameters.ArtifactSuffix }}', 'linux'))) - task: Powershell@2 inputs: @@ -87,7 +74,7 @@ steps: pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Update package properties with dev version - condition: and(succeeded(),eq(variables['SetDevVersion'],'true')) + condition: and(succeeded(), eq(variables['SetDevVersion'],'true'), or(eq(variables['ENABLE_EXTENSION_BUILD'], 'true'), eq('${{ parameters.ArtifactSuffix }}', 'linux'))) - script: | sudo apt-get update @@ -96,22 +83,12 @@ steps: displayName: 'Install QEMU Dependencies' condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - - bash: | - source $(VENV_LOCATION)/bin/activate - which python - sdk_build -d "$(Build.ArtifactStagingDirectory)" "$(TargetingString)" --service=${{parameters.ServiceDirectory}} --inactive - displayName: 'Generate Packages Linux/Mac' - condition: and(succeeded(), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin'))) - timeoutInMinutes: 80 - env: - CIBW_BUILD_VERBOSITY: 3 - - pwsh: | - . $(VENV_LOCATION)/Scripts/Activate.ps1 + $(VENV_ACTIVATION_SCRIPT) which python sdk_build -d "$(Build.ArtifactStagingDirectory)" "$(TargetingString)" --service=${{parameters.ServiceDirectory}} --inactive - displayName: 'Generate Packages Windows' - condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT')) + displayName: 'Generate Packages' + condition: and(succeeded(), or(eq(variables['ENABLE_EXTENSION_BUILD'], 'true'), eq('${{ parameters.ArtifactSuffix }}', 'linux'))) timeoutInMinutes: 80 env: CIBW_BUILD_VERBOSITY: 3 @@ -125,6 +102,15 @@ steps: - ${{ parameters.BeforePublishSteps }} + # we need to publish an empty artifact. when publishing an empty artifact, let's ensure that there isn't anything to + # cause CG or SBOM generation to have to do actual work. + - pwsh: | + Get-ChildItem -Path "$(Build.SourcesDirectory)" -Recurse ` + | Where-Object { !($_.Name.EndsWith("CredScanSuppression.json")) -and ($_.PSIsContainer -ne $true) } ` + | Remove-Item -Force -Recurse + displayName: Clean up repo + condition: and(succeeded(), ne(variables['ENABLE_EXTENSION_BUILD'], 'true'), ne('${{ parameters.ArtifactSuffix }}', 'linux')) + - ${{ if eq(parameters.ArtifactSuffix, '') }}: - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml parameters: diff --git a/eng/pipelines/templates/steps/build.yml b/eng/pipelines/templates/steps/build.yml new file mode 100644 index 000000000000..6dd0391d6155 --- /dev/null +++ b/eng/pipelines/templates/steps/build.yml @@ -0,0 +1,36 @@ +parameters: + - name: ServiceDirectory + type: string + default: '' + - name: BuildTargetingString + type: string + default: 'azure-*' + - name: BeforePublishSteps + type: object + default: [] + - name: TestPipeline + type: boolean + default: false + - name: ArtifactSuffix + type: string + default: '' + - name: Artifacts + type: object + default: [] + +steps: + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml + parameters: + BuildTargetingString: ${{ parameters.BuildTargetingString }} + + - template: /eng/pipelines/templates/steps/resolve-build-platforms.yml + parameters: + ServiceDirectory: ${{ parameters.ServiceDirectory }} + + - template: /eng/pipelines/templates/steps/build-package-artifacts.yml + parameters: + ServiceDirectory: ${{ parameters.ServiceDirectory }} + BeforePublishSteps: ${{ parameters.BeforePublishSteps }} + TestPipeline: ${{ parameters.TestPipeline }} + Artifacts: ${{ parameters.Artifacts }} + ArtifactSuffix: ${{ parameters.ArtifactSuffix }} diff --git a/eng/pipelines/templates/steps/download-package-artifacts.yml b/eng/pipelines/templates/steps/download-package-artifacts.yml new file mode 100644 index 000000000000..c9d46d35bae8 --- /dev/null +++ b/eng/pipelines/templates/steps/download-package-artifacts.yml @@ -0,0 +1,18 @@ +parameters: + TargetPath: $(Build.ArtifactStagingDirectory) + +steps: + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: 'packages_windows' + targetPath: ${{ parameters.TargetPath }} + + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: 'packages_mac' + targetPath: ${{ parameters.TargetPath }} + + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: 'packages_linux' + targetPath: ${{ parameters.TargetPath }} diff --git a/eng/pipelines/templates/steps/resolve-build-platforms.yml b/eng/pipelines/templates/steps/resolve-build-platforms.yml new file mode 100644 index 000000000000..569a80cdccdb --- /dev/null +++ b/eng/pipelines/templates/steps/resolve-build-platforms.yml @@ -0,0 +1,15 @@ +parameters: + - name: ServiceDirectory + type: string + default: '' + +steps: + # when we merge pipeline v3, this check will change to examining the targeting string $(TargetingString) + # as the generate-pr-diff call + resolution will be present in targeting-string-resolve.yml. + # until then, we simply check to see if we're targeting storage service directory + - pwsh: | + if ("${{ parameters.ServiceDirectory }}" -eq "storage") { + Write-Host "Targeting storage, enabling extension build." + Write-Host "##vso[task.setvariable variable=ENABLE_EXTENSION_BUILD]true" + } + displayName: Check extension package presence diff --git a/eng/pipelines/templates/steps/set-dev-build.yml b/eng/pipelines/templates/steps/set-dev-build.yml index 3a5761b4c6e7..07de80a0bf78 100644 --- a/eng/pipelines/templates/steps/set-dev-build.yml +++ b/eng/pipelines/templates/steps/set-dev-build.yml @@ -1,5 +1,6 @@ parameters: ServiceDirectory: '' + Condition: 'succeededOrFailed()' # The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: # eng/pipelines/templates/jobs/ci.tests.yml @@ -11,10 +12,10 @@ steps: - template: /eng/common/pipelines/templates/steps/daily-dev-build-variable.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - Condition: succeededOrFailed() + Condition: ${{ parameters.Condition }} - pwsh: | python -m pip install "tools/azure-sdk-tools[build]" sdk_set_dev_version "$(TargetingString)" --service="${{parameters.ServiceDirectory}}" --build-id="$(Build.BuildNumber)" displayName: "Update package versions for dev build" - condition: and(succeededOrFailed(), eq(variables['SetDevVersion'],'true')) + condition: and(succeededOrFailed(), eq(variables['SetDevVersion'],'true'), ${{ parameters.Condition }}) diff --git a/eng/pipelines/templates/steps/use-venv.yml b/eng/pipelines/templates/steps/use-venv.yml index 65d0b0d0b565..a25459c7a156 100644 --- a/eng/pipelines/templates/steps/use-venv.yml +++ b/eng/pipelines/templates/steps/use-venv.yml @@ -5,6 +5,9 @@ parameters: - name: Activate type: boolean default: true + - name: Condition + type: string + default: succeeded() steps: - pwsh: | @@ -12,6 +15,7 @@ steps: -VenvName "${{ parameters.VirtualEnvironmentName }}" ` -RepoRoot "$(Build.SourcesDirectory)" displayName: Create virtual environment + condition: ${{ parameters.Condition }} - ${{ if eq(parameters.Activate, true) }}: - pwsh: | @@ -19,3 +23,4 @@ steps: -VenvName "${{ parameters.VirtualEnvironmentName }}" ` -RepoRoot "$(Build.SourcesDirectory)" displayName: Use ${{ parameters.VirtualEnvironmentName }} Virtual Environment + condition: ${{ parameters.Condition }} diff --git a/eng/scripts/create-venv.ps1 b/eng/scripts/create-venv.ps1 index fa4e9a54357c..919b3ba968fa 100644 --- a/eng/scripts/create-venv.ps1 +++ b/eng/scripts/create-venv.ps1 @@ -27,6 +27,7 @@ if (!(Test-Path $venvPath)) { python -m virtualenv "$venvPath" Write-Host "Virtual environment '$VenvName' created." Write-Host "##vso[task.setvariable variable=$($VenvName)_LOCATION]$venvPath" + Write-Host "##vso[task.setvariable variable=$($VenvName)_ACTIVATION_SCRIPT]if(`$IsWindows){. $venvPath/Scripts/Activate.ps1;}else {. $venvPath/bin/activate.ps1}" } else { Write-Host "Virtual environment '$VenvName' already exists. Skipping creation." diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index f35fcab9966a..a22b506e4ad1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -36,7 +36,6 @@ extends: Path: eng/pipelines/templates/stages/platform-matrix-excluding-pypy.json Selection: sparse GenerateVMJobs: true - AdvancedBuild: true Artifacts: - name: azure-storage-blob safeName: azurestorageblob