File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ If ($Env:BUILDKITE_AGENT_ENABLE_GIT_MIRRORS_EXPERIMENT -eq "true") {
77
77
$Env: BUILDKITE_AGENT_GIT_MIRRORS_PATH = " C:\buildkite-agent\git-mirrors"
78
78
}
79
79
80
+ # Get token from ssm param (if we have a path) if it's not set explicitly
81
+ If (($null -eq $Env: BUILDKITE_AGENT_TOKEN -or $Env: BUILDKITE_AGENT_TOKEN -eq " " ) -and
82
+ ($null -ne $Env: BUILDKITE_AGENT_TOKEN_PATH -and $Env: BUILDKITE_AGENT_TOKEN_PATH -ne " " )) {
83
+ $Env: BUILDKITE_AGENT_TOKEN = $ (aws ssm get-parameter -- name $Env: BUILDKITE_AGENT_TOKEN_PATH -- with- decryption -- output text -- query Parameter.Value -- region $Env: AWS_REGION )
84
+ }
85
+
80
86
$OFS = " ,"
81
87
Set-Content - Path C:\buildkite- agent\buildkite- agent.cfg - Value @"
82
88
name="${Env: BUILDKITE_STACK_NAME} -${Env: INSTANCE_ID} -%n"
You can’t perform that action at this time.
0 commit comments