dvla-application_helper 5.1.5

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 (101) hide show
  1. checksums.yaml +7 -0
  2. data/.drone.yml +481 -0
  3. data/.env.template +4 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +21 -0
  6. data/.ruby-gemset +1 -0
  7. data/.ruby-version +1 -0
  8. data/README.md +674 -0
  9. data/Rakefile +31 -0
  10. data/config/settings/drone-dev.yml +41 -0
  11. data/config/settings/drone-ext.yml +35 -0
  12. data/config/settings/drone-link.yml +35 -0
  13. data/config/settings/drone-perf.yml +35 -0
  14. data/config/settings/local-dev.yml +40 -0
  15. data/config/settings/local-ext.yml +35 -0
  16. data/config/settings/local-link.yml +35 -0
  17. data/config/settings/local-perf.yml +35 -0
  18. data/config/settings.yml +29 -0
  19. data/config/yarp.yml +6 -0
  20. data/functional-tests/Rakefile +74 -0
  21. data/functional-tests/chutney.yml +110 -0
  22. data/functional-tests/features/codl.feature +170 -0
  23. data/functional-tests/features/codl_image_review_states.feature +140 -0
  24. data/functional-tests/features/csudl.feature +54 -0
  25. data/functional-tests/features/csudl_image_review_states.feature +20 -0
  26. data/functional-tests/features/step_definitions/app_domain_steps.rb +213 -0
  27. data/functional-tests/features/step_definitions/application_creation_steps.rb +115 -0
  28. data/functional-tests/features/step_definitions/image_steps.rb +144 -0
  29. data/functional-tests/features/step_definitions/state_machine_steps.rb +43 -0
  30. data/functional-tests/features/support/data/artefacts.rb +27 -0
  31. data/functional-tests/features/support/data/image_helpers.rb +20 -0
  32. data/functional-tests/features/support/data/schema_helpers.rb +3 -0
  33. data/functional-tests/features/support/data/string_manipulation.rb +9 -0
  34. data/functional-tests/features/support/env.rb +25 -0
  35. data/functional-tests/features/support/hooks.rb +56 -0
  36. data/functional-tests/features/support/yarp_integration/yarp_helpers.rb +23 -0
  37. data/functional-tests/features/uodl_image_review_states.feature +244 -0
  38. data/functional-tests/features/uodl_non_processable.feature +441 -0
  39. data/functional-tests/features/uodl_processable.feature +416 -0
  40. data/lib/dvla/application_helper/builders/V1/application_builder.rb +298 -0
  41. data/lib/dvla/application_helper/builders/V1/codl_application_builder.rb +205 -0
  42. data/lib/dvla/application_helper/builders/V1/csudl_application_builder.rb +329 -0
  43. data/lib/dvla/application_helper/builders/V2/base_uodl_v2_application_builder.rb +357 -0
  44. data/lib/dvla/application_helper/builders/V2/cop_v2_application_builder.rb +59 -0
  45. data/lib/dvla/application_helper/builders/V2/dup_v2_application_builder.rb +84 -0
  46. data/lib/dvla/application_helper/builders/V2/exc_v2_application_builder.rb +55 -0
  47. data/lib/dvla/application_helper/builders/V2/rep_v2_application_builder.rb +84 -0
  48. data/lib/dvla/application_helper/builders/V2/tyr_v2_application_builder.rb +62 -0
  49. data/lib/dvla/application_helper/builders/V2/uodl_v2_application_builder.rb +278 -0
  50. data/lib/dvla/application_helper/builders/V3/base_uodl_v3_application_builder.rb +342 -0
  51. data/lib/dvla/application_helper/builders/V3/cop_v3_application_builder.rb +56 -0
  52. data/lib/dvla/application_helper/builders/V3/dup_v3_application_builder.rb +78 -0
  53. data/lib/dvla/application_helper/builders/V3/exc_v3_application_builder.rb +56 -0
  54. data/lib/dvla/application_helper/builders/V3/rep_v3_application_builder.rb +81 -0
  55. data/lib/dvla/application_helper/builders/V3/tyr_v3_application_builder.rb +59 -0
  56. data/lib/dvla/application_helper/builders/dup_rep_builder_mixin.rb +71 -0
  57. data/lib/dvla/application_helper/builders/photo_builder_mixin.rb +49 -0
  58. data/lib/dvla/application_helper/builders/photo_signature_builder_mixin.rb +68 -0
  59. data/lib/dvla/application_helper/configuration.rb +37 -0
  60. data/lib/dvla/application_helper/constants.rb +21 -0
  61. data/lib/dvla/application_helper/enums/review_state.rb +30 -0
  62. data/lib/dvla/application_helper/enums/unable_to_prove_licence_possession_reasons.rb +8 -0
  63. data/lib/dvla/application_helper/factories/address.rb +21 -0
  64. data/lib/dvla/application_helper/factories/application_details.rb +353 -0
  65. data/lib/dvla/application_helper/factories/casework.rb +7 -0
  66. data/lib/dvla/application_helper/factories/csudl_photo_signature_image.rb +156 -0
  67. data/lib/dvla/application_helper/factories/csudl_photo_signature_images.rb +85 -0
  68. data/lib/dvla/application_helper/factories/organ_donor.rb +32 -0
  69. data/lib/dvla/application_helper/factories/person.rb +73 -0
  70. data/lib/dvla/application_helper/factories/photo_image.rb +147 -0
  71. data/lib/dvla/application_helper/factories/photo_images.rb +183 -0
  72. data/lib/dvla/application_helper/factories/photo_signature_image.rb +158 -0
  73. data/lib/dvla/application_helper/factories/photo_signature_images.rb +64 -0
  74. data/lib/dvla/application_helper/fixtures/photo/comparison_image.jpeg +0 -0
  75. data/lib/dvla/application_helper/fixtures/photo/passport_image.jpg +0 -0
  76. data/lib/dvla/application_helper/fixtures/photo/photocard_back.jpg +0 -0
  77. data/lib/dvla/application_helper/fixtures/photo/photocard_front.jpg +0 -0
  78. data/lib/dvla/application_helper/fixtures/photo/rejected_user_uploaded_image.jpeg +0 -0
  79. data/lib/dvla/application_helper/fixtures/photo/user_uploaded_image.jpg +0 -0
  80. data/lib/dvla/application_helper/fixtures/signature/csudl_signature_image.tiff +0 -0
  81. data/lib/dvla/application_helper/fixtures/signature/passport_image.jpg +0 -0
  82. data/lib/dvla/application_helper/fixtures/signature/rejected_user_uploaded_image.jpg +0 -0
  83. data/lib/dvla/application_helper/fixtures/signature/user_uploaded_image.jpg +0 -0
  84. data/lib/dvla/application_helper/processors/application_status.rb +45 -0
  85. data/lib/dvla/application_helper/processors/application_task.rb +301 -0
  86. data/lib/dvla/application_helper/services/application_diary.rb +123 -0
  87. data/lib/dvla/application_helper/services/application_domain.rb +239 -0
  88. data/lib/dvla/application_helper/services/application_process_engine.rb +120 -0
  89. data/lib/dvla/application_helper/services/check_aws_credentials.rb +24 -0
  90. data/lib/dvla/application_helper/services/driving_licence_channel_api.rb +67 -0
  91. data/lib/dvla/application_helper/services/image_service.rb +116 -0
  92. data/lib/dvla/application_helper/services/image_utility.rb +82 -0
  93. data/lib/dvla/application_helper/services/state_machine_helpers.rb +146 -0
  94. data/lib/dvla/application_helper/version.rb +5 -0
  95. data/lib/dvla/application_helper.rb +92 -0
  96. data/renovate.json +4 -0
  97. data/scripts/application-login.sh +56 -0
  98. data/scripts/drone-aws-login.sh +18 -0
  99. data/scripts/seed_application.rb +268 -0
  100. data/sonar-project.properties +4 -0
  101. metadata +343 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8129b3e7023333aed36663f033ac2e5932c2e007aaf04d48070970a380aea335
