aws-delivlib 14.14.20 → 14.14.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,16 +57,22 @@ fi
57
57
 
58
58
  echo "Publishing NuGet packages..."
59
59
 
60
- if [ -n "${NUGET_ROLE_ARN:-}" ]; then
61
- ROLE=$(aws sts assume-role --region "${NUGET_SECRET_REGION:-}" --role-arn "${NUGET_ROLE_ARN:-}" --role-session-name "buildable_nuget_publish")
62
- export AWS_ACCESS_KEY_ID=$(echo $ROLE | jq -r .Credentials.AccessKeyId)
63
- export AWS_SECRET_ACCESS_KEY=$(echo $ROLE | jq -r .Credentials.SecretAccessKey)
64
- export AWS_SESSION_TOKEN=$(echo $ROLE | jq -r .Credentials.SessionToken)
65
- fi
60
+ (
61
+ # Assume a role, just for the purposes of retrieving the secret and nothing else.
62
+ # Run in a subshell so the changed environment variables in here don't interfere with the ones
63
+ # of the parent shell.
64
+ if [ -n "${NUGET_ROLE_ARN:-}" ]; then
65
+ ROLE=$(aws sts assume-role --region "${NUGET_SECRET_REGION:-}" --role-arn "${NUGET_ROLE_ARN:-}" --role-session-name "buildable_nuget_publish")
66
+ export AWS_ACCESS_KEY_ID=$(echo $ROLE | jq -r .Credentials.AccessKeyId)
67
+ export AWS_SECRET_ACCESS_KEY=$(echo $ROLE | jq -r .Credentials.SecretAccessKey)
68
+ export AWS_SESSION_TOKEN=$(echo $ROLE | jq -r .Credentials.SessionToken)
69
+ fi
70
+ aws secretsmanager get-secret-value --region "${NUGET_SECRET_REGION:-}" --secret-id "${NUGET_SECRET_ID:-}" | jq -r .SecretString | jq -r .NugetApiKey > /tmp/key.txt
71
+ )
72
+ NUGET_API_KEY=$(cat /tmp/key.txt)
66
73
 
67
74
  NUGET_SOURCE="https://api.nuget.org/v3/index.json"
68
75
  NUGET_SYMBOL_SOURCE="https://nuget.smbsrc.net/"
69
- NUGET_API_KEY=$(aws secretsmanager get-secret-value --region "${NUGET_SECRET_REGION:-}" --secret-id "${NUGET_SECRET_ID:-}" | jq -r .SecretString | jq -r .NugetApiKey)
70
76
 
71
77
  log=$(mktemp -d)/log.txt
72
78
 
package/package.json CHANGED
@@ -97,7 +97,7 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "version": "14.14.20",
100
+ "version": "14.14.21",
101
101
  "jest": {
102
102
  "coverageProvider": "v8",
103
103
  "testMatch": [