Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cancellation handling #7430

Merged
merged 2 commits into from
Jan 16, 2020
Merged
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
18 changes: 9 additions & 9 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- script: |
echo "##vso[build.addbuildtag]Scheduled"
displayName: 'Tag scheduled builds'
condition: and(eq(variables['Build.SourceBranchName'],'master'),eq(variables['Build.Reason'],'Schedule'))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'],'master'),eq(variables['Build.Reason'],'Schedule'))

- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand All @@ -74,13 +74,13 @@ jobs:
- script: |
python3 --version
python3 eng/versioning/set_versions.py --build-type ${{parameters.SDKType}} --build-qualifier dev.$(Build.BuildNumber) --artifact-id ${{artifact.name}} --group-id ${{artifact.groupId}}
condition: eq(variables['SetDevVersion'],'true')
condition: and(succeeded(), eq(variables['SetDevVersion'],'true'))
displayName: Append dev package version suffix for ${{artifact.name}}

- script: |
python3 --version
python3 eng/versioning/update_versions.py --update-type library --build-type ${{parameters.SDKType}}
condition: eq(variables['SetDevVersion'],'true')
condition: and(succeeded(), eq(variables['SetDevVersion'],'true'))
displayName: Apply version settings to repository

- script: |
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
artifact: repository

- job: 'Analyze'
condition: ne(variables['Skip.Analyze'], 'true')
condition: and(succeeded(), ne(variables['Skip.Analyze'], 'true'))
mitchdenny marked this conversation as resolved.
Show resolved Hide resolved

variables:
- template: ../variables/globals.yml
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
artifact: reports

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

variables:
- template: ../variables/globals.yml
Expand All @@ -253,7 +253,7 @@ jobs:

- task: Maven@3
displayName: 'Start Jetty'
condition: ne('${{ parameters.SDKType }}', 'client')
condition: and(succeeded(), ne(variables['SdkType'], 'client'))
Copy link
Member

@JimSuplizio JimSuplizio Jan 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mitchdenny why was this changed from parameters back to variables? Variables is going to try and pull from the pipeline variable SDKType which isn't set for every pipeline. Using the parameters should, in theory, guarantee that this only runs for the correct track.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad ... I'll fix it up now. I was getting shown some interesting conflict resolutions when I did my rebase.

inputs:
mavenPomFile: pom.client.xml
options: '$(DefaultOptions)'
Expand All @@ -270,7 +270,7 @@ jobs:
displayName: 'Use Python 3.6'
inputs:
versionSpec: '3.6'
condition: and(eq('${{ parameters.SDKType }}', 'client'), eq(variables['TestFromSource'],'true'))
condition: and(succeeded(), eq('${{ parameters.SDKType }}', 'client'), eq(variables['TestFromSource'],'true'))

- pwsh: |
python --version
Expand All @@ -287,12 +287,12 @@ jobs:
exit 1
}
displayName: 'Set versions for source build'
condition: and(eq('${{ parameters.SDKType }}', 'client'), eq(variables['TestFromSource'],'true'))
condition: and(succeeded(), eq('${{ parameters.SDKType }}', 'client'), eq(variables['TestFromSource'],'true'))

- script: |
python --version
python eng/versioning/update_versions.py --update-type library --build-type client
condition: eq(variables['ShouldRunSourceTests'],'true')
condition: and(succeeded(), eq(variables['ShouldRunSourceTests'],'true'))
displayName: 'Update versions for source build'

- task: Maven@3
Expand Down
30 changes: 0 additions & 30 deletions eng/pipelines/templates/jobs/archetype-sdk-tests-pre-sdk.yml

This file was deleted.

2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
-ProvisionerApplicationSecret '$(provisioner-aad-secret)'
-Force
-Verbose
condition: ne(variables['AZURE_RESOURCEGROUP_NAME'], '')
condition: and(always(), ne(variables['AZURE_RESOURCEGROUP_NAME'], ''))
continueOnError: true
displayName: Remove Test Resources

Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/templates/steps/cache-maven-repository.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
steps:
- script: |
echo "##vso[task.setvariable variable=Maven.RepositoryPath;]%USERPROFILE%\.m2\repository"
condition: eq(variables['Agent.OS'], 'Windows_NT')
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
displayName: Detecting Maven repository on Windows
- script: |
echo "##vso[task.setvariable variable=Maven.RepositoryPath;]$HOME/.m2/repository"
condition: ne(variables['Agent.OS'], 'Windows_NT')
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
displayName: Detecting Maven repository on Linux and macOS
- task: CacheBeta@0
inputs:
key: $(Agent.JobName)|$(CacheSalt)|$(Build.SourcesDirectory)/sdk/**/pom.xml|$(Build.SourcesDirectory)/pom*.xml|$(Build.SourcesDirectory)/parent/pom.xml
path: $(Maven.RepositoryPath)
displayName: 'Download/upload cache'
condition: ne(variables['EnableCaching'], 'false')
condition: and(succeeded(), ne(variables['EnableCaching'], 'false'))