4
+ data.tar.gz: cbaee7846b44fbc4b57e48d60ac492776a184a78aac6474af4093265ea9ef73c
5
+ SHA512:
6
+ metadata.gz: 115af348d6e33731c821c66d2c8f0956f1cd859cd5bcd52902c8b41d6b13de0b927153e0603b508a79107836aaa2e76186e29718ff969786ccf33a511d0ae4fa
7
+ data.tar.gz: 7d363f81b6f0cad2dff3475abc56a8caf7d2a552cb7fcaca7186c33ff4f37aae118329c399a292d72a559e10df7019843707bce5e4d1d5c2541b13c3d89d35d3
data/.drone.yml ADDED
@@ -0,0 +1,481 @@
1
+ ---
2
+ ###################################################################
3
+ # #
4
+ # Verify functional tests #
5
+ # #
6
+ ###################################################################
7
+ kind: pipeline
8
+ type: docker
9
+ name: Verify functional tests
10
+
11
+ platform:
12
+ os: linux
13
+ arch: amd64
14
+
15
+ # default settings for each verify step, we override in each step to run each part separately for better reporting
16
+ verify_settings: &verify_settings
17
+ lint_css: false
18
+ lint_js: false
19
+ unit_js: false
20
+ lint_ruby_functional_tests: false
21
+ lint_ruby: false
22
+ lint_gherkin: false
23
+ unit_ruby: false
24
+ run_brakeman: false
25
+ lint_bundler_audit: false
26
+ lint_undefined_step_defs: false
27
+ lint_unused_step_defs: false
28
+ lint_step_defs: false
29
+ verbose: true
30
+
31
+ drone_cache_settings: &drone_cache_settings
32
+ bucket: dvla-drone1-cache-714782054810
33
+ region: eu-west-2
34
+ encryption: AES256
35
+ endpoint: https://s3.eu-west-2.amazonaws.com
36
+ cache_key: '{{ checksum "Gemfile.lock" }}'
37
+
38
+ cache_mount: &cache_mount
39
+ mount:
40
+ - "vendor/bundle"
41
+
42
+ depends_on_cache_steps: &depends_on_cache_steps
43
+ depends_on:
44
+ - rebuild-gem-cache
45
+
46
+ verify_qe_image: &verify_qe_image
47
+ pull: if-not-exists
48
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/utilities-ci-tools/ci-verify-qe:latest
49
+
50
+ cache_image: &cache_image
51
+ pull: if-not-exists
52
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/ce/drone-cache
53
+
54
+ steps:
55
+ - name: restore-gem-cache
56
+ <<: *cache_image
57
+ settings:
58
+ <<: *drone_cache_settings
59
+ restore: true
60
+ <<: [ *cache_mount, *drone_cache_settings ]
61
+
62
+ - name: install-gems
63
+ depends_on: [ restore-gem-cache ]
64
+ <<: *verify_qe_image
65
+ commands:
66
+ - bundle install
67
+ environment:
68
+ BUNDLE_PATH: vendor/bundle
69
+ when:
70
+ event:
71
+ - push
72
+
73
+ - name: bundle_outdated
74
+ failure: ignore
75
+ <<: *verify_qe_image
76
+ depends_on:
77
+ - install-gems
78
+ commands:
79
+ - bundle outdated
80
+ environment:
81
+ BUNDLE_PATH: vendor/bundle
82
+
83
+ - name: rebuild-gem-cache
84
+ depends_on: [ install-gems ]
85
+ <<: *cache_image
86
+ settings:
87
+ <<: *drone_cache_settings
88
+ exit_code: true
89
+ <<: *cache_mount
90
+ rebuild: true
91
+ when:
92
+ event:
93
+ - push
94
+
95
+ - name: Gem audit
96
+ <<: [ *depends_on_cache_steps, *verify_qe_image ]
97
+ commands:
98
+ - bundle install
99
+ - bundle exec bundle-audit
100
+ when:
101
+ event:
102
+ - push
103
+ - cron
104
+ environment:
105
+ BUNDLE_PATH: vendor/bundle
106
+
107
+ - name: lint - ruby
108
+ <<: [ *depends_on_cache_steps, *verify_qe_image ]
109
+ environment:
110
+ BUNDLE_PATH: vendor/bundle
111
+ settings:
112
+ <<: *verify_settings
113
+ lint_ruby_functional_tests: true
114
+
115
+ - name: lint - chutney
116
+ <<: [ *depends_on_cache_steps, *verify_qe_image ]
117
+ environment:
118
+ BUNDLE_PATH: vendor/bundle
119
+ settings:
120
+ <<: *verify_settings
121
+ lint_gherkin: true
122
+
123
+ - name: lint - step defs
124
+ <<: [ *depends_on_cache_steps, *verify_qe_image ]
125
+ environment:
126
+ BUNDLE_PATH: vendor/bundle
127
+ settings:
128
+ <<: *verify_settings
129
+ lint_undefined_step_defs: true
130
+ lint_unused_step_defs: true
131
+ lint_step_defs: true
132
+
133
+ load: ''
134
+ trigger:
135
+ event:
136
+ - push
137
+
138
+ ---
139
+ ###################################################################
140
+ # #
141
+ # Feature CI #
142
+ # #
143
+ ###################################################################
144
+ kind: pipeline
145
+ name: default
146
+ type: docker
147
+
148
+ anchors:
149
+ drone_cache_settings: &drone_cache_settings
150
+ bucket: dvla-drone1-cache-714782054810
151
+ region: eu-west-2
152
+ encryption: AES256
153
+ endpoint: https://s3.eu-west-2.amazonaws.com
154
+ cache_key: '{{ checksum "Gemfile.lock" }}'
155
+
156
+ bundle_volumes: &bundle_volumes
157
+ volumes:
158
+ - name: bundle
159
+ path: /usr/local/bundle
160
+
161
+ depends_on_cache_steps: &depends_on_cache_steps
162
+ depends_on:
163
+ - rebuild-gem-cache
164
+
165
+ ruby_image: &ruby_image
166
+ pull: if-not-exists
167
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/base-images/qe-ruby:3.4
168
+
169
+ cache_image: &cache_image
170
+ pull: if-not-exists
171
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/ce/drone-cache
172
+
173
+ depends_on_test_lint: &depends_on_test_lint
174
+ depends_on:
175
+ - unit test
176
+
177
+ depends_on_sonar: &depends_on_sonar
178
+ depends_on:
179
+ - SonarQube
180
+
181
+ # Account secrets
182
+ application_secrets: &application_secrets
183
+ AWS_ACCOUNT_ID:
184
+ from_secret: dev_orgs_account_id
185
+
186
+ # Yarp configuration
187
+ yarp_config: &yarp_config
188
+ YARP_ENDPOINT: https://yarp.prod.tooling.dvla.gov.uk/
189
+ YARP_API_KEY:
190
+ from_secret: YARP_api_key
191
+ YARP_BUILD_NUMBER: ${DRONE_BUILD_NUMBER}
192
+ YARP_ERROR_LIMIT: 5
193
+ YARP_ENABLED: true
194
+
195
+ common_commands:
196
+ - &assume_drone_serverless_test_role aws sts assume-role --role-arn arn:aws:iam::$AWS_ACCOUNT_ID:role/platform/drone-serverless-test-role --role-session-name drone-serverless-sts > /tmp/creds.txt;
197
+ export AWS_SECRET_ACCESS_KEY=$(jq -r '.Credentials.SecretAccessKey' /tmp/creds.txt);
198
+ export AWS_ACCESS_KEY_ID=$(jq -r '.Credentials.AccessKeyId' /tmp/creds.txt);
199
+ export AWS_SESSION_TOKEN=$(jq -r '.Credentials.SessionToken' /tmp/creds.txt);
200
+ export AWS_DEFAULT_REGION=eu-west-2
201
+
202
+ # Functional test configuration
203
+ functional_test_common_setup: &functional_test_common_setup
204
+ depends_on:
205
+ - install-gems
206
+ commands:
207
+ - *assume_drone_serverless_test_role
208
+ - cd functional-tests || exit 1
209
+ - bundle exec rake test:functional\["$CUCUMBER_FILTER","$THREADS"\]
210
+ environment:
211
+ <<: *application_secrets
212
+ <<: *yarp_config
213
+ ENVIRONMENT: drone-dev
214
+ BUNDLE_PATH: vendor/bundle
215
+ THREADS:
216
+ from_secret: TEST_THREADS
217
+
218
+ steps:
219
+ - name: secret scan
220
+ image: ecr.tooling.dvla.gov.uk/utilities-ci-tools/ci-secret-scan
221
+ settings:
222
+ max_depth: 1
223
+
224
+ - name: restore-gem-cache
225
+ depends_on: [secret scan]
226
+ <<: *cache_image
227
+ settings:
228
+ <<: *drone_cache_settings
229
+ restore: true
230
+ <<: *bundle_volumes
231
+
232
+ - name: install-gems
233
+ depends_on: [restore-gem-cache]
234
+ <<: *ruby_image
235
+ commands:
236
+ - bundle install
237
+ environment:
238
+ BUNDLE_PATH: vendor/bundle
239
+ when:
240
+ event:
241
+ - push
242
+
243
+ - name: rebuild-gem-cache
244
+ depends_on: [install-gems]
245
+ <<: *cache_image
246
+ settings:
247
+ <<: *drone_cache_settings
248
+ exit_code: true
249
+ <<: *bundle_volumes
250
+ rebuild: true
251
+ when:
252
+ event:
253
+ - push
254
+
255
+ - name: unit test
256
+ <<: [*depends_on_cache_steps, *ruby_image]
257
+ commands:
258
+ - export 'AWS_REGION'='eu-west'
259
+ - bundle exec rspec
260
+ environment:
261
+ BUNDLE_PATH: vendor/bundle
262
+ RAILS_ENV: test
263
+
264
+ - name: SonarQube
265
+ <<: [*depends_on_test_lint]
266
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/utilities-ci-tools/ci-drone-sonar-scanner
267
+ when:
268
+ event:
269
+ - push
270
+
271
+ - name: UODL Processable - Functional Tests
272
+ <<: *ruby_image
273
+ <<: *bundle_volumes
274
+ <<: *functional_test_common_setup
275
+ environment:
276
+ CUCUMBER_FILTER: features/\uodl_processable.feature
277
+ YARP_LAUNCH: DVLA Application Helper UODL Processable Functional Tests
278
+
279
+ - name: UODL NON-Processable - Functional Tests
280
+ <<: *ruby_image
281
+ <<: *bundle_volumes
282
+ <<: *functional_test_common_setup
283
+ environment:
284
+ CUCUMBER_FILTER: features/\uodl_non_processable.feature
285
+ YARP_LAUNCH: DVLA Application Helper UODL NON-Processable Functional Tests
286
+
287
+ - name: UODL Image Review - Functional Tests
288
+ <<: *ruby_image
289
+ <<: *bundle_volumes
290
+ <<: *functional_test_common_setup
291
+ environment:
292
+ CUCUMBER_FILTER: features/\uodl_image_review_states.feature
293
+ YARP_LAUNCH: DVLA Application Helper UODL Image Review Functional Tests
294
+
295
+ - name: CODL - Functional Tests (WIP)
296
+ <<: *ruby_image
297
+ <<: *bundle_volumes
298
+ <<: *functional_test_common_setup
299
+ environment:
300
+ CUCUMBER_FILTER: features/\codl.feature
301
+ YARP_LAUNCH: DVLA Application Helper CODL Functional Tests
302
+
303
+ - name: CODL Image Review - Functional Tests
304
+ <<: *ruby_image
305
+ <<: *bundle_volumes
306
+ <<: *functional_test_common_setup
307
+ environment:
308
+ CUCUMBER_FILTER: features/\codl_image_review_states.feature
309
+ YARP_LAUNCH: DVLA Application Helper CODL Image Review Functional Tests
310
+
311
+ - name: CSUDL - Functional Tests (WIP)
312
+ <<: *ruby_image
313
+ <<: *bundle_volumes
314
+ <<: *functional_test_common_setup
315
+ environment:
316
+ CUCUMBER_FILTER: features/\csudl.feature
317
+ YARP_LAUNCH: DVLA Application Helper CSUDL Functional Tests
318
+
319
+ - name: CSUDL Image Review - Functional Tests
320
+ <<: *ruby_image
321
+ <<: *bundle_volumes
322
+ <<: *functional_test_common_setup
323
+ environment:
324
+ CUCUMBER_FILTER: features/\csudl_image_review_states.feature
325
+ YARP_LAUNCH: DVLA Application Helper CSUDL Image Review Functional Tests
326
+
327
+
328
+ - name: gem release dry run
329
+ <<: [*depends_on_sonar]
330
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/utilities-ci-tools/ci-qe-deploy-gem:latest
331
+ commands:
332
+ - git fetch origin main
333
+ - app
334
+ environment:
335
+ DRYRUN: true
336
+ VERBOSE: true
337
+ when:
338
+ branch:
339
+ exclude:
340
+ - main
341
+
342
+ - name: gem release
343
+ <<: [*depends_on_sonar]
344
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/utilities-ci-tools/ci-qe-deploy-gem:latest
345
+ commands:
346
+ - git fetch origin main
347
+ - app
348
+ environment:
349
+ DRYRUN: false
350
+ VERBOSE: true
351
+ GEM_HOST_API_KEY:
352
+ from_secret: gemstash_key
353
+ when:
354
+ event:
355
+ - push
356
+ branch:
357
+ - main
358
+
359
+ depends_on:
360
+ - Verify functional tests
361
+
362
+ trigger:
363
+ event:
364
+ - push
365
+ - cron
366
+ load: ''
367
+
368
+ ---
369
+ ###################################################################
370
+ # #
371
+ # Notify #
372
+ # #
373
+ ###################################################################
374
+ kind: pipeline
375
+ name: notify
376
+ type: docker
377
+ depends_on: ['default']
378
+
379
+ steps:
380
+ - name: report
381
+ image: ecr.tooling.dvla.gov.uk/utilities-ci-tools/ci-notifier:latest
382
+
383
+ settings:
384
+ webhook:
385
+ from_secret: teams_webhook
386
+ content:
387
+ title: ${DRONE_REPO} drone build failure
388
+ text: |+
389
+ Build ${DRONE_BUILD_NUMBER} fail.
390
+
391
+ Branch: ${DRONE_COMMIT_BRANCH}
392
+
393
+ Commit message: ${DRONE_COMMIT_MESSAGE}.
394
+
395
+ Author: ${DRONE_COMMIT_AUTHOR}
396
+
397
+ themeColor: "EA4300"
398
+
399
+ trigger:
400
+ status:
401
+ - failure
402
+ branch:
403
+ - main
404
+ event:
405
+ - push
406
+ - cron
407
+ - tag
408
+
409
+ ---
410
+ ###################################################################
411
+ # #
412
+ # Seed Application #
413
+ # #
414
+ ###################################################################
415
+ kind: pipeline
416
+ type: docker
417
+ name: seed application
418
+
419
+ anchors:
420
+ drone_cache_settings: &drone_cache_settings
421
+ bucket: dvla-drone1-cache-714782054810
422
+ region: eu-west-2
423
+ encryption: AES256
424
+ endpoint: https://s3.eu-west-2.amazonaws.com
425
+ cache_key: '{{ checksum "Gemfile.lock" }}'
426
+
427
+ cache_mount: &cache_mount
428
+ mount:
429
+ - "vendor/bundle"
430
+
431
+ ruby_image: &ruby_image
432
+ pull: if-not-exists
433
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/base-images/qe-ruby:3.4
434
+
435
+ cache_image: &cache_image
436
+ pull: if-not-exists
437
+ image: 448934085854.dkr.ecr.eu-west-2.amazonaws.com/ce/drone-cache
438
+
439
+ steps:
440
+ - name: restore-gem-cache
441
+ <<: *cache_image
442
+ settings:
443
+ <<: *drone_cache_settings
444
+ restore: true
445
+ <<: *cache_mount
446
+
447
+ - name: install-gems
448
+ depends_on: [restore-gem-cache]
449
+ <<: *ruby_image
450
+ commands:
451
+ - bundle install --full-index
452
+ environment:
453
+ BUNDLE_PATH: vendor/bundle
454
+
455
+ - name: rebuild-gem-cache
456
+ depends_on: [install-gems]
457
+ <<: *cache_image
458
+ settings:
459
+ <<: *drone_cache_settings
460
+ exit_code: true
461
+ <<: *cache_mount
462
+ rebuild: true
463
+
464
+ - name: seed application
465
+ depends_on: [rebuild-gem-cache]
466
+ <<: [*ruby_image]
467
+ commands:
468
+ - source ./scripts/drone-aws-login.sh
469
+ - bundle exec rake seed_app:drone
470
+ environment:
471
+ BUNDLE_PATH: vendor/bundle
472
+ DRIVER_DATA_LOADER__API_KEY:
473
+ from_secret: DRIVER_DATA_LOADER__API_KEY
474
+ DRIVER_DATA_LOADER_LINK__API_KEY:
475
+ from_secret: DRIVER_DATA_LOADER_LINK__API_KEY
476
+
477
+ trigger:
478
+ event:
479
+ - promote
480
+ target:
481
+ - seed
data/.env.template ADDED
@@ -0,0 +1,4 @@
1
+ export AWS_ACCESS_KEY_ID=
2
+ export AWS_SECRET_ACCESS_KEY=
3
+ export AWS_SESSION_TOKEN=
4
+ export AWS_REGION=eu-west-2
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,21 @@
1
+ ---
2
+ inherit_gem:
3
+ dvla-lint: '.rubocop.yml'
4
+
5
+ Metrics/BlockLength:
6
+ Enabled: false
7
+
8
+ Style/MixinUsage:
9
+ Enabled: false
10
+
11
+ Style/MultilineBlockChain:
12
+ Enabled: false
13
+
14
+ Layout/LineLength:
15
+ Max: 200
16
+
17
+ AllCops:
18
+ NewCops: enable
19
+ Exclude:
20
+ - 'Gemfile.lock'
21
+ - 'vendor/**/*'
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ dvla-application-helper
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.3