rails_template_18f 2.2.0 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +82 -69
- data/lib/generators/rails_template18f/auditree/auditree_generator.rb +2 -2
- data/lib/generators/rails_template18f/circleci/templates/circleci/config.yml.tt +6 -2
- data/lib/generators/rails_template18f/github_actions/templates/github/dependabot.yml.tt +16 -0
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-production.yml +4 -1
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-staging.yml +4 -1
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/terraform-production.yml +4 -1
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/terraform-staging.yml +4 -1
- data/lib/generators/rails_template18f/gitlab_ci/gitlab_ci_generator.rb +9 -9
- data/lib/generators/rails_template18f/gitlab_ci/templates/gitlab/{node.yml.tt → node.yml} +1 -1
- data/lib/generators/rails_template18f/gitlab_ci/templates/gitlab/rails.yml +11 -18
- data/lib/generators/rails_template18f/gitlab_ci/templates/gitlab-ci.yml.tt +81 -154
- data/lib/generators/rails_template18f/public_egress/public_egress_generator.rb +1 -1
- data/lib/generators/rails_template18f/terraform/templates/gitlab_bootstrap/apply.sh +4 -4
- data/lib/generators/rails_template18f/terraform/templates/gitlab_bootstrap/main.tf.tt +42 -26
- data/lib/generators/rails_template18f/terraform/templates/gitlab_bootstrap/setup_shadowenv.sh +4 -2
- data/lib/generators/rails_template18f/terraform/templates/s3_bootstrap/full/main.tf.tt +6 -19
- data/lib/generators/rails_template18f/terraform/templates/s3_bootstrap/sandbox/main.tf.tt +5 -18
- data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +4 -4
- data/lib/generators/rails_template18f/terraform/templates/terraform/app.tf.tt +6 -6
- data/lib/generators/rails_template18f/terraform/templates/terraform/main.tf.tt +15 -13
- data/lib/generators/rails_template18f/terraform/templates/terraform/{production.tfvars.tt → production.env.tfvars.tt} +0 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/providers.tf.tt +5 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/{staging.tfvars.tt → staging.env.tfvars.tt} +1 -2
- data/lib/generators/rails_template18f/terraform/templates/terraform/terraform.sh.tt +15 -6
- data/lib/generators/rails_template18f/terraform/templates/terraform/variables.tf.tt +9 -5
- data/lib/generators/rails_template18f/terraform/terraform_generator.rb +2 -1
- data/lib/rails_template18f/generators/cloud_gov_parsing.rb +2 -2
- data/lib/rails_template18f/version.rb +1 -1
- data/template.rb +1 -1
- data/templates/README.md.tt +1 -1
- metadata +5 -7
- data/lib/generators/rails_template18f/gitlab_ci/templates/gitlab/terraform.yml +0 -33
- data/lib/generators/rails_template18f/terraform/templates/gitlab_bootstrap/bot_secrets.tftpl +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3ca664ff6618dfdbbd5253b5a58ed43487d7a268cce07bded46840c96353cf6
|
|
4
|
+
data.tar.gz: 27084955f39ced3910a073008f14fec6630c11607429cdbf9cd1b6f61af0b9f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9fb5460862865efea3faeb5cf6e1f220e725b57e83c0eb4b3178d486169be2e6e5f6cc3185a621c05ac50a9cdda068e11eb3ae9efba2ae17ce2041fe64e9a41f
|
|
7
|
+
data.tar.gz: f5826c6d647d2c0285b0399fccb74e91c2ff4c832f9b4d5ab9f89d89dc81302a7c1880aab76076a7fc81dcc906e45536261b0d5b367284581ff51a9c0751ec03
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rails_template_18f (2.
|
|
4
|
+
rails_template_18f (2.3.0)
|
|
5
5
|
activesupport (~> 8.0.1)
|
|
6
6
|
colorize (~> 1.1)
|
|
7
7
|
railties (~> 8.0.1)
|
|
@@ -10,9 +10,9 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
actionpack (8.0.
|
|
14
|
-
actionview (= 8.0.
|
|
15
|
-
activesupport (= 8.0.
|
|
13
|
+
actionpack (8.0.4)
|
|
14
|
+
actionview (= 8.0.4)
|
|
15
|
+
activesupport (= 8.0.4)
|
|
16
16
|
nokogiri (>= 1.8.5)
|
|
17
17
|
rack (>= 2.2.4)
|
|
18
18
|
rack-session (>= 1.0.1)
|
|
@@ -20,13 +20,13 @@ GEM
|
|
|
20
20
|
rails-dom-testing (~> 2.2)
|
|
21
21
|
rails-html-sanitizer (~> 1.6)
|
|
22
22
|
useragent (~> 0.16)
|
|
23
|
-
actionview (8.0.
|
|
24
|
-
activesupport (= 8.0.
|
|
23
|
+
actionview (8.0.4)
|
|
24
|
+
activesupport (= 8.0.4)
|
|
25
25
|
builder (~> 3.1)
|
|
26
26
|
erubi (~> 1.11)
|
|
27
27
|
rails-dom-testing (~> 2.2)
|
|
28
28
|
rails-html-sanitizer (~> 1.6)
|
|
29
|
-
activesupport (8.0.
|
|
29
|
+
activesupport (8.0.4)
|
|
30
30
|
base64
|
|
31
31
|
benchmark (>= 0.3)
|
|
32
32
|
bigdecimal
|
|
@@ -43,49 +43,55 @@ GEM
|
|
|
43
43
|
activesupport (>= 3.0)
|
|
44
44
|
railties (>= 3.0)
|
|
45
45
|
rspec-rails (>= 2.2)
|
|
46
|
-
ast (2.4.
|
|
47
|
-
base64 (0.
|
|
48
|
-
benchmark (0.
|
|
49
|
-
bigdecimal (3.1
|
|
46
|
+
ast (2.4.3)
|
|
47
|
+
base64 (0.3.0)
|
|
48
|
+
benchmark (0.5.0)
|
|
49
|
+
bigdecimal (3.3.1)
|
|
50
50
|
builder (3.3.0)
|
|
51
|
-
byebug (
|
|
51
|
+
byebug (12.0.0)
|
|
52
52
|
colorize (1.1.0)
|
|
53
|
-
concurrent-ruby (1.3.
|
|
54
|
-
connection_pool (2.4
|
|
53
|
+
concurrent-ruby (1.3.5)
|
|
54
|
+
connection_pool (2.5.4)
|
|
55
55
|
crass (1.0.6)
|
|
56
|
-
date (3.
|
|
57
|
-
diff-lcs (1.
|
|
58
|
-
drb (2.2.
|
|
56
|
+
date (3.5.0)
|
|
57
|
+
diff-lcs (1.6.2)
|
|
58
|
+
drb (2.2.3)
|
|
59
|
+
erb (6.0.0)
|
|
59
60
|
erubi (1.13.1)
|
|
60
|
-
i18n (1.14.
|
|
61
|
+
i18n (1.14.7)
|
|
61
62
|
concurrent-ruby (~> 1.0)
|
|
62
|
-
io-console (0.8.
|
|
63
|
-
irb (1.
|
|
63
|
+
io-console (0.8.1)
|
|
64
|
+
irb (1.15.3)
|
|
65
|
+
pp (>= 0.6.0)
|
|
64
66
|
rdoc (>= 4.0.0)
|
|
65
67
|
reline (>= 0.4.2)
|
|
66
|
-
json (2.
|
|
67
|
-
language_server-protocol (3.17.0.
|
|
68
|
+
json (2.16.0)
|
|
69
|
+
language_server-protocol (3.17.0.5)
|
|
68
70
|
lint_roller (1.1.0)
|
|
69
|
-
logger (1.
|
|
70
|
-
loofah (2.
|
|
71
|
+
logger (1.7.0)
|
|
72
|
+
loofah (2.24.1)
|
|
71
73
|
crass (~> 1.0.2)
|
|
72
74
|
nokogiri (>= 1.12.0)
|
|
73
|
-
minitest (5.
|
|
74
|
-
nokogiri (1.18.
|
|
75
|
+
minitest (5.26.2)
|
|
76
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
75
77
|
racc (~> 1.4)
|
|
76
|
-
nokogiri (1.18.
|
|
78
|
+
nokogiri (1.18.10-x86_64-darwin)
|
|
77
79
|
racc (~> 1.4)
|
|
78
|
-
nokogiri (1.18.
|
|
80
|
+
nokogiri (1.18.10-x86_64-linux-gnu)
|
|
79
81
|
racc (~> 1.4)
|
|
80
|
-
parallel (1.
|
|
81
|
-
parser (3.3.
|
|
82
|
+
parallel (1.27.0)
|
|
83
|
+
parser (3.3.10.0)
|
|
82
84
|
ast (~> 2.4.1)
|
|
83
85
|
racc
|
|
84
|
-
|
|
86
|
+
pp (0.6.3)
|
|
87
|
+
prettyprint
|
|
88
|
+
prettyprint (0.2.0)
|
|
89
|
+
prism (1.6.0)
|
|
90
|
+
psych (5.2.6)
|
|
85
91
|
date
|
|
86
92
|
stringio
|
|
87
93
|
racc (1.8.1)
|
|
88
|
-
rack (3.
|
|
94
|
+
rack (3.2.4)
|
|
89
95
|
rack-session (2.1.1)
|
|
90
96
|
base64 (>= 0.1.0)
|
|
91
97
|
rack (>= 3.0.0)
|
|
@@ -93,88 +99,95 @@ GEM
|
|
|
93
99
|
rack (>= 1.3)
|
|
94
100
|
rackup (2.2.1)
|
|
95
101
|
rack (>= 3)
|
|
96
|
-
rails-dom-testing (2.
|
|
102
|
+
rails-dom-testing (2.3.0)
|
|
97
103
|
activesupport (>= 5.0.0)
|
|
98
104
|
minitest
|
|
99
105
|
nokogiri (>= 1.6)
|
|
100
106
|
rails-html-sanitizer (1.6.2)
|
|
101
107
|
loofah (~> 2.21)
|
|
102
108
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
103
|
-
railties (8.0.
|
|
104
|
-
actionpack (= 8.0.
|
|
105
|
-
activesupport (= 8.0.
|
|
109
|
+
railties (8.0.4)
|
|
110
|
+
actionpack (= 8.0.4)
|
|
111
|
+
activesupport (= 8.0.4)
|
|
106
112
|
irb (~> 1.13)
|
|
107
113
|
rackup (>= 1.0.0)
|
|
108
114
|
rake (>= 12.2)
|
|
109
115
|
thor (~> 1.0, >= 1.2.2)
|
|
116
|
+
tsort (>= 0.2)
|
|
110
117
|
zeitwerk (~> 2.6)
|
|
111
118
|
rainbow (3.1.1)
|
|
112
|
-
rake (13.
|
|
113
|
-
rdoc (6.
|
|
119
|
+
rake (13.3.1)
|
|
120
|
+
rdoc (6.15.1)
|
|
121
|
+
erb
|
|
114
122
|
psych (>= 4.0.0)
|
|
115
|
-
|
|
116
|
-
|
|
123
|
+
tsort
|
|
124
|
+
regexp_parser (2.11.3)
|
|
125
|
+
reline (0.6.3)
|
|
117
126
|
io-console (~> 0.5)
|
|
118
|
-
rspec (3.13.
|
|
127
|
+
rspec (3.13.2)
|
|
119
128
|
rspec-core (~> 3.13.0)
|
|
120
129
|
rspec-expectations (~> 3.13.0)
|
|
121
130
|
rspec-mocks (~> 3.13.0)
|
|
122
|
-
rspec-core (3.13.
|
|
131
|
+
rspec-core (3.13.6)
|
|
123
132
|
rspec-support (~> 3.13.0)
|
|
124
|
-
rspec-expectations (3.13.
|
|
133
|
+
rspec-expectations (3.13.5)
|
|
125
134
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
126
135
|
rspec-support (~> 3.13.0)
|
|
127
|
-
rspec-mocks (3.13.
|
|
136
|
+
rspec-mocks (3.13.7)
|
|
128
137
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
129
138
|
rspec-support (~> 3.13.0)
|
|
130
|
-
rspec-rails (
|
|
131
|
-
actionpack (>= 7.
|
|
132
|
-
activesupport (>= 7.
|
|
133
|
-
railties (>= 7.
|
|
139
|
+
rspec-rails (8.0.2)
|
|
140
|
+
actionpack (>= 7.2)
|
|
141
|
+
activesupport (>= 7.2)
|
|
142
|
+
railties (>= 7.2)
|
|
134
143
|
rspec-core (~> 3.13)
|
|
135
144
|
rspec-expectations (~> 3.13)
|
|
136
145
|
rspec-mocks (~> 3.13)
|
|
137
146
|
rspec-support (~> 3.13)
|
|
138
|
-
rspec-support (3.13.
|
|
139
|
-
rubocop (1.
|
|
147
|
+
rspec-support (3.13.6)
|
|
148
|
+
rubocop (1.80.2)
|
|
140
149
|
json (~> 2.3)
|
|
141
|
-
language_server-protocol (
|
|
150
|
+
language_server-protocol (~> 3.17.0.2)
|
|
151
|
+
lint_roller (~> 1.1.0)
|
|
142
152
|
parallel (~> 1.10)
|
|
143
153
|
parser (>= 3.3.0.2)
|
|
144
154
|
rainbow (>= 2.2.2, < 4.0)
|
|
145
155
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
146
|
-
rubocop-ast (>= 1.
|
|
156
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
|
147
157
|
ruby-progressbar (~> 1.7)
|
|
148
158
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
149
|
-
rubocop-ast (1.
|
|
150
|
-
parser (>= 3.3.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
159
|
+
rubocop-ast (1.48.0)
|
|
160
|
+
parser (>= 3.3.7.2)
|
|
161
|
+
prism (~> 1.4)
|
|
162
|
+
rubocop-performance (1.25.0)
|
|
163
|
+
lint_roller (~> 1.1)
|
|
164
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
165
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
154
166
|
ruby-progressbar (1.13.0)
|
|
155
167
|
securerandom (0.4.1)
|
|
156
|
-
standard (1.
|
|
168
|
+
standard (1.51.1)
|
|
157
169
|
language_server-protocol (~> 3.17.0.2)
|
|
158
170
|
lint_roller (~> 1.0)
|
|
159
|
-
rubocop (~> 1.
|
|
171
|
+
rubocop (~> 1.80.2)
|
|
160
172
|
standard-custom (~> 1.0.0)
|
|
161
|
-
standard-performance (~> 1.
|
|
173
|
+
standard-performance (~> 1.8)
|
|
162
174
|
standard-custom (1.0.2)
|
|
163
175
|
lint_roller (~> 1.0)
|
|
164
176
|
rubocop (~> 1.50)
|
|
165
|
-
standard-performance (1.
|
|
177
|
+
standard-performance (1.8.0)
|
|
166
178
|
lint_roller (~> 1.1)
|
|
167
|
-
rubocop-performance (~> 1.
|
|
168
|
-
stringio (3.1.
|
|
169
|
-
thor (1.
|
|
179
|
+
rubocop-performance (~> 1.25.0)
|
|
180
|
+
stringio (3.1.8)
|
|
181
|
+
thor (1.4.0)
|
|
182
|
+
tsort (0.2.0)
|
|
170
183
|
tzinfo (2.0.6)
|
|
171
184
|
concurrent-ruby (~> 1.0)
|
|
172
|
-
unicode-display_width (3.
|
|
173
|
-
unicode-emoji (~> 4.
|
|
174
|
-
unicode-emoji (4.0
|
|
175
|
-
uri (1.
|
|
185
|
+
unicode-display_width (3.2.0)
|
|
186
|
+
unicode-emoji (~> 4.1)
|
|
187
|
+
unicode-emoji (4.1.0)
|
|
188
|
+
uri (1.1.1)
|
|
176
189
|
useragent (0.16.11)
|
|
177
|
-
zeitwerk (2.7.
|
|
190
|
+
zeitwerk (2.7.3)
|
|
178
191
|
|
|
179
192
|
PLATFORMS
|
|
180
193
|
arm64-darwin-23
|
|
@@ -127,13 +127,13 @@ EOY
|
|
|
127
127
|
<<~README
|
|
128
128
|
1. Remove the `repo_integrity` section of `config/auditree.template.json`
|
|
129
129
|
1. Create a gitlab personal access token with `write_repository` scope to interact with the code repo and evidence locker and set as `AUDITREE_GITLAB_TOKEN` secret within your CI/CD variables.
|
|
130
|
-
#{
|
|
130
|
+
#{"1. Update `.gitlab/auditree.yml` with the locker repository URL" if options[:evidence_locker].blank?}
|
|
131
131
|
README
|
|
132
132
|
elsif file_exists? ".github/workflows"
|
|
133
133
|
<<~README
|
|
134
134
|
1. Update `config/auditree.template.json` with the repo address for your code repos
|
|
135
135
|
1. Create a github personal access token to interact with the code repo and evidence locker and set as `AUDITREE_GITHUB_TOKEN` secret within your Github Actions secrets.
|
|
136
|
-
#{
|
|
136
|
+
#{"1. Update `.github/workflows/rspec.yml` with the locker repository URL" if options[:evidence_locker].blank?}
|
|
137
137
|
README
|
|
138
138
|
else
|
|
139
139
|
""
|
|
@@ -319,8 +319,10 @@ jobs:
|
|
|
319
319
|
CF_USER: "$CF_USERNAME"
|
|
320
320
|
path: terraform
|
|
321
321
|
out: staging.out
|
|
322
|
-
var_file: staging.tfvars
|
|
322
|
+
var_file: staging.env.tfvars
|
|
323
323
|
var: >-
|
|
324
|
+
environment_type="staging",
|
|
325
|
+
environment_slug="staging",
|
|
324
326
|
rails_master_key="$RAILS_MASTER_KEY",
|
|
325
327
|
cf_user="$CF_USERNAME",
|
|
326
328
|
- persist_to_workspace:
|
|
@@ -368,8 +370,10 @@ jobs:
|
|
|
368
370
|
CF_USER: "$CF_USERNAME"
|
|
369
371
|
path: terraform
|
|
370
372
|
out: production.out
|
|
371
|
-
var_file: production.tfvars
|
|
373
|
+
var_file: production.env.tfvars
|
|
372
374
|
var: >-
|
|
375
|
+
environment_type="production",
|
|
376
|
+
environment_slug="production",
|
|
373
377
|
rails_master_key="$PRODUCTION_RAILS_MASTER_KEY",
|
|
374
378
|
cf_user="$CF_USERNAME",
|
|
375
379
|
- persist_to_workspace:
|
|
@@ -2,11 +2,27 @@ version: 2
|
|
|
2
2
|
updates:
|
|
3
3
|
- package-ecosystem: bundler
|
|
4
4
|
directory: "/"
|
|
5
|
+
groups:
|
|
6
|
+
minor-and-patch:
|
|
7
|
+
patterns:
|
|
8
|
+
- "*"
|
|
9
|
+
exclude-patterns:
|
|
10
|
+
- "rails"
|
|
11
|
+
update-types:
|
|
12
|
+
- "minor"
|
|
13
|
+
- "patch"
|
|
5
14
|
schedule:
|
|
6
15
|
interval: daily
|
|
7
16
|
open-pull-requests-limit: 10
|
|
8
17
|
- package-ecosystem: npm
|
|
9
18
|
directory: "/"
|
|
19
|
+
groups:
|
|
20
|
+
minor-and-patch:
|
|
21
|
+
patterns:
|
|
22
|
+
- "*"
|
|
23
|
+
update-types:
|
|
24
|
+
- "minor"
|
|
25
|
+
- "patch"
|
|
10
26
|
schedule:
|
|
11
27
|
interval: daily
|
|
12
28
|
open-pull-requests-limit: 10
|
|
@@ -57,7 +57,10 @@ jobs:
|
|
|
57
57
|
apt-get install -y zip
|
|
58
58
|
with:
|
|
59
59
|
path: terraform
|
|
60
|
-
var_file: terraform/production.tfvars
|
|
60
|
+
var_file: terraform/production.env.tfvars
|
|
61
|
+
variables: |
|
|
62
|
+
environment_type="production"
|
|
63
|
+
environment_slug="production"
|
|
61
64
|
backend_config: >
|
|
62
65
|
access_key=${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
|
|
63
66
|
secret_key=${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
|
data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-staging.yml
CHANGED
|
@@ -57,7 +57,10 @@ jobs:
|
|
|
57
57
|
apt-get install -y zip
|
|
58
58
|
with:
|
|
59
59
|
path: terraform
|
|
60
|
-
var_file: terraform/staging.tfvars
|
|
60
|
+
var_file: terraform/staging.env.tfvars
|
|
61
|
+
variables: |
|
|
62
|
+
environment_type="staging"
|
|
63
|
+
environment_slug="staging"
|
|
61
64
|
backend_config: >
|
|
62
65
|
access_key=${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
|
|
63
66
|
secret_key=${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
|
|
@@ -67,7 +67,10 @@ jobs:
|
|
|
67
67
|
apt-get install -y zip
|
|
68
68
|
with:
|
|
69
69
|
path: terraform
|
|
70
|
-
var_file: terraform/production.tfvars
|
|
70
|
+
var_file: terraform/production.env.tfvars
|
|
71
|
+
variables: |
|
|
72
|
+
environment_type="production"
|
|
73
|
+
environment_slug="production"
|
|
71
74
|
add_github_comment: changes-only
|
|
72
75
|
backend_config: >
|
|
73
76
|
access_key=${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
|
|
@@ -67,7 +67,10 @@ jobs:
|
|
|
67
67
|
apt-get install -y zip
|
|
68
68
|
with:
|
|
69
69
|
path: terraform
|
|
70
|
-
var_file: terraform/staging.tfvars
|
|
70
|
+
var_file: terraform/staging.env.tfvars
|
|
71
|
+
variables: |
|
|
72
|
+
environment_type="staging"
|
|
73
|
+
environment_slug="staging"
|
|
71
74
|
add_github_comment: changes-only
|
|
72
75
|
backend_config: >
|
|
73
76
|
access_key=${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
|
|
@@ -49,7 +49,7 @@ module RailsTemplate18f
|
|
|
49
49
|
def update_boundary_diagram
|
|
50
50
|
boundary_filename = "doc/compliance/apps/application.boundary.md"
|
|
51
51
|
insert_into_file boundary_filename, <<EOB, after: "Boundary(cicd, \"CI/CD Pipeline\") {\n"
|
|
52
|
-
System_Ext(gitlabci, "
|
|
52
|
+
System_Ext(gitlabci, "Cloud.gov Workshop", "GSA-run code repository and Continuous Integration Service")
|
|
53
53
|
EOB
|
|
54
54
|
insert_into_file boundary_filename, <<~EOB, before: "@enduml"
|
|
55
55
|
Rel(developer, gitlabci, "Publish code", "git ssh (22)")
|
|
@@ -76,8 +76,8 @@ EOB
|
|
|
76
76
|
|
|
77
77
|
| Secret Name | Description |
|
|
78
78
|
| ----------- | ----------- |
|
|
79
|
-
| `
|
|
80
|
-
| `CF_PASSWORD` | cloud.gov
|
|
79
|
+
| `CF_USER` | cloud.gov OrgManager username |
|
|
80
|
+
| `CF_PASSWORD` | cloud.gov OrgManager password |
|
|
81
81
|
| `RAILS_MASTER_KEY` | `config/master.key` |
|
|
82
82
|
EOM
|
|
83
83
|
end
|
|
@@ -86,15 +86,15 @@ EOB
|
|
|
86
86
|
if terraform_manage_spaces?
|
|
87
87
|
<<~EOM
|
|
88
88
|
|
|
89
|
-
Deploys to production happen via terraform on every
|
|
89
|
+
Deploys to production happen via terraform on every tag that is added to the `main` branch.
|
|
90
90
|
|
|
91
|
-
The following secrets must be set within the masked and hidden [CI/CD variables](https://docs.gitlab.com/ci/variables/)
|
|
91
|
+
The following secrets must be set within the masked and hidden [CI/CD variables](https://docs.gitlab.com/ci/variables/) and assigned to the `production` environment.
|
|
92
92
|
|
|
93
93
|
| Secret Name | Description |
|
|
94
94
|
| ----------- | ----------- |
|
|
95
|
-
| `
|
|
96
|
-
| `CF_PASSWORD` | cloud.gov
|
|
97
|
-
| `
|
|
95
|
+
| `CF_USER` | cloud.gov OrgManager username |
|
|
96
|
+
| `CF_PASSWORD` | cloud.gov OrgManager password |
|
|
97
|
+
| `RAILS_MASTER_KEY` | `config/credentials/production.key`. Should be marked as `Protected`. |
|
|
98
98
|
EOM
|
|
99
99
|
else
|
|
100
100
|
"Production deploys are not supported in the sandbox organization."
|
|
@@ -105,7 +105,7 @@ EOB
|
|
|
105
105
|
<<~EOM
|
|
106
106
|
|
|
107
107
|
1. Store variables that must be secret using masked and hidden [CI/CD variables](https://docs.gitlab.com/ci/variables/) in GitLab
|
|
108
|
-
1. Add the appropriate
|
|
108
|
+
1. Add the appropriate `TF_VAR_` prefixed variables for the `terraform:plan:<env>` and `terraform:apply:<env>` jobs like the existing `TF_VAR_rails_master_key`
|
|
109
109
|
EOM
|
|
110
110
|
end
|
|
111
111
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.setup-node:
|
|
2
|
-
- curl -fsSL https://deb.nodesource.com/setup_
|
|
2
|
+
- curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR_VERSION}.x" -o nodesource_setup.sh
|
|
3
3
|
- bash nodesource_setup.sh
|
|
4
4
|
- apt-get install -y nodejs
|
|
5
5
|
- npm install --global yarn
|
|
@@ -2,6 +2,13 @@ include:
|
|
|
2
2
|
- local: ".gitlab/ruby.yml"
|
|
3
3
|
- local: ".gitlab/node.yml"
|
|
4
4
|
|
|
5
|
+
.base:
|
|
6
|
+
image: "ruby:${RUBY_VERSION}"
|
|
7
|
+
before_script:
|
|
8
|
+
- !reference [.setup-ruby]
|
|
9
|
+
cache:
|
|
10
|
+
- !reference [.cache-dependencies, cache]
|
|
11
|
+
|
|
5
12
|
# Cache Helpers
|
|
6
13
|
.cache-dependencies:
|
|
7
14
|
variables:
|
|
@@ -15,27 +22,28 @@ include:
|
|
|
15
22
|
paths:
|
|
16
23
|
- vendor/ruby
|
|
17
24
|
- node_modules/
|
|
18
|
-
policy: pull
|
|
19
25
|
|
|
20
26
|
# Language Helpers
|
|
21
27
|
.setup-languages:
|
|
28
|
+
extends: .base
|
|
22
29
|
before_script:
|
|
23
30
|
- !reference [.setup-ruby]
|
|
24
31
|
- !reference [.setup-node]
|
|
25
32
|
|
|
26
33
|
# Project Helpers
|
|
27
34
|
.setup-project:
|
|
35
|
+
extends: .base
|
|
28
36
|
services:
|
|
29
37
|
- name: "postgres:${POSTGRES_VERSION}"
|
|
30
38
|
alias: pg
|
|
39
|
+
variables:
|
|
40
|
+
DATABASE_URL: "postgres://postgres:${POSTGRES_PASSWORD}@${WSR_SERVICE_HOST_pg}:5432/${POSTGRES_DB}"
|
|
31
41
|
before_script:
|
|
32
42
|
- !reference [.setup-ruby]
|
|
33
|
-
- export DATABASE_URL="postgres://postgres:${POSTGRES_PASSWORD}@${WSR_SERVICE_HOST_pg}:5432/${POSTGRES_DB}"
|
|
34
43
|
- bin/rails db:prepare
|
|
35
44
|
|
|
36
45
|
.run-server:
|
|
37
46
|
extends: .setup-project
|
|
38
|
-
dependencies: []
|
|
39
47
|
variables:
|
|
40
48
|
RAILS_ENV: ci
|
|
41
49
|
SECRET_KEY_BASE_DUMMY: 1
|
|
@@ -46,21 +54,6 @@ include:
|
|
|
46
54
|
- PORT=3000 bin/rails server > /dev/null 2>&1 &
|
|
47
55
|
- sleep 5
|
|
48
56
|
|
|
49
|
-
.owasp:setup:
|
|
50
|
-
stage: scan
|
|
51
|
-
extends: .run-server
|
|
52
|
-
image: "rcahearngsa/owasp-ruby:${RUBY_VERSION}"
|
|
53
|
-
variables:
|
|
54
|
-
WORKER_MEMORY: 3G
|
|
55
|
-
WORKER_DISK: 6G
|
|
56
|
-
before_script:
|
|
57
|
-
- !reference [.run-server, before_script]
|
|
58
|
-
- ln -s $PWD /zap/wrk
|
|
59
|
-
artifacts:
|
|
60
|
-
expose_as: "OWASP Report"
|
|
61
|
-
paths:
|
|
62
|
-
- zap_report.html
|
|
63
|
-
|
|
64
57
|
.assets:builder:
|
|
65
58
|
stage: deploy
|
|
66
59
|
extends: .setup-languages
|