@adobe/helix-deploy 8.0.2 → 8.1.1
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.
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
- package/src/deploy/AWSConfig.js +13 -2
- package/src/deploy/AWSDeployer.js +19 -1
- package/src/template/cloudflare-adapter.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [8.1.1](https://github.com/adobe/helix-deploy/compare/v8.1.0...v8.1.1) (2023-01-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update adobe fixes ([d13d56a](https://github.com/adobe/helix-deploy/commit/d13d56a251cbb8dc68922abd8dd87f9da7e49658))
|
|
7
|
+
|
|
8
|
+
# [8.1.0](https://github.com/adobe/helix-deploy/compare/v8.0.2...v8.1.0) (2023-01-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add aws-update-secrets command ([#488](https://github.com/adobe/helix-deploy/issues/488)) ([70d0e2b](https://github.com/adobe/helix-deploy/commit/70d0e2bb2c2b907dbae41b7e988bb389d530348b))
|
|
14
|
+
|
|
1
15
|
## [8.0.2](https://github.com/adobe/helix-deploy/compare/v8.0.1...v8.0.2) (2023-01-21)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.1",
|
|
4
4
|
"description": "Library and Commandline Tools to build and deploy OpenWhisk Actions",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/adobe/helix-deploy#readme",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/fastly-native-promises": "2.0.15",
|
|
40
|
-
"@adobe/fetch": "3.
|
|
40
|
+
"@adobe/fetch": "3.6.0",
|
|
41
41
|
"@aws-sdk/client-apigatewayv2": "3.254.0",
|
|
42
42
|
"@aws-sdk/client-lambda": "3.254.0",
|
|
43
43
|
"@aws-sdk/client-s3": "3.254.0",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"yargs": "17.6.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@adobe/eslint-config-helix": "
|
|
74
|
+
"@adobe/eslint-config-helix": "2.0.1",
|
|
75
75
|
"@adobe/helix-shared-wrap": "1.0.5",
|
|
76
76
|
"@adobe/helix-status": "9.2.19",
|
|
77
|
-
"@adobe/helix-universal-logger": "2.0.
|
|
77
|
+
"@adobe/helix-universal-logger": "2.0.18",
|
|
78
78
|
"@semantic-release/changelog": "6.0.2",
|
|
79
79
|
"@semantic-release/git": "10.0.1",
|
|
80
80
|
"c8": "7.12.0",
|
package/src/deploy/AWSConfig.js
CHANGED
|
@@ -28,6 +28,7 @@ export default class AWSConfig {
|
|
|
28
28
|
arch: 'x86_64',
|
|
29
29
|
identitySources: ['$request.header.Authorization'],
|
|
30
30
|
deployBucket: '',
|
|
31
|
+
updateSecrets: undefined,
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -44,7 +45,8 @@ export default class AWSConfig {
|
|
|
44
45
|
.withAWSCleanUpIntegrations(argv.awsCleanupIntegrations)
|
|
45
46
|
.withAWSCreateRoutes(argv.awsCreateRoutes)
|
|
46
47
|
.withAWSParamsManager(argv.awsParameterManager)
|
|
47
|
-
.withAWSDeployBucket(argv.awsDeployBucket)
|
|
48
|
+
.withAWSDeployBucket(argv.awsDeployBucket)
|
|
49
|
+
.withAWSUpdateSecrets(argv.awsUpdateSecrets);
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
withAWSRegion(value) {
|
|
@@ -110,11 +112,16 @@ export default class AWSConfig {
|
|
|
110
112
|
return this;
|
|
111
113
|
}
|
|
112
114
|
|
|
115
|
+
withAWSUpdateSecrets(value) {
|
|
116
|
+
this.updateSecrets = value;
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
119
|
+
|
|
113
120
|
static yarg(yargs) {
|
|
114
121
|
return yargs
|
|
115
122
|
.group(['aws-region', 'aws-api', 'aws-role', 'aws-cleanup-buckets', 'aws-cleanup-integrations',
|
|
116
123
|
'aws-create-routes', 'aws-create-authorizer', 'aws-attach-authorizer', 'aws-lambda-format',
|
|
117
|
-
'aws-parameter-manager', 'aws-deploy-template', 'aws-arch'], 'AWS Deployment Options')
|
|
124
|
+
'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets'], 'AWS Deployment Options')
|
|
118
125
|
.option('aws-region', {
|
|
119
126
|
description: 'the AWS region to deploy lambda functions to',
|
|
120
127
|
type: 'string',
|
|
@@ -146,6 +153,10 @@ export default class AWSConfig {
|
|
|
146
153
|
default: ['secret'],
|
|
147
154
|
array: true,
|
|
148
155
|
})
|
|
156
|
+
.option('aws-update-secrets', {
|
|
157
|
+
description: 'Uploads the function specific secrets with the params. defaults to /helix-deploy/{pkg}/{name}',
|
|
158
|
+
type: 'string',
|
|
159
|
+
})
|
|
149
160
|
.option('aws-lambda-format', {
|
|
150
161
|
description: 'Format to use to create lambda functions (note that all dots (\'.\') will be replaced with underscores.',
|
|
151
162
|
type: 'string',
|
|
@@ -475,6 +475,21 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
475
475
|
return this._functionURL;
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
+
async updateSecrets() {
|
|
479
|
+
const { cfg } = this;
|
|
480
|
+
const SecretId = cfg.updateSecrets || `/helix-deploy/${cfg.packageName}/${cfg.baseName}`;
|
|
481
|
+
this.log.info(`--: updating app parameters in secrets manager at '${SecretId}'...`);
|
|
482
|
+
try {
|
|
483
|
+
await this._sm.send(new PutSecretValueCommand({
|
|
484
|
+
SecretId,
|
|
485
|
+
SecretString: JSON.stringify(cfg.params),
|
|
486
|
+
}));
|
|
487
|
+
} catch (e) {
|
|
488
|
+
this.log.error(chalk`{red error:} unable to update value of '${SecretId}'`);
|
|
489
|
+
throw e;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
478
493
|
async updatePackage() {
|
|
479
494
|
const { cfg } = this;
|
|
480
495
|
let found = false;
|
|
@@ -827,7 +842,7 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
827
842
|
}
|
|
828
843
|
|
|
829
844
|
async validateAdditionalTasks() {
|
|
830
|
-
if (this._cfg.cleanUpIntegrations) {
|
|
845
|
+
if (this._cfg.cleanUpIntegrations || this._cfg.updateSecrets !== undefined) {
|
|
831
846
|
// disable auto build if no deploy
|
|
832
847
|
if (!this.cfg.deploy) {
|
|
833
848
|
this.cfg.build = false;
|
|
@@ -840,6 +855,9 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
840
855
|
if (this._cfg.cleanUpIntegrations) {
|
|
841
856
|
await this.cleanUpIntegrations();
|
|
842
857
|
}
|
|
858
|
+
if (this._cfg.updateSecrets !== undefined) {
|
|
859
|
+
await this.updateSecrets();
|
|
860
|
+
}
|
|
843
861
|
}
|
|
844
862
|
|
|
845
863
|
async deploy() {
|