Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/common/TestResources/remove-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
- ${{ if eq('true', parameters.UseFederatedAuth) }}:
- task: AzurePowerShell@5
displayName: Remove test resources
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
condition: and(succeededOrFailed(), eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
continueOnError: true
env:
PoolSubnet: $(PoolSubnet)
Expand Down Expand Up @@ -71,7 +71,7 @@ steps:
-Force `
-Verbose
displayName: Remove test resources
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
condition: and(succeededOrFailed(), eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
continueOnError: true
env:
PoolSubnet: $(PoolSubnet)
Expand Down
2 changes: 1 addition & 1 deletion eng/common/TestResources/setup-environments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
steps:
- bash: sudo chown -R runner ~/.Azure
displayName: (MacOS) Grant access to ~/.Azure
condition: contains(variables['OSVmImage'], 'mac')
condition: and(succeeded(), contains(variables['OSVmImage'], 'mac'))

- task: Powershell@2
displayName: Setup Az Modules and Dogfood Environment
Expand Down
2 changes: 1 addition & 1 deletion eng/common/pipelines/templates/jobs/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parameters:
jobs:
- deployment: ${{ parameters.DeploymentName }}
displayName: 'Publish ${{ parameters.ArtifactName }} to ${{ parameters.Registry }}'
condition: ${{ parameters.CustomCondition }}
condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})
environment: ${{ parameters.Environment }}
dependsOn: ${{ parameters.DependsOn }}
variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stages:
- stage: AutoReleasePrepare
displayName: Auto-release prepare
dependsOn: ${{ parameters.DependsOn }}
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
variables:
- template: /eng/pipelines/templates/variables/globals.yml
- template: /eng/pipelines/templates/variables/image.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ steps:
"registry=${{ parameters.registryUrl }}" | Out-File $npmrcPath
Write-Host "##vso[task.setvariable variable=resolvedNpmrcPath]$npmrcPath"
displayName: "Create .npmrc"
condition: ${{ parameters.CustomCondition }}
condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})

- task: npmAuthenticate@0
displayName: Authenticate .npmrc
condition: ${{ parameters.CustomCondition }}
condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})
inputs:
workingFile: $(resolvedNpmrcPath)
azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ steps:
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Dump Package properties
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
- pwsh: |
$setDailyDevBuild = "false"
if (('$(Build.Reason)' -eq 'Schedule') -and ('$(System.TeamProject)' -eq 'internal')) {
$setDailyDevBuild = "true"
}
echo "##vso[task.setvariable variable=SetDevVersion]$setDailyDevBuild"
displayName: "Setup Versioning Properties"
condition: and(${{ parameters.Condition }}, eq(variables['SetDevVersion'], ''))
condition: and(succeededOrFailed(), ${{ parameters.Condition }}, eq(variables['SetDevVersion'], ''))
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:
steps:
- task: Powershell@2
displayName: 'Install Azure SDK Tools CLI'
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
inputs:
targetType: 'inline'
script: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ steps:
Write-Host "##vso[task.setvariable variable=${{ parameters.DefaultBranchVariableName }}]$setDefaultBranch"
displayName: "Setup Default Branch"
workingDirectory: ${{ parameters.workingDirectory }}
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
ignoreLASTEXITCODE: true
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ steps:
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Verify ChangeLogEntry for ${{ parameters.PackageName }}
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
continueOnError: false
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ steps:
-ForRelease $${{ parameters.ForRelease }}
pwsh: true
displayName: Verify ChangeLogEntries
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
2 changes: 1 addition & 1 deletion eng/common/pipelines/templates/steps/verify-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
Condition: ${{ parameters.Condition }}
- task: PowerShell@2
displayName: Link verification check
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
inputs:
pwsh: true
workingDirectory: '${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
steps:
- task: PythonScript@0
displayName: Analyze Path Lengths
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
inputs:
scriptSource: inline
script: |
Expand Down
2 changes: 1 addition & 1 deletion eng/common/pipelines/templates/steps/verify-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ parameters:
steps:
- task: PowerShell@2
displayName: "Verify Readmes"
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
inputs:
filePath: "eng/common/scripts/Verify-Readme.ps1"
arguments: >
Expand Down
4 changes: 2 additions & 2 deletions eng/common/pipelines/templates/steps/verify-readmes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ steps:
$scanPaths = $paths -join ","
Write-Host "##vso[task.setvariable variable=ScanPathArgument;]$scanPaths"
displayName: Populate Scan Paths
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})

- task: PowerShell@2
displayName: "Verify Readmes"
condition: ${{ parameters.Condition }}
condition: and(succeededOrFailed(), ${{ parameters.Condition }})
inputs:
filePath: "eng/common/scripts/Verify-Readme.ps1"
arguments: >
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- output: pipelineArtifact
targetPath: '$(Build.ArtifactStagingDirectory)/llm-artifacts'
artifactName: "LLM Artifacts - $(System.JobName) - $(System.JobAttempt)"
condition: eq(variables['uploadLlmArtifacts'], 'true')
condition: and(succeeded(), eq(variables['uploadLlmArtifacts'], 'true'))
sbomEnabled: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/ci.versions.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parameters:

jobs:
- job:
condition: ne(variables['Skip.Test'], 'true')
condition: and(succeeded(), ne(variables['Skip.Test'], 'true'))

variables:
- template: /eng/pipelines/templates/variables/globals.yml
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,3 @@ jobs:
UseFederatedAuth: ${{ parameters.UseFederatedAuth }}
ServiceConnection: ${{ parameters.CloudConfig.ServiceConnection }}
SubscriptionConfigurationFilePaths: ${{ parameters.CloudConfig.SubscriptionConfigurationFilePaths }}

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ stages:
- job: VerifyReleaseVersion
displayName: Verify auto-release versions
dependsOn: PrepareAutoReleasePackages
condition: ne(variables['Skip.VersionVerification'], 'true')
condition: and(succeeded(), ne(variables['Skip.VersionVerification'], 'true'))
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ stages:
jobs:
- job: VerifyReleaseVersion
displayName: "Verify release versions"
condition: ne(variables['Skip.VersionVerification'], 'true')
condition: and(succeeded(), ne(variables['Skip.VersionVerification'], 'true'))
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
Expand Down Expand Up @@ -433,7 +433,7 @@ stages:
- template: /eng/pipelines/templates/variables/image.yml
jobs:
- job: PublishPackages
condition: or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))
condition: and(succeeded(), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal'))))
displayName: Publish package to daily feed

templateContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ stages:
jobs:
- job: TagRepository
displayName: "Create release tag"
condition: ne(variables['Skip.TagRepository'], 'true')
condition: and(succeeded(), ne(variables['Skip.TagRepository'], 'true'))
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
Expand Down
3 changes: 1 addition & 2 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ extends:
displayName: Skip PR validation

- stage: Build
condition: not(and(eq(${{ parameters.SkipPrValidation }}, true), eq(variables['Build.Reason'], 'Manual')))
condition: and(succeeded(), not(and(eq(${{ parameters.SkipPrValidation }}, true), eq(variables['Build.Reason'], 'Manual'))))
variables:
- template: /eng/pipelines/templates/variables/globals.yml
- template: /eng/pipelines/templates/variables/image.yml
Expand Down Expand Up @@ -208,4 +208,3 @@ extends:
TestPipeline: ${{ parameters.TestPipeline }}
PublicFeedUrl: ${{ parameters.PublicFeedUrl }}
PublicPublishEnvironment: ${{ parameters.PublicPublishEnvironment }}

6 changes: 3 additions & 3 deletions eng/pipelines/templates/steps/build-and-test-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ steps:
# Generate the pom file with all the modules required for creating an aggregate code coverage report
- task: PythonScript@0
displayName: 'Generate pom for aggregate code coverage report'
condition: eq(variables['RunAggregateReports'], 'true')
condition: and(succeeded(), eq(variables['RunAggregateReports'], 'true'))
inputs:
scriptPath: 'eng/scripts/generate_aggregate_pom.py'
arguments: '--project-list $(ProjectList) --exclude-project-list ${{ parameters.ExcludeProjectList }} --type coverage'
workingDirectory: '$(System.DefaultWorkingDirectory)'

- task: Maven@4
displayName: 'Generate aggregate code coverage report'
condition: eq(variables['RunAggregateReports'], 'true')
condition: and(succeeded(), eq(variables['RunAggregateReports'], 'true'))
inputs:
mavenPomFile: aggregate-pom.xml
options: '$(DefaultOptions)'
Expand Down Expand Up @@ -139,7 +139,7 @@ steps:
# Azure DevOps only seems to respect the last code coverage result published, so only do this for Windows + Java LTS.
# Code coverage reporting is set up only for Track 2 modules.
- task: PublishCodeCoverageResults@2
condition: eq(variables['RunAggregateReports'], 'true')
condition: and(succeeded(), eq(variables['RunAggregateReports'], 'true'))
inputs:
summaryFileLocation: target/site/test-coverage/jacoco.xml
reportDirectory: target/site/test-coverage/
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/templates/steps/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ steps:
scriptPath: 'eng/scripts/generate_aggregate_pom.py'
arguments: '--project-list $(ProjectList) --exclude-project-list ${{ parameters.ExcludeProjectList }} --type coverage'
workingDirectory: '$(System.DefaultWorkingDirectory)'
condition: eq(variables['RunAggregateReports'], 'true')
condition: and(succeeded(), eq(variables['RunAggregateReports'], 'true'))

- task: Maven@4
displayName: 'Generate aggregate code coverage report'
Expand All @@ -158,7 +158,7 @@ steps:
jdkVersionOption: $(JavaTestVersion)
jdkArchitectureOption: 'x64'
goals: jacoco:report-aggregate
condition: eq(variables['RunAggregateReports'], 'true')
condition: and(succeeded(), eq(variables['RunAggregateReports'], 'true'))

- task: Maven@4
displayName: 'Build for From Source run'
Expand Down Expand Up @@ -285,4 +285,4 @@ steps:
summaryFileLocation: target/site/test-coverage/jacoco.xml
reportDirectory: target/site/test-coverage/
failIfCoverageEmpty: false
condition: eq(variables['RunAggregateReports'], 'true')
condition: and(succeeded(), eq(variables['RunAggregateReports'], 'true'))
8 changes: 4 additions & 4 deletions eng/pipelines/templates/steps/install-latest-jdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
key: 'jdk | "1.${{ parameters.LatestJdkFeatureVersion }}" | "$(CacheSalt)" | "$(Agent.OS)"'
path: $(Agent.BuildDirectory)/jdk-${{ parameters.LatestJdkFeatureVersion }}
displayName: 'Cache Latest JDK'
condition: eq(variables['IsLatestNonLtsJdk'], 'true')
condition: and(succeeded(), eq(variables['IsLatestNonLtsJdk'], 'true'))

- task: PowerShell@2
displayName: 'Install Latest JDK'
Expand All @@ -21,7 +21,7 @@ steps:
-JdkFeatureVersion ${{ parameters.LatestJdkFeatureVersion }}
workingDirectory: $(Agent.BuildDirectory)
filePath: eng/scripts/Install-Latest-JDK.ps1
condition: eq(variables['IsLatestNonLtsJdk'], 'true')
condition: and(succeeded(), eq(variables['IsLatestNonLtsJdk'], 'true'))

- pwsh: |
Write-Host "Java 8 JDK: $Env:JAVA_HOME_8_X64"
Expand All @@ -30,7 +30,7 @@ steps:
Write-Host "Java 21 JDK: $Env:JAVA_HOME_21_X64"
Write-Host "Latest JDK: $Env:JAVA_HOME_${{ parameters.LatestJdkFeatureVersion }}_X64"
displayName: 'Verify Latest JDK Install'
condition: eq(variables['IsLatestNonLtsJdk'], 'true')
condition: and(succeeded(), eq(variables['IsLatestNonLtsJdk'], 'true'))

- task: PowerShell@2
displayName: 'Install JDK 8 on macOS'
Expand All @@ -40,4 +40,4 @@ steps:
-JdkFeatureVersion 8
workingDirectory: $(Agent.BuildDirectory)
filePath: eng/scripts/Install-Latest-JDK.ps1
condition: eq(variables['Agent.OS'], 'Darwin')
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
12 changes: 6 additions & 6 deletions sdk/spring/pipeline/compatibility-tests-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- template: /eng/pipelines/templates/steps/maven-authenticate.yml
- task: Maven@4
displayName: 'Install Unreleased Dependencies'
condition: ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], '')
condition: and(succeeded(), ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], ''))
inputs:
mavenPomFile: sdk/spring/pipeline/ClientFromSourcePom.xml
goals: 'install'
Expand All @@ -81,25 +81,25 @@ jobs:
- bash: |
echo "##vso[task.setVariable variable=SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_CLOUD_VERSION]$(python ./sdk/spring/scripts/compatibility_get_spring_cloud_version.py -b $(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION))"
displayName: 'Set supported Spring version to environment variables'
condition: ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], '')
condition: and(succeeded(), ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], ''))
- bash: |
echo "$(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION):"
echo "https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/$(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION)/spring-boot-dependencies-$(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION).pom"
echo "$(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_CLOUD_VERSION):"
echo "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dependencies/$(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_CLOUD_VERSION)/spring-cloud-dependencies-$(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_CLOUD_VERSION).pom"
displayName: 'Log Spring version and Maven pom path'
condition: ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], '')
condition: and(succeeded(), ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], ''))
- script: |
python ./sdk/spring/scripts/compatibility_insert_dependencymanagement.py -b $(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION) -c $(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_CLOUD_VERSION)
displayName: 'Insert Spring dependency managements'
condition: ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], '')
condition: and(succeeded(), ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], ''))
- script: |
python ./sdk/spring/scripts/compatibility_delete_version.py -b $(SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION)
displayName: 'Remove unused dependency versions'
condition: ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], '')
condition: and(succeeded(), ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], ''))
- task: Maven@4
displayName: 'Run tests'
condition: ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], '')
condition: and(succeeded(), ne(variables['SPRING_CLOUD_AZURE_TEST_SUPPORTED_SPRING_BOOT_VERSION'], ''))
inputs:
options: '$(DefaultOptions) -ntp -T ${{parameters.BuildParallelization}} ${{parameters.SkipOptions}} -Dcompiler.failondeprecatedstatus=- --fail-at-end'
mavenPomFile: sdk/spring/pom.xml
Expand Down
Loading