From 8c4ef949c9c437c8160eaab6ecb832574d6c82d1 Mon Sep 17 00:00:00 2001 From: Chun'ang Li <39114813+lerry-lee@users.noreply.github.com> Date: Thu, 23 May 2024 15:51:14 +0800 Subject: [PATCH] [CI/CD] Update elastictest pr test template file, use long term maintained token instead of personal access token (#12940) [CI/CD] Update elastictest pr test template file, use long term maintained token instead of personal access token. Compatibility update, in order to ensure that all PRtests that use this template file can transition smoothly. Signed-off-by: Chun'ang Li --- .azure-pipelines/run-test-elastictest-template.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/run-test-elastictest-template.yml b/.azure-pipelines/run-test-elastictest-template.yml index 695268fc73c..081ebedca4e 100644 --- a/.azure-pipelines/run-test-elastictest-template.yml +++ b/.azure-pipelines/run-test-elastictest-template.yml @@ -159,7 +159,11 @@ steps: # Else, internal build image repo, download from internal sonic-mgmt repo else - curl -u $(AZP_REPO_ACCESS_TOKEN) "${{ parameters.MGMT_URL }}&commitOrBranch=${{ parameters.MGMT_BRANCH }}&api-version=5.0-preview.1&path=.azure-pipelines%2Fpr_test_scripts.yaml" -o ./.azure-pipelines/pr_test_scripts.yaml + if [ -z "$(MSSONIC-TOKEN)" ]; then + curl -u $(AZP_REPO_ACCESS_TOKEN) "${{ parameters.MGMT_URL }}&commitOrBranch=${{ parameters.MGMT_BRANCH }}&api-version=5.0-preview.1&path=.azure-pipelines%2Fpr_test_scripts.yaml" -o ./.azure-pipelines/pr_test_scripts.yaml + else + curl -u :$(MSSONIC-TOKEN) "${{ parameters.MGMT_URL }}&commitOrBranch=${{ parameters.MGMT_BRANCH }}&api-version=5.0-preview.1&path=.azure-pipelines%2Fpr_test_scripts.yaml" -o ./.azure-pipelines/pr_test_scripts.yaml + fi fi displayName: "Download pr script" - ${{ else }}: