Azure: local id for e2e (#14432)

This commit is contained in:
Jirka Borovec 2022-08-29 22:48:40 +02:00 committed by GitHub
parent d0d1818d50
commit 2374465b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -17,10 +17,12 @@ pr:
- "master" - "master"
- "release/*" - "release/*"
# variables are automatically exported as environment variables so this will override pip's default cache dir
variables: variables:
# variables are automatically exported as environment variables so this will override pip's default cache dir
- name: pip_cache_dir - name: pip_cache_dir
value: $(Pipeline.Workspace)/.pip value: $(Pipeline.Workspace)/.pip
- name: local_id
value: $(Build.BuildId)
jobs: jobs:
- job: App_cloud_e2e_testing - job: App_cloud_e2e_testing
@ -57,17 +59,18 @@ jobs:
workspace: workspace:
clean: all clean: all
steps: steps:
- script: echo '##vso[task.setvariable variable=local_id]$(System.PullRequest.PullRequestNumber)'
displayName: "Set id for this PR"
condition: eq(variables['Build.Reason'], 'PullRequest')
- bash: | - bash: |
whoami whoami
printf "local id: $(local_id)\n"
python --version python --version
pip --version pip --version
displayName: 'Info' displayName: 'Info'
# TODO: parse the PR number
- bash: |
ID=$(date +%s)
echo "##vso[task.setvariable variable=local_id]$ID"
- task: Cache@2 - task: Cache@2
inputs: inputs:
key: 'pip | "$(name)" | requirements/app/base.txt' key: 'pip | "$(name)" | requirements/app/base.txt'