@govuk-pay/cli 0.0.55 → 0.0.56

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 (72) hide show
  1. package/package.json +1 -1
  2. package/resources/legacy-ruby-cli/README.md +5 -74
  3. package/resources/legacy-ruby-cli/lib/pay_cli/commands/doctor.rb +0 -85
  4. package/resources/legacy-ruby-cli/lib/pay_cli/config.rb +1 -23
  5. package/resources/legacy-ruby-cli/lib/pay_cli/entry_point.rb +4 -21
  6. package/resources/legacy-ruby-cli/.rspec +0 -1
  7. package/resources/legacy-ruby-cli/config/generate-secrets.yml +0 -9
  8. package/resources/legacy-ruby-cli/config/secrets.yml +0 -682
  9. package/resources/legacy-ruby-cli/config/service_secrets.yml +0 -203
  10. package/resources/legacy-ruby-cli/lib/pay_cli/aws/services.rb +0 -47
  11. package/resources/legacy-ruby-cli/lib/pay_cli/commands/aws.rb +0 -29
  12. package/resources/legacy-ruby-cli/lib/pay_cli/commands/browse.rb +0 -31
  13. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/app_client.rb +0 -216
  14. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/config.rb +0 -142
  15. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/config.yaml +0 -198
  16. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/docker.rb +0 -66
  17. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/all.yaml +0 -847
  18. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/card.yaml +0 -491
  19. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/custom.yaml +0 -71
  20. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/docker-compose.erb +0 -395
  21. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/end-to-end.erb +0 -30
  22. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/java.yaml +0 -456
  23. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/localstack/init-aws.sh +0 -70
  24. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/naxsi/readme.md +0 -1
  25. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/postgres/docker-entrypoint-initdb.d/make_payments_databases.sql +0 -26
  26. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/adminusers.env +0 -49
  27. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/cardid.env +0 -2
  28. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/connector.env +0 -70
  29. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/demo-service.env +0 -10
  30. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/egress/squid.conf +0 -47
  31. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/frontend.env +0 -12
  32. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/java_app.env +0 -1
  33. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ledger.env +0 -7
  34. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/products-ui.env +0 -14
  35. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/products.env +0 -25
  36. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/publicapi.env +0 -13
  37. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/publicauth.env +0 -13
  38. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/selfservice.env +0 -21
  39. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/certs/frontend-proxy.crt +0 -18
  40. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/certs/products-ui-proxy.crt +0 -20
  41. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/certs/publicapi-proxy.crt +0 -18
  42. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/certs/selfservice-proxy.crt +0 -20
  43. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/certs/stubs-proxy.crt +0 -18
  44. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/keys/frontend-proxy.key +0 -28
  45. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/keys/products-ui-proxy.key +0 -28
  46. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/keys/publicapi-proxy.key +0 -28
  47. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/keys/selfservice-proxy.key +0 -28
  48. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/keys/stubs-proxy.key +0 -28
  49. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/ssl/make-selfsigned.sh +0 -2
  50. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/stubs.env +0 -12
  51. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/toolbox.env +0 -5
  52. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/services/webhooks.env +0 -9
  53. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/files/toolbox.yaml +0 -473
  54. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local/image_extractor.rb +0 -20
  55. package/resources/legacy-ruby-cli/lib/pay_cli/commands/local.rb +0 -451
  56. package/resources/legacy-ruby-cli/lib/pay_cli/commands/secrets.rb +0 -114
  57. package/resources/legacy-ruby-cli/lib/pay_cli/commands/tunnel/services.yml +0 -49
  58. package/resources/legacy-ruby-cli/lib/pay_cli/naming.rb +0 -6
  59. package/resources/legacy-ruby-cli/lib/pay_cli/secrets.rb +0 -281
  60. package/resources/legacy-ruby-cli/package-lock.json +0 -6
  61. package/resources/legacy-ruby-cli/rds_access/connect.sh +0 -175
  62. package/resources/legacy-ruby-cli/spec/.rubocop.yml +0 -2
  63. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.complex +0 -34
  64. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.complex_differing_froms +0 -33
  65. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.no_from +0 -3
  66. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.simple +0 -5
  67. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.simple_no_tag +0 -5
  68. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.with_sha +0 -5
  69. package/resources/legacy-ruby-cli/spec/fixtures/dockerfile_examples/Dockerfile.with_sha_no_tag +0 -5
  70. package/resources/legacy-ruby-cli/spec/lib/pay_cli/commands/local/image_extractor_spec.rb +0 -55
  71. package/resources/legacy-ruby-cli/spec/naming_spec.rb +0 -19
  72. package/resources/legacy-ruby-cli/spec/spec_helper.rb +0 -106
