@adobe/helix-deploy 9.2.4 → 9.3.0
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 +7 -0
- package/README.md +84 -146
- package/package.json +1 -1
- package/src/deploy/AWSConfig.js +2 -1
- package/src/deploy/AWSDeployer.js +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [9.3.0](https://github.com/adobe/helix-deploy/compare/v9.2.4...v9.3.0) (2023-09-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* improve error message for invalid deploy bundle ([#576](https://github.com/adobe/helix-deploy/issues/576)) ([5d192a6](https://github.com/adobe/helix-deploy/commit/5d192a6a298962b1f7f8123c8bcd2a38fb2f68b9))
|
|
7
|
+
|
|
1
8
|
## [9.2.4](https://github.com/adobe/helix-deploy/compare/v9.2.3...v9.2.4) (2023-09-02)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -44,189 +44,127 @@ you can also use npx: `npx hedy` or install it globally `npm install -g helix-de
|
|
|
44
44
|
```console
|
|
45
45
|
$ hedy --help
|
|
46
46
|
General Options
|
|
47
|
-
-v, --verbose
|
|
48
|
-
--directory Project directory
|
|
49
|
-
--version Show version number
|
|
47
|
+
-v, --verbose [boolean] [default: false]
|
|
48
|
+
--directory Project directory [string] [default: "."]
|
|
49
|
+
--version Show version number [boolean]
|
|
50
50
|
|
|
51
51
|
Operation Options
|
|
52
|
-
--help Show help
|
|
53
|
-
--build Build the deployment package
|
|
54
|
-
--deploy Automatically deploy to specified targets
|
|
55
|
-
|
|
56
|
-
--test
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--update-package Create or update package with params.
|
|
61
|
-
[boolean] [default: false]
|
|
62
|
-
-l, --version-link Create symlinks (sequences) after deployment. "major" an
|
|
63
|
-
d "minor" will create respective version links [array]
|
|
64
|
-
--delete Delete the action from OpenWhisk. Implies no-build
|
|
65
|
-
[boolean] [default: false]
|
|
52
|
+
--help Show help [boolean]
|
|
53
|
+
--build Build the deployment package [boolean] [default: true]
|
|
54
|
+
--deploy Automatically deploy to specified targets [boolean] [default: false]
|
|
55
|
+
--test Invoke action after deployment. Can be relative url or "true" [string]
|
|
56
|
+
--test-bundle Invoke bundle after build. Can be relative url or "true". Defaults to the same as --test [string]
|
|
57
|
+
--update-package Create or update package with params. [boolean] [default: false]
|
|
58
|
+
-l, --version-link Create symlinks (sequences) after deployment. "major" and "minor" will create respective version links [array]
|
|
59
|
+
--delete Delete the action from OpenWhisk. Implies no-build [boolean] [default: false]
|
|
66
60
|
|
|
67
61
|
Build Options
|
|
68
|
-
--minify
|
|
69
|
-
-s, --static
|
|
70
|
-
|
|
71
|
-
--
|
|
72
|
-
|
|
73
|
-
--externals
|
|
74
|
-
-m, --modules
|
|
75
|
-
--adapterFile
|
|
76
|
-
--esm
|
|
77
|
-
|
|
78
|
-
--bundler Select bundler backend (webpack, rollup)
|
|
79
|
-
[string] [default: "webpack"]
|
|
62
|
+
--minify Minify the final bundle [boolean] [default: false]
|
|
63
|
+
-s, --static Includes a static file into the archive [array] [default: []]
|
|
64
|
+
--entryFile Specifies the entry file (the universal function). [default: "src/index.js"]
|
|
65
|
+
--externals Defines the externals for the bundler (these dependencies will not be bundled). [array] [default: []]
|
|
66
|
+
--edge-externals Defines the externals for the edge bundler (these dependencies will not be bundled for Cloudflare or Fastly). [array] [default: []]
|
|
67
|
+
--serverless-externals Defines the externals for the serverless bundler (these dependencies will not be bundled for AWS Lambda or Google Cloud Functions). [array] [default: []]
|
|
68
|
+
-m, --modules Include a node_module as is. [array] [default: []]
|
|
69
|
+
--adapterFile Specifies the adapter file (the exported module).
|
|
70
|
+
--esm Produce EcmaScript Module (experimental, disables edge arch) [boolean] [default: false]
|
|
71
|
+
--bundler Select bundler backend (webpack, rollup) [string] [default: "webpack"]
|
|
80
72
|
|
|
81
73
|
Deploy Options
|
|
82
|
-
--target Select target(s) for test, deploy, update-package
|
|
83
|
-
|
|
84
|
-
--hints, --no-hints Show additional hints for deployment
|
|
85
|
-
[boolean] [default: true]
|
|
74
|
+
--target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
|
|
75
|
+
--hints, --no-hints Show additional hints for deployment [boolean] [default: true]
|
|
86
76
|
|
|
87
77
|
Test Options
|
|
88
|
-
--target Select target(s) for test, deploy, update-package actions
|
|
89
|
-
|
|
90
|
-
--test-
|
|
91
|
-
|
|
92
|
-
--test-url Test url to use after deployment, in case --test is not an
|
|
93
|
-
url. [string]
|
|
94
|
-
--test-headers Test headers to send in test requests.
|
|
95
|
-
[array] [default: []]
|
|
78
|
+
--target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
|
|
79
|
+
--test-params Invoke openwhisk action after deployment with the given params. [array] [default: []]
|
|
80
|
+
--test-url Test url to use after deployment, in case --test is not an url. [string]
|
|
81
|
+
--test-headers Test headers to send in test requests. [array] [default: []]
|
|
96
82
|
|
|
97
83
|
Link Options
|
|
98
|
-
--target Select target(s) for test, deploy, update-package actions (
|
|
99
|
-
|
|
100
|
-
--linkPackage Package name for version links [string]
|
|
84
|
+
--target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
|
|
85
|
+
--linkPackage Package name for version links [string]
|
|
101
86
|
|
|
102
87
|
Update Package Options
|
|
103
|
-
--package.params OpenWhisk package params.
|
|
104
|
-
--package.params-file OpenWhisk package params file.[array] [default: []]
|
|
88
|
+
--package.params OpenWhisk package params. [array] [default: []]
|
|
89
|
+
--package.params-file OpenWhisk package params file. [array] [default: []]
|
|
105
90
|
|
|
106
|
-
Cleanup Old Deployments: automatically delete redundant versions older than
|
|
107
|
-
cified.
|
|
91
|
+
Cleanup Old Deployments: automatically delete redundant versions older than specified.
|
|
108
92
|
Use a pattern like 7d or 1m to specify time frames.
|
|
109
93
|
Use a simple number like --cleanup-ci=5 to retain the last five CI builds
|
|
110
94
|
--cleanup-ci Automatically delete redundant CI versions
|
|
111
|
-
--cleanup-patch Automatically delete redundant patch versions. At least
|
|
112
|
-
|
|
113
|
-
--cleanup-minor Automatically delete redundant minor versions. At least o
|
|
114
|
-
ne minor version for each major version will be kept.
|
|
95
|
+
--cleanup-patch Automatically delete redundant patch versions. At least one patch version for each minor version will be kept.
|
|
96
|
+
--cleanup-minor Automatically delete redundant minor versions. At least one minor version for each major version will be kept.
|
|
115
97
|
--cleanup-major Automatically delete redundant major versions.
|
|
116
98
|
|
|
117
99
|
General Action Options
|
|
118
100
|
--name Action name. Can be prefixed with package.
|
|
119
|
-
--package.name Action package name.
|
|
120
|
-
--node-version Specifies the node.js version to use in the serverless
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
--updated-at unix timestamp when the action or sequence was updated (de
|
|
128
|
-
faults to the current time).
|
|
129
|
-
[number] [default: 1642491741896]
|
|
130
|
-
--web-secure Annotates the action with require-whisk-auth. leave empty
|
|
131
|
-
to generate random token. [string]
|
|
132
|
-
-t, --timeout the timeout limit in milliseconds after which the action i
|
|
133
|
-
s terminated [default: 60000]
|
|
101
|
+
--package.name Action package name. [string]
|
|
102
|
+
--node-version Specifies the node.js version to use in the serverless runtime [default: "18"]
|
|
103
|
+
-p, --params Include the given action param. can be json or env. [array] [default: []]
|
|
104
|
+
-f, --params-file Include the given action param from a file; can be json or env. [array] [default: []]
|
|
105
|
+
--updated-by user that updated the action or sequence. [string]
|
|
106
|
+
--updated-at unix timestamp when the action or sequence was updated (defaults to the current time). [number] [default: 1693809202744]
|
|
107
|
+
--web-secure Annotates the action with require-whisk-auth. leave empty to generate random token. [string]
|
|
108
|
+
-t, --timeout the timeout limit in milliseconds after which the action is terminated [default: 60000]
|
|
134
109
|
--pkgVersion Version use in the embedded package.json.
|
|
135
110
|
--memory the maximum memory LIMIT in MB for the action
|
|
136
|
-
--concurrency the maximum intra-container concurrent activation LIMIT
|
|
137
|
-
r the action
|
|
111
|
+
--concurrency the maximum intra-container concurrent activation LIMIT for the action
|
|
138
112
|
|
|
139
113
|
OpenWhisk Action Options
|
|
140
|
-
--namespace OpenWhisk namespace. Needs to match the namespace
|
|
141
|
-
|
|
142
|
-
--package.shared OpenWhisk package scope. [boolean] [default: false]
|
|
114
|
+
--namespace OpenWhisk namespace. Needs to match the namespace provided with the openwhisk credentials.
|
|
115
|
+
--package.shared OpenWhisk package scope. [boolean] [default: false]
|
|
143
116
|
|
|
144
117
|
AWS Deployment Options
|
|
145
|
-
--aws-region the AWS region to deploy lambda functions to
|
|
146
|
-
|
|
147
|
-
--aws-
|
|
148
|
-
|
|
149
|
-
--aws-
|
|
150
|
-
|
|
151
|
-
--aws-
|
|
152
|
-
|
|
153
|
-
--aws-
|
|
154
|
-
|
|
155
|
-
--aws-
|
|
156
|
-
|
|
157
|
-
|
|
118
|
+
--aws-region the AWS region to deploy lambda functions to [string] [default: ""]
|
|
119
|
+
--aws-api the AWS API Gateway name. (id, "auto" or "create") [string] [default: "auto"]
|
|
120
|
+
--aws-role the AWS role ARN to execute lambda functions with [string] [default: ""]
|
|
121
|
+
--aws-cleanup-buckets
|
|
122
|
+
--aws-cleanup-integrations Cleans up unused integrations [boolean] [default: false]
|
|
123
|
+
--aws-create-routes Create routes for function (usually not needed due to proxy function). [boolean] [default: false]
|
|
124
|
+
--aws-create-authorizer Creates API Gateway authorizer using lambda authorization with this function and the specified name. The string can contain placeholders (note that all dots ('.') are replaced with underscores. Example: "helix-authorizer_${version}". [string]
|
|
125
|
+
--aws-attach-authorizer Attach specified authorizer to routes during linking. [string]
|
|
126
|
+
--aws-lambda-format Format to use to create lambda functions (note that all dots ('.') will be replaced with underscores. [string] [default: "${packageName}--${baseName}"]
|
|
127
|
+
--aws-parameter-manager Manager to use for storing package params. (either "secret" for Secrets Manager or "system" for System Manager) [array] [default: ["secret"]]
|
|
128
|
+
--aws-deploy-template
|
|
129
|
+
--aws-arch deployment architecture. either 'x86_64' or 'arm64' [string] [default: "x86_64"]
|
|
130
|
+
--aws-update-secrets Uploads the function specific secrets with the params. defaults to /helix-deploy/{pkg}/{name} [string]
|
|
131
|
+
--aws-deploy-bucket Name of the deploy S3 bucket to use (default is helix-deploy-bucket-{accountId}) [string] [default: ""]
|
|
132
|
+
--aws-identity-source Identity source to used when creating the authorizer [array] [default: ["$request.header.Authorization"]]
|
|
158
133
|
|
|
159
134
|
Google Deployment Options
|
|
160
|
-
--google-project-id the Google Cloud project to deploy to. Optional when
|
|
161
|
-
|
|
162
|
-
--google-
|
|
163
|
-
d from the Google Developers Console
|
|
164
|
-
[string] [default: ""]
|
|
165
|
-
--google-email the Google account email address. Required when usin
|
|
166
|
-
g a .pem or .p12 credential file
|
|
167
|
-
[string] [default: ""]
|
|
135
|
+
--google-project-id the Google Cloud project to deploy to. Optional when the key file is a JSON file [string] [default: ""]
|
|
136
|
+
--google-key-file full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console [string] [default: ""]
|
|
137
|
+
--google-email the Google account email address. Required when using a .pem or .p12 credential file [string] [default: ""]
|
|
168
138
|
|
|
169
139
|
Cloudflare Workers Deployment Options
|
|
170
|
-
--cloudflare-account-id the Cloudflare account ID to deploy to
|
|
171
|
-
|
|
172
|
-
--cloudflare-
|
|
173
|
-
|
|
174
|
-
[string] [default: ""]
|
|
175
|
-
--cloudflare-email the Cloudflare email address belonging to the au
|
|
176
|
-
thentication token [string] [default: ""]
|
|
177
|
-
--cloudflare-test-domain the *.workers.dev subdomain to use for testing d
|
|
178
|
-
eployed scripts [string] [default: ""]
|
|
140
|
+
--cloudflare-account-id the Cloudflare account ID to deploy to [string] [default: ""]
|
|
141
|
+
--cloudflare-auth the Cloudflare API token from https://dash.cloudflare.com/profile/api-tokens [string] [default: ""]
|
|
142
|
+
--cloudflare-email the Cloudflare email address belonging to the authentication token [string] [default: ""]
|
|
143
|
+
--cloudflare-test-domain the *.workers.dev subdomain to use for testing deployed scripts [string] [default: ""]
|
|
179
144
|
|
|
180
145
|
Fastly Compute@Edge Options
|
|
181
|
-
--compute-service-id the Fastly Service to deploy the action to
|
|
182
|
-
[string] [default: ""]
|
|
146
|
+
--compute-service-id the Fastly Service to deploy the action to [string] [default: ""]
|
|
183
147
|
--compute-domain
|
|
184
|
-
--fastly-auth the Fastly token
|
|
185
|
-
--coralogix-token the Coralogix token (to enable logging)
|
|
186
|
-
|
|
187
|
-
--compute-coralogix-app the Application name
|
|
188
|
-
[string] [default: "fastly-compute"]
|
|
148
|
+
--fastly-auth the Fastly token [string] [default: ""]
|
|
149
|
+
--coralogix-token the Coralogix token (to enable logging) [string] [default: ""]
|
|
150
|
+
--compute-coralogix-app the Application name [string] [default: "fastly-compute"]
|
|
189
151
|
|
|
190
152
|
Fastly Gateway Options
|
|
191
|
-
--fastly-service-id the Fastly Service to use as a gateway
|
|
192
|
-
|
|
193
|
-
--
|
|
194
|
-
--
|
|
195
|
-
|
|
196
|
-
--coralogix-token the Coralogix token (to enable logging)
|
|
197
|
-
[string] [default: ""]
|
|
198
|
-
--coralogix-app the Application name
|
|
199
|
-
[string] [default: "universal-runtime"]
|
|
153
|
+
--fastly-service-id the Fastly Service to use as a gateway [string] [default: ""]
|
|
154
|
+
--fastly-auth the Fastly token [string] [default: ""]
|
|
155
|
+
--checkpath the path to check as part of the Fastly health check [string] [default: ""]
|
|
156
|
+
--coralogix-token the Coralogix token (to enable logging) [string] [default: ""]
|
|
157
|
+
--coralogix-app the Application name [string] [default: "universal-runtime"]
|
|
200
158
|
|
|
201
159
|
Options:
|
|
202
|
-
--arch
|
|
203
|
-
|
|
204
|
-
--
|
|
205
|
-
|
|
206
|
-
--
|
|
207
|
-
|
|
208
|
-
--
|
|
209
|
-
|
|
210
|
-
random token.
|
|
211
|
-
[string] [default: "gXhVnUf6kIqZ64Xr0E4nTnlGBrKOrybQA7Ifx1S/2CA="]
|
|
212
|
-
--aws-parameter-manager Manager to use for storing package params. (eithe
|
|
213
|
-
r "secret" for Secrets Manager or "system" for Sy
|
|
214
|
-
stem Manager)
|
|
215
|
-
[array] [default: ["secret","system"]]
|
|
216
|
-
--aws-lambda-format Format to use to create lambda functions (note th
|
|
217
|
-
at all dots ('.') will be replaced with underscor
|
|
218
|
-
es.
|
|
219
|
-
[string] [default: "${packageName}--${baseName}"]
|
|
220
|
-
--google-region the Google Cloud region to deploy in
|
|
221
|
-
[string] [default: ""]
|
|
222
|
-
--compute-test-domain the domain name of the Compute@Edge service (used
|
|
223
|
-
for testing) [string] [default: ""]
|
|
224
|
-
--fastly-gateway the hostname of the Fastly gateway for package pa
|
|
225
|
-
rams [string] [default: ""]
|
|
226
|
-
--checkinterval the interval in milliseconds that each Fastly POP
|
|
227
|
-
should perform a health check. Set to 0 to disab
|
|
228
|
-
le health checks entirely.
|
|
229
|
-
[number] [default: 6000000]
|
|
160
|
+
--arch Select archs(s) for bundles (node,edge). [array] [default: ["node"]]
|
|
161
|
+
--format Action formats [default: {"aws":"/${packageName}/${baseName}/${version}"}]
|
|
162
|
+
--property Additional properties that can be used in formats. [default: {}]
|
|
163
|
+
--package-token Protects access to the gateway-stored package parameters with this token. leave empty to generate random token. [string] [default: "hUX/5Jke1K+YAgZJiUw370/NZ/UsCuFyJHKHKEp73OM="]
|
|
164
|
+
--google-region the Google Cloud region to deploy in [string] [default: ""]
|
|
165
|
+
--compute-test-domain the domain name of the Compute@Edge service (used for testing) [string] [default: ""]
|
|
166
|
+
--fastly-gateway the hostname of the Fastly gateway for package params [string] [default: ""]
|
|
167
|
+
--checkinterval the interval in milliseconds that each Fastly POP should perform a health check. Set to 0 to disable health checks entirely. [number] [default: 6000000]
|
|
230
168
|
```
|
|
231
169
|
|
|
232
170
|
With no arguments,the `hedy` just bundles your code into the respective `action.zip`:
|
package/package.json
CHANGED
package/src/deploy/AWSConfig.js
CHANGED
|
@@ -121,7 +121,8 @@ export default class AWSConfig {
|
|
|
121
121
|
return yargs
|
|
122
122
|
.group(['aws-region', 'aws-api', 'aws-role', 'aws-cleanup-buckets', 'aws-cleanup-integrations',
|
|
123
123
|
'aws-create-routes', 'aws-create-authorizer', 'aws-attach-authorizer', 'aws-lambda-format',
|
|
124
|
-
'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets'
|
|
124
|
+
'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets',
|
|
125
|
+
'aws-deploy-bucket', 'aws-identity-source'], 'AWS Deployment Options')
|
|
125
126
|
.option('aws-region', {
|
|
126
127
|
description: 'the AWS region to deploy lambda functions to',
|
|
127
128
|
type: 'string',
|
|
@@ -184,9 +184,14 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
184
184
|
Body: await fse.readFile(cfg.zipFile),
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
-
this.log.info(`--: uploading ${relZip} to S3 bucket
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
this.log.info(chalk`--: uploading ${relZip} to S3 bucket {blueBright s3://${this._bucket}}...`);
|
|
188
|
+
try {
|
|
189
|
+
await this._s3.send(new PutObjectCommand(uploadParams));
|
|
190
|
+
this.log.info(chalk`{green ok:} uploaded deploy package {blueBright s3://${this._bucket}/${this._key}}`);
|
|
191
|
+
} catch (e) {
|
|
192
|
+
this.log.error(chalk`{red error:} failed to update package to {blueBright s3://${this._bucket}/${this._key}}: ${e.message}`);
|
|
193
|
+
throw new Error('upload failed');
|
|
194
|
+
}
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
async deleteZIP() {
|