From 397adfd2e5e7098fec5c97138330931ffa9d7186 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Mon, 11 Apr 2022 19:38:27 +0000 Subject: [PATCH] Revert "[ci] Set default ACR in UpgrateVersion/PR/official pipeline. (#10341)" This reverts commit f4bbcd1cf106f5e19c2eb69bdaaa8cfc13937b47. --- .../azure-pipelines-UpgrateVersion.yml | 7 ++----- .azure-pipelines/docker-sonic-slave-template.yml | 5 +---- .azure-pipelines/official-build.yml | 11 ----------- .azure-pipelines/template-clean-sonic-slave.yml | 4 +--- .azure-pipelines/template-variables.yml | 2 -- azure-pipelines.yml | 14 -------------- 6 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 .azure-pipelines/template-variables.yml diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index b36cc3513aa6..4e22ce4801c8 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -42,11 +42,8 @@ parameters: stages: - stage: Build variables: - - name: CACHE_MODE - value: none - - name: VERSION_CONTROL_OPTIONS - value: 'SONIC_VERSION_CONTROL_COMPONENTS=' - - template: .azure-pipelines/template-variables.yml@buildimage + CACHE_MODE: none + VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=' jobs: - template: azure-pipelines-build.yml parameters: diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index 24b16bd64be6..a3d2d17dd00a 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -45,10 +45,7 @@ jobs: pool: ${{ parameters.pool }} steps: - template: cleanup.yml - - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - - template: template-clean-sonic-slave.yml - - ${{ else }}: - - template: .azure-pipelines/template-variables.yml@buildimage + - template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage - checkout: self clean: true submodules: recursive diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index 6282a463ea6e..bcda8f210c75 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -12,20 +12,9 @@ schedules: - 202012 always: true -resources: - repositories: - - repository: buildimage - type: github - name: Azure/sonic-buildimage - ref: master - endpoint: build - trigger: none pr: none -variables: -- template: .azure-pipelines/template-variables.yml@buildimage - stages: - stage: Build pool: sonicbld diff --git a/.azure-pipelines/template-clean-sonic-slave.yml b/.azure-pipelines/template-clean-sonic-slave.yml index ddb8c8e48f6a..c67f63fff476 100644 --- a/.azure-pipelines/template-clean-sonic-slave.yml +++ b/.azure-pipelines/template-clean-sonic-slave.yml @@ -1,10 +1,8 @@ steps: - script: | - set -x - containers=$(docker container ls -aq) + containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }') [ -n "$containers" ] && docker container rm -f $containers docker images | grep "^" | awk '{print$3}' | xargs -i docker rmi {} images=$(docker images 'sonic-slave-*' -a -q) [ -n "$images" ] && docker rmi -f $images - exit 0 displayName: 'Cleanup sonic slave' diff --git a/.azure-pipelines/template-variables.yml b/.azure-pipelines/template-variables.yml deleted file mode 100644 index f28768e39efe..000000000000 --- a/.azure-pipelines/template-variables.yml +++ /dev/null @@ -1,2 +0,0 @@ -variables: - DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 476878c8160b..09220c195e57 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,20 +29,6 @@ resources: type: github name: Azure/sonic-mgmt endpoint: build - - repository: buildimage - type: github - name: Azure/sonic-buildimage - endpoint: build - ref: master - -variables: -- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml -- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - - template: .azure-pipelines/template-variables.yml -- ${{ else }}: - - template: .azure-pipelines/template-variables.yml@buildimage -- name: CACHE_MODE - value: rcache stages: - stage: BuildVS