@@ -1,473 +0,0 @@
1
- version: '2.1'
2
-
3
- services:
4
-
5
- adminusers_db:
6
- image: postgres:11.1
7
- environment:
8
- - POSTGRES_PASSWORD=mysecretpassword
9
- mem_limit: 250M
10
- logging:
11
- driver: "json-file"
12
- container_name: adminusers_db
13
- healthcheck:
14
- test: ["CMD-SHELL", "pg_isready"]
15
- interval: 10s
16
- timeout: 5s
17
- retries: 5
18
- volumes:
19
- - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
20
- ports:
21
- - "19700:5432"
22
-
23
- connector_db:
24
- image: postgres:11.1
25
- environment:
26
- - POSTGRES_PASSWORD=mysecretpassword
27
- mem_limit: 250M
28
- logging:
29
- driver: "json-file"
30
- container_name: connector_db
31
- healthcheck:
32
- test: ["CMD-SHELL", "pg_isready"]
33
- interval: 10s
34
- timeout: 5s
35
- retries: 5
36
- volumes:
37
- - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
38
- ports:
39
- - "19300:5432"
40
-
41
- publicauth_db:
42
- image: postgres:11.1
43
- environment:
44
- - POSTGRES_PASSWORD=mysecretpassword
45
- mem_limit: 250M
46
- logging:
47
- driver: "json-file"
48
- container_name: publicauth_db
49
- healthcheck:
50
- test: ["CMD-SHELL", "pg_isready"]
51
- interval: 10s
52
- timeout: 5s
53
- retries: 5
54
- volumes:
55
- - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
56
- ports:
57
- - "19600:5432"
58
-
59
- products_db:
60
- image: postgres:11.1
61
- environment:
62
- - POSTGRES_PASSWORD=mysecretpassword
63
- mem_limit: 250M
64
- logging:
65
- driver: "json-file"
66
- container_name: products_db
67
- healthcheck:
68
- test: ["CMD-SHELL", "pg_isready"]
69
- interval: 10s
70
- timeout: 5s
71
- retries: 5
72
- volumes:
73
- - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
74
- ports:
75
- - "19800:5432"
76
-
77
- ledger_db:
78
- image: postgres:11.1
79
- environment:
80
- - POSTGRES_PASSWORD=mysecretpassword
81
- mem_limit: 250M
82
- logging:
83
- driver: "json-file"
84
- container_name: ledger_db
85
- healthcheck:
86
- test: ["CMD-SHELL", "pg_isready"]
87
- interval: 10s
88
- timeout: 5s
89
- retries: 5
90
- volumes:
91
- - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
92
- ports:
93
- - "20700:5432"
94
-
95
- webhooks_db:
96
- image: postgres:11.1
97
- environment:
98
- - POSTGRES_PASSWORD=mysecretpassword
99
- mem_limit: 250M
100
- logging:
101
- driver: "json-file"
102
- container_name: webhooks_db
103
- healthcheck:
104
- test: ["CMD-SHELL", "pg_isready"]
105
- interval: 10s
106
- timeout: 5s
107
- retries: 5
108
- volumes:
109
- - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
110
- ports:
111
- - "20800:5432"
112
-
113
-
114
-
115
- adminusers:
116
- image: governmentdigitalservice/pay-adminusers:local
117
-
118
- depends_on:
119
- adminusers_db:
120
- condition: service_healthy
121
-
122
- env_file:
123
- - services/java_app.env
124
- - services/adminusers.env
125
- environment:
126
- - RUN_MIGRATION=true
127
- - RUN_APP=true
128
- - PORT=9700
129
- - DISABLE_INTERNAL_HTTPS=true
130
-
131
- - DB_HOST=adminusers_db
132
- - DB_USER=adminusers
133
- - DB_PASSWORD=mysecretpassword
134
- - DB_SSL_OPTION=ssl=none
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
- - ADMINUSERS_URL=http://adminusers:9700
144
- - CONNECTOR_URL=http://connector:9300
145
- - PUBLICAUTH_URL=http://publicauth:9600
146
- - PRODUCTS_URL=http://products:18000
147
- - LEDGER_URL=http://ledger:10700
148
- - WEBHOOKS_URL=http://webhooks:10800
149
- - TOOLBOX_URL=http://localhost:3040
150
- working_dir: '/app'
151
- mem_limit: 2G
152
- user: root
153
- logging:
154
- driver: "json-file"
155
- ports:
156
- - "9700:9700"
157
-
158
- container_name: adminusers
159
-
160
- connector:
161
- image: governmentdigitalservice/pay-connector:local
162
-
163
- depends_on:
164
- connector_db:
165
- condition: service_healthy
166
-
167
- env_file:
168
- - services/java_app.env
169
- - services/connector.env
170
- environment:
171
- - RUN_MIGRATION=true
172
- - RUN_APP=true
173
- - PORT=9300
174
- - DISABLE_INTERNAL_HTTPS=true
175
-
176
- - DB_HOST=connector_db
177
- - DB_USER=connector
178
- - DB_PASSWORD=mysecretpassword
179
- - DB_SSL_OPTION=ssl=none
180
-
181
-
182
-
183
- - AWS_ACCESS_KEY=mockAccessKey
184
- - AWS_SECRET_ACCESS_KEY=mockSecretAccessKey
185
-
186
-
187
-
188
- - AWS_SQS_REGION=eu-west-1
189
- - AWS_SQS_MESSAGE_MAXIMUM_WAIT_TIME_IN_SECONDS=20
190
- - AWS_SQS_NON_STANDARD_SERVICE_ENDPOINT=true
191
- - AWS_SQS_ENDPOINT=http://localstack:4566
192
- - AWS_SQS_CAPTURE_QUEUE_URL=http://localstack:4566/000000000000/pay_capture_queue
193
- - AWS_SQS_PAYMENT_EVENT_QUEUE_URL=http://localstack:4566/000000000000/pay_event_queue
194
- - AWS_SQS_PAYOUT_RECONCILE_QUEUE_URL=http://localstack:4566/000000000000/payout_reconcile_queue
195
- - AWS_SQS_CONNECTOR_TASKS_QUEUE_URL=http://localstack:4566/000000000000/connector_tasks_queue
196
-
197
-
198
-
199
-
200
- - ADMINUSERS_URL=http://adminusers:9700
201
- - CONNECTOR_URL=http://connector:9300
202
- - PUBLICAUTH_URL=http://publicauth:9600
203
- - PRODUCTS_URL=http://products:18000
204
- - LEDGER_URL=http://ledger:10700
205
- - WEBHOOKS_URL=http://webhooks:10800
206
- - TOOLBOX_URL=http://localhost:3040
207
- working_dir: '/app'
208
- mem_limit: 2G
209
- user: root
210
- logging:
211
- driver: "json-file"
212
- ports:
213
- - "9300:9300"
214
- - "9301:9301"
215
- container_name: connector
216
-
217
- publicauth:
218
- image: governmentdigitalservice/pay-publicauth:local
219
-
220
- depends_on:
221
- publicauth_db:
222
- condition: service_healthy
223
-
224
- env_file:
225
- - services/java_app.env
226
- - services/publicauth.env
227
- environment:
228
- - RUN_MIGRATION=true
229
- - RUN_APP=true
230
- - PORT=9600
231
- - DISABLE_INTERNAL_HTTPS=true
232
-
233
- - DB_HOST=publicauth_db
234
- - DB_USER=publicauth
235
- - DB_PASSWORD=mysecretpassword
236
- - DB_SSL_OPTION=ssl=none
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
- - ADMINUSERS_URL=http://adminusers:9700
246
- - CONNECTOR_URL=http://connector:9300
247
- - PUBLICAUTH_URL=http://publicauth:9600
248
- - PRODUCTS_URL=http://products:18000
249
- - LEDGER_URL=http://ledger:10700
250
- - WEBHOOKS_URL=http://webhooks:10800
251
- - TOOLBOX_URL=http://localhost:3040
252
- working_dir: '/app'
253
- mem_limit: 2G
254
- user: root
255
- logging:
256
- driver: "json-file"
257
- ports:
258
- - "9600:9600"
259
-
260
- container_name: publicauth
261
-
262
- products:
263
- image: governmentdigitalservice/pay-products:local
264
-
265
- depends_on:
266
- products_db:
267
- condition: service_healthy
268
-
269
- env_file:
270
- - services/java_app.env
271
- - services/products.env
272
- environment:
273
- - RUN_MIGRATION=true
274
- - RUN_APP=true
275
- - PORT=18000
276
- - DISABLE_INTERNAL_HTTPS=true
277
-
278
- - DB_HOST=products_db
279
- - DB_USER=products
280
- - DB_PASSWORD=mysecretpassword
281
- - DB_SSL_OPTION=ssl=none
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
- - ADMINUSERS_URL=http://adminusers:9700
291
- - CONNECTOR_URL=http://connector:9300
292
- - PUBLICAUTH_URL=http://publicauth:9600
293
- - PRODUCTS_URL=http://products:18000
294
- - LEDGER_URL=http://ledger:10700
295
- - WEBHOOKS_URL=http://webhooks:10800
296
- - TOOLBOX_URL=http://localhost:3040
297
- working_dir: '/app'
298
- mem_limit: 2G
299
- user: root
300
- logging:
301
- driver: "json-file"
302
- ports:
303
- - "18000:18000"
304
-
305
- container_name: products
306
-
307
- ledger:
308
- image: governmentdigitalservice/pay-ledger:local
309
-
310
- depends_on:
311
- ledger_db:
312
- condition: service_healthy
313
-
314
- env_file:
315
- - services/java_app.env
316
- - services/ledger.env
317
- environment:
318
- - RUN_MIGRATION=true
319
- - RUN_APP=true
320
- - PORT=10700
321
- - DISABLE_INTERNAL_HTTPS=true
322
-
323
- - DB_HOST=ledger_db
324
- - DB_USER=ledger
325
- - DB_PASSWORD=mysecretpassword
326
- - DB_SSL_OPTION=ssl=none
327
-
328
-
329
-
330
- - AWS_ACCESS_KEY=mockAccessKey
331
- - AWS_SECRET_ACCESS_KEY=mockSecretAccessKey
332
-
333
-
334
-
335
- - AWS_SQS_REGION=eu-west-1
336
- - AWS_SQS_MESSAGE_MAXIMUM_WAIT_TIME_IN_SECONDS=20
337
- - AWS_SQS_NON_STANDARD_SERVICE_ENDPOINT=true
338
- - AWS_SQS_ENDPOINT=http://localstack:4566
339
- - AWS_SQS_PAYMENT_EVENT_QUEUE_URL=http://localstack:4566/000000000000/pay_event_queue
340
-
341
-
342
-
343
- - AWS_SNS_NON_STANDARD_SERVICE_ENDPOINT=true
344
- - AWS_SNS_ENDPOINT=http://localstack:4566
345
- - AWS_SNS_REGION=eu-west-1
346
- - SNS_TOPIC_CARD_PAYMENT_EVENTS_ARN=arn:aws:sns:eu-west-1:000000000000:card-payment-events-topic
347
- - SNS_TOPIC_CARD_PAYMENT_DISPUTE_EVENTS_ARN=arn:aws:sns:eu-west-1:000000000000:card-payment-dispute-events-topic
348
-
349
-
350
- - ADMINUSERS_URL=http://adminusers:9700
351
- - CONNECTOR_URL=http://connector:9300
352
- - PUBLICAUTH_URL=http://publicauth:9600
353
- - PRODUCTS_URL=http://products:18000
354
- - LEDGER_URL=http://ledger:10700
355
- - WEBHOOKS_URL=http://webhooks:10800
356
- - TOOLBOX_URL=http://localhost:3040
357
- - SNS_ENABLED=true
358
- - PUBLISH_CARD_PAYMENT_EVENTS_TO_SNS=true
359
- - PUBLISH_CARD_PAYMENT_DISPUTE_EVENTS_TO_SNS=true
360
- working_dir: '/app'
361
- mem_limit: 2G
362
- user: root
363
- logging:
364
- driver: "json-file"
365
- ports:
366
- - "10700:10700"
367
-
368
- container_name: ledger
369
-
370
- webhooks:
371
- image: governmentdigitalservice/pay-webhooks:local
372
-
373
- depends_on:
374
- webhooks_db:
375
- condition: service_healthy
376
-
377
- env_file:
378
- - services/java_app.env
379
- - services/webhooks.env
380
- environment:
381
- - RUN_MIGRATION=true
382
- - RUN_APP=true
383
- - PORT=10800
384
- - DISABLE_INTERNAL_HTTPS=true
385
-
386
- - DB_HOST=webhooks_db
387
- - DB_USER=webhooks
388
- - DB_PASSWORD=mysecretpassword
389
- - DB_SSL_OPTION=ssl=none
390
-
391
-
392
-
393
- - AWS_ACCESS_KEY=mockAccessKey
394
- - AWS_SECRET_ACCESS_KEY=mockSecretAccessKey
395
-
396
-
397
-
398
- - AWS_SQS_REGION=eu-west-1
399
- - AWS_SQS_MESSAGE_MAXIMUM_WAIT_TIME_IN_SECONDS=20
400
- - AWS_SQS_NON_STANDARD_SERVICE_ENDPOINT=true
401
- - AWS_SQS_ENDPOINT=http://localstack:4566
402
- - AWS_SQS_PAYMENT_EVENT_QUEUE_URL=http://localstack:4566/000000000000/webhooks-events-subscriber-queue
403
-
404
-
405
-
406
-
407
- - ADMINUSERS_URL=http://adminusers:9700
408
- - CONNECTOR_URL=http://connector:9300
409
- - PUBLICAUTH_URL=http://publicauth:9600
410
- - PRODUCTS_URL=http://products:18000
411
- - LEDGER_URL=http://ledger:10700
412
- - WEBHOOKS_URL=http://webhooks:10800
413
- - TOOLBOX_URL=http://localhost:3040
414
- working_dir: '/app'
415
- mem_limit: 2G
416
- user: root
417
- logging:
418
- driver: "json-file"
419
- ports:
420
- - "10800:10800"
421
-
422
- container_name: webhooks
423
-
424
-
425
-
426
- toolbox:
427
- image: node:16.20.0-alpine3.17
428
-
429
- env_file: services/toolbox.env
430
- environment:
431
- - SECURE_COOKIE_OFF=true
432
- - RUN_APP=true
433
- - DISABLE_APPMETRICS=true
434
- - DISABLE_INTERNAL_HTTPS=true
435
- - PORT=3040
436
-
437
- - ADMINUSERS_URL=http://adminusers:9700
438
-
439
- - CONNECTOR_URL=http://connector:9300
440
-
441
- - PUBLIC_AUTH_URL=http://publicauth:9600
442
-
443
- - PRODUCTS_URL=http://products:18000
444
-
445
- - LEDGER_URL=http://ledger:10700
446
-
447
- - WEBHOOKS_URL=http://webhooks:10800
448
- - TOOLBOX_URL=http://localhost:3040
449
- volumes:
450
- - "$WORKSPACE/pay-toolbox:/app"
451
- mem_limit: 1G
452
- working_dir: '/app'
453
- entrypoint: sh -c "npm run build:copy && npm --inspect=0.0.0.0:3041 start"
454
- ports:
455
- - "3040:3040"
456
- - "3041:3041"
457
- logging:
458
- driver: "json-file"
459
- container_name: toolbox
460
-
461
-
462
-
463
- localstack:
464
- image: localstack/localstack:3
465
- container_name: localstack
466
- environment:
467
- - EAGER_SERVICE_LOADING=1
468
- - SERVICES=sns,sqs
469
- ports:
470
- - "4566:4566" # All AWS services exposed on this port
471
- volumes:
472
- - /Users/jonathan.harden/gitdevel/github.com/alphagov/pay-infra/cli/lib/pay_cli/commands/local/files/localstack/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh
473
-
@@ -1,20 +0,0 @@
1
- module PayCLI::Commands::Local::ImageExtractor
2
- class DockerfileNotFound < StandardError; end
3
- class ImageNotFoundInDockerfile < StandardError; end
4
-
5
- # Parse the Dockerfile specified and return the name and/or tag of the image in the
6
- # first FROM line in the Dockerfile
7
- def self.parse_image_without_sha(dockerfile_path)
8
- raise DockerfileNotFound unless File.exist? dockerfile_path
9
-
10
- File.readlines(dockerfile_path).each do |line|
11
- return _parse_image_from_line(line) if line.strip.start_with? 'FROM'
12
- end
13
-
14
- raise ImageNotFoundInDockerfile
15
- end
16
-
17
- def self._parse_image_from_line(line)
18
- line.strip.delete_prefix('FROM').strip.split('@').first
19
- end
20
- end