Skip to content

Instantly share code, notes, and snippets.

@zloeber
Created March 23, 2020 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zloeber/f9667986bbfa264eae7c2df902a29def to your computer and use it in GitHub Desktop.
Save zloeber/f9667986bbfa264eae7c2df902a29def to your computer and use it in GitHub Desktop.
ado-var-group-5
name: ado-var-group-sync
trigger:
batch: true
branches:
include:
- master
paths:
include:
- config/*
pr: none
resources:
repositories:
- repository: platform
type: git
name: MyProject/pipelinecode
ref: refs/heads/master
stages:
- stage: ADO_Sync
displayName: 'Update ADO'
jobs:
- job: Update_ADO
pool:
vmImage: ubuntu-latest
variables:
- group: cicd_secrets
steps:
- bash: |
az login --service-principal \
--username "${SPNAPPID}" \
--password "${SPNSECRET}" \
--tenant "${TENANTID}"
az extension add --name azure-devops
displayName: "Initialize"
env:
TENANTID: "$(tenantid)"
SPNAPPID: "$(clientid)"
SPNSECRET: "$(clientsecret)"
# Variable Group Update
- template: job/ado-variable-group.yml@platform
parameters:
sourceFile: 'config/vargroup.env'
groupName: 'pipeline_parameters'
overwrite: 'true'
adoProject: 'MyProject'
adoOrg: 'https://dev.azure.com/myADOorg'
adoUser: $(ADOUSER)
adoPAT: $(ADOPAT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment