@hiiretail/gcp-infra-cli 0.65.2 → 0.65.6
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/generators/init/clan-infra/index.js +19 -4
- package/generators/init/clan-infra/templates/github/workflows/release-notes.yml +11 -9
- package/generators/init/clan-infra/templates/{release-notes → release-notes-schema}/release-notes.schema.json +0 -0
- package/generators/resources/cloudsql/index.js +2 -2
- package/generators/resources/scheduler/templates/scheduler/terragrunt.hcl +2 -2
- package/package.json +1 -1
|
@@ -46,8 +46,7 @@ module.exports = class extends BaseGenerator {
|
|
|
46
46
|
{
|
|
47
47
|
type: 'input',
|
|
48
48
|
name: 'foldersToSync',
|
|
49
|
-
message: 'Provide the name of docs subfolders that you want to sync to the Developer Portal (comma-seperated)',
|
|
50
|
-
validate: required,
|
|
49
|
+
message: 'Provide the name of docs subfolders that you want to sync to the Developer Portal (comma-seperated). Leave empty to add it later.',
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
52
|
type: 'list',
|
|
@@ -56,6 +55,12 @@ module.exports = class extends BaseGenerator {
|
|
|
56
55
|
default: 'false',
|
|
57
56
|
choices: ['true', 'false'],
|
|
58
57
|
},
|
|
58
|
+
{
|
|
59
|
+
type: 'input',
|
|
60
|
+
name: 'serviceName',
|
|
61
|
+
message: 'Provide the name of your service',
|
|
62
|
+
validate: required,
|
|
63
|
+
},
|
|
59
64
|
];
|
|
60
65
|
|
|
61
66
|
return this.prompt(prompts).then((props) => {
|
|
@@ -64,7 +69,12 @@ module.exports = class extends BaseGenerator {
|
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
writing() {
|
|
67
|
-
const {
|
|
72
|
+
const {
|
|
73
|
+
clan,
|
|
74
|
+
tribe,
|
|
75
|
+
group,
|
|
76
|
+
serviceName,
|
|
77
|
+
} = this.answers;
|
|
68
78
|
const groups = group.startsWith('@') ? group : `@extenda/${group}`;
|
|
69
79
|
const [tribeProd, tribeStaging] = getGcpProjects(this, tribe);
|
|
70
80
|
const [clanProd, clanStaging] = getGcpProjects(this, clan);
|
|
@@ -118,7 +128,12 @@ module.exports = class extends BaseGenerator {
|
|
|
118
128
|
});
|
|
119
129
|
this.copyDir(
|
|
120
130
|
'release-notes',
|
|
121
|
-
this.destinationPath(
|
|
131
|
+
this.destinationPath(`docs/${serviceName}/release-notes`),
|
|
132
|
+
this.answers,
|
|
133
|
+
);
|
|
134
|
+
this.copyDir(
|
|
135
|
+
'release-notes-schema',
|
|
136
|
+
this.destinationPath('docs/'),
|
|
122
137
|
this.answers,
|
|
123
138
|
);
|
|
124
139
|
this.fs.copy(
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
name: Release Notes
|
|
2
|
-
on:
|
|
2
|
+
on:
|
|
3
3
|
pull_request:
|
|
4
|
-
paths:
|
|
4
|
+
paths:
|
|
5
|
+
- 'docs/**/release-notes/*.yaml'
|
|
6
|
+
- 'docs/release-notes.schema.json'
|
|
7
|
+
- '.github/workflows/release-notes.yaml'
|
|
5
8
|
|
|
6
9
|
jobs:
|
|
7
10
|
yamllint:
|
|
@@ -15,17 +18,16 @@ jobs:
|
|
|
15
18
|
run: sudo pip install yamllint
|
|
16
19
|
|
|
17
20
|
- name: YAML lint
|
|
18
|
-
run:
|
|
21
|
+
run: |
|
|
22
|
+
for f in docs/**/release-notes/*.yaml; do
|
|
23
|
+
yamllint docs/release-notes.schema.json -d "$f"
|
|
24
|
+
done
|
|
19
25
|
|
|
20
26
|
- name: Install pajv
|
|
21
27
|
run: sudo npm install -g pajv
|
|
22
28
|
|
|
23
29
|
- name: Validate YAML schema
|
|
24
30
|
run: |
|
|
25
|
-
for f in docs
|
|
26
|
-
pajv -s docs/release-notes
|
|
31
|
+
for f in docs/**/release-notes/*.yaml; do
|
|
32
|
+
pajv -s docs/release-notes.schema.json -d "$f"
|
|
27
33
|
done
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
# TODO:
|
|
31
|
-
# - name: Publish
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
|
|
2
2
|
# working directory, into a temporary folder, and execute your Terraform commands in that folder.
|
|
3
3
|
terraform {
|
|
4
|
-
source = "git::https://github.com/extenda/tf-module-gcp-scheduler//?ref=v0.1.
|
|
4
|
+
source = "git::https://github.com/extenda/tf-module-gcp-scheduler//?ref=v0.1.3"
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
# Include all settings from the root terragrunt.hcl file
|
|
@@ -34,7 +34,7 @@ inputs = merge(
|
|
|
34
34
|
job_schedule = "<%-schedule%>"
|
|
35
35
|
<% if (target == 'http') { %>
|
|
36
36
|
uri = "<%-uri%>"
|
|
37
|
-
http_method = "<%-httpMethod%>"
|
|
37
|
+
http_method = "<%-httpMethod%>"
|
|
38
38
|
<% } else { %>
|
|
39
39
|
pubsub_topic_name = "projects/${local.project_vars.locals.project_id}/topics/${dependency.topic.outputs.topic}"
|
|
40
40
|
data = "${base64encode("<%-data%>")}"
|