Skip to content

Commit 16d885b

Browse files
committed
Adds variables group
1 parent 0d635d4 commit 16d885b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

azure-pipelines.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ trigger:
77
- master
88
- develop
99

10+
variables:
11+
- group: postgres-express-node
12+
1013
pool:
1114
vmImage: 'ubuntu-latest'
1215

@@ -15,6 +18,17 @@ steps:
1518
inputs:
1619
versionSpec: '10.x'
1720
displayName: 'Install Node.js'
21+
- powershell: |
22+
# Using an input-macro:
23+
Write-Host "This works: $(mySecret)"
24+
25+
# Using the env var directly:
26+
Write-Host "This does not work: $env:MYSECRET"
27+
28+
# Using the mapped env var:
29+
Write-Host "This works: $env:MY_MAPPED_ENV_VAR" # Recommended
30+
env:
31+
MY_MAPPED_ENV_VAR: $(mySecret)
1832

1933
- script: |
2034
npm install

0 commit comments

Comments
 (0)