From 2374465b013a1936d720967353cf61536ee68d29 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 29 Aug 2022 22:48:40 +0200 Subject: [PATCH] Azure: local id for e2e (#14432) --- .azure/app-cloud-e2e.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.azure/app-cloud-e2e.yml b/.azure/app-cloud-e2e.yml index a8c66f420d..a057b84079 100644 --- a/.azure/app-cloud-e2e.yml +++ b/.azure/app-cloud-e2e.yml @@ -17,10 +17,12 @@ pr: - "master" - "release/*" +# variables are automatically exported as environment variables so this will override pip's default cache dir variables: - # variables are automatically exported as environment variables so this will override pip's default cache dir - name: pip_cache_dir value: $(Pipeline.Workspace)/.pip + - name: local_id + value: $(Build.BuildId) jobs: - job: App_cloud_e2e_testing @@ -57,17 +59,18 @@ jobs: workspace: clean: all 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: | whoami + printf "local id: $(local_id)\n" python --version pip --version displayName: 'Info' - # TODO: parse the PR number - - bash: | - ID=$(date +%s) - echo "##vso[task.setvariable variable=local_id]$ID" - - task: Cache@2 inputs: key: 'pip | "$(name)" | requirements/app/base.txt'