Skip to content

Commit

Permalink
Use repo variables from pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeRadinovich committed Nov 15, 2019
1 parent 03d061d commit ac38f89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -26,18 +26,22 @@ jobs:
parameters:
name: bionic
distro: $(gcp.vm.distro.bionic)
repo: $(gcp.vm.repo.ubuntu)

- template: templates/job.yaml
parameters:
name: xenial
distro: $(gcp.vm.distro.xenial)
repo: $(gcp.vm.repo.ubuntu)

- template: templates/job.yaml
parameters:
name: buster
distro: $(gcp.vm.distro.buster)
repo: $(gcp.vm.repo.debian)

- template: templates/job.yaml
parameters:
name: stretch
distro: $(gcp.vm.distro.stretch)
repo: $(gcp.vm.repo.debian)
2 changes: 2 additions & 0 deletions templates/job.yaml
@@ -1,6 +1,7 @@
parameters:
name: ''
distro: ''
repo: ''

jobs:
- job: ${{ parameters.name }}
Expand Down Expand Up @@ -28,6 +29,7 @@ jobs:
- template: vm-up.yaml
parameters:
distro: ${{ parameters.distro }}
repo: ${{ parameters.repo }}

- script: |
echo "key: $(key)"
Expand Down
3 changes: 2 additions & 1 deletion templates/vm-up.yaml
@@ -1,5 +1,6 @@
parameters:
distro: ''
repo: ''

steps:
- task: DownloadSecureFile@1
Expand All @@ -17,7 +18,7 @@ steps:
displayName: 'set up gcloud'
- script: |
distro=${{ parameters.distro }}
repo=$([[ $distro == *"debian"* ]] && echo "debian-cloud" || echo "ubuntu-os-cloud")
repo=${{ parameters.repo }}
echo "distro: $distro"
echo "repo: $repo"
echo "gcp.project.name: $(gcp.project.name)"
Expand Down

0 comments on commit ac38f89

Please sign in to comment.