@blossm/deploy-cli-template 0.0.681 → 0.0.683

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.
Files changed (3) hide show
  1. package/README.md +10 -0
  2. package/index.js +11 -9
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1 +1,11 @@
1
1
  Deploys a template to cloud build.
2
+
3
+ The assembled `build.yaml` is submitted with `gcloud beta builds submit`, which
4
+ runs synchronously with the caller's terminal attached. Generated builds log
5
+ with `CLOUD_LOGGING_ONLY`, and only the beta release track streams those logs,
6
+ so the operator needs the `beta` gcloud component and `roles/logging.viewer` on
7
+ the target project. A failed or interrupted submission rejects the command, and
8
+ the temporary working directory is removed either way.
9
+
10
+ `--dry-run` submits a test-only build that deploys nothing. Its result is the
11
+ test result: see the integration suite notes in `@blossm/merge-cli-template`.
package/index.js CHANGED
@@ -32,6 +32,7 @@ const build = async ({ workingDir, env }) => {
32
32
  deps.execFileSync(
33
33
  "gcloud",
34
34
  [
35
+ "beta",
35
36
  "builds",
36
37
  "submit",
37
38
  ".",
@@ -85,16 +86,17 @@ export default ({ domain, dir }) => async (args, configFn) => {
85
86
  roboSay(`Deploying ${e} by assembling template into ${workingDir}...`)
86
87
  );
87
88
 
88
- await mergeCliTemplate({
89
- scriptDir: dir,
90
- workingDir,
91
- env: e,
92
- path: input.path,
93
- dry: input.dryRun,
94
- configFn,
95
- });
96
-
97
89
  try {
90
+ // Assembly failures also remove the working directory.
91
+ await mergeCliTemplate({
92
+ scriptDir: dir,
93
+ workingDir,
94
+ env: e,
95
+ path: input.path,
96
+ dry: input.dryRun,
97
+ configFn,
98
+ });
99
+
98
100
  if (input.unitTest) {
99
101
  //eslint-disable-next-line no-console
100
102
  console.log(roboSay("Running your tests..."));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blossm/deploy-cli-template",
3
- "version": "0.0.681",
3
+ "version": "0.0.683",
4
4
  "description": "Deploys a template to cloud build.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -15,8 +15,8 @@
15
15
  "test": "echo \"Error: no test specified\" && exit 0"
16
16
  },
17
17
  "dependencies": {
18
- "@blossm/cli-root-dir": "^0.0.16",
19
- "@blossm/merge-cli-template": "^0.0.645",
18
+ "@blossm/cli-root-dir": "^0.0.17",
19
+ "@blossm/merge-cli-template": "^0.0.647",
20
20
  "@blossm/normalize-cli": "^0.0.23",
21
21
  "@blossm/robo-say": "^0.0.12",
22
22
  "@blossm/test-cli-template": "^0.0.24",
@@ -27,5 +27,5 @@
27
27
  "devDependencies": {
28
28
  "mocha": "^12.0.3"
29
29
  },
30
- "gitHead": "18a2e086ec8fe64a8cf7b0d83262eb968f321d93"
30
+ "gitHead": "c3e1c6b4a2bb714ee809d5657ac1afa14a9a82b8"
31
31
  }