forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbreaking-change-tests.yml
49 lines (45 loc) · 1.54 KB
/
breaking-change-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
resources:
- repo: self
trigger: none
pr:
branches:
include:
- '*'
variables:
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml
jobs:
- job: BreakingChangeTest
displayName: "Breaking Change Test"
pool:
name: ${{ variables.ubuntu_pool }}
steps:
- checkout: self
fetchDepth: 0
fetchTags: true
- task: UsePythonVersion@0
displayName: 'Use Python 3.10'
inputs:
versionSpec: 3.10
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
. env/bin/activate
python scripts/ci/breaking_change_test.py
breakingChangeTest='false'
if [[ -f '/$(HOME)/.azdev/env_config/mnt/vss/_work/1/s/env/breaking_change_test.json' ]]; then
breakingChangeTest='true'
fi
echo "##vso[task.setvariable variable=breakingChangeTest]$breakingChangeTest"
displayName: "Breaking Change Test"
env:
PR_SRC_BRANCH: $(System.PullRequest.SourceBranch)
PR_TARGET_BRANCH: $(System.PullRequest.TargetBranch)
PULL_REQUEST_NUMBER: $(System.PullRequest.PullRequestNumber)
JOB_NAME: "breaking_change_test"
- task: PublishBuildArtifacts@1
condition: and(succeededOrFailed(), eq(variables.breakingChangeTest, 'true'))
inputs:
# /mnt/vss/.azdev/env_config/mnt/vss/_work/1/s/env/breaking_change_test.json
PathtoPublish: '/$(HOME)/.azdev/env_config/mnt/vss/_work/1/s/env/breaking_change_test.json'
ArtifactName: 'breaking_change_test'
publishLocation: 'Container'