diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index b36cc3513aa..4e22ce4801c 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 24b16bd64be..a3d2d17dd00 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 6282a463ea6..bcda8f210c7 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 ddb8c8e48f6..c67f63fff47 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 f28768e39ef..00000000000 --- 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 476878c8160..09220c195e5 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