-
Notifications
You must be signed in to change notification settings - Fork 14
/
Taskfile.yml
508 lines (449 loc) · 20.8 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# This is a go-task file for various developer tasks
# e.g. building docker images and setting up local development.
# You can read about the Task files here: https://taskfile.dev.
version: "3"
dotenv: [".task.env"]
includes:
translations: ./task/Taskfile.translations.yml
lagoon: ./task/Taskfile.lagoon.yml
vars:
# Docker image registry.
# Eg.
# - ghcr.io/danskernesdigitalebibliotek
# - docker.io/someregistry
RELEASE_IMAGE_REGISTRY: '{{.RELEASE_IMAGE_REGISTRY | default "ghcr.io/danskernesdigitalebibliotek"}}'
# Get total amount of commits on the main branch. Used as build number.
COMMIT_COUNT:
sh: git rev-list --count origin/main
# The version number we want to tag the source build with.
# It can be specified by adding RELEASE_TAG=XX when running command.
# Otherwise it will default to the COMMIT_COUNT variable.
RELEASE_IMAGE_TAG: "{{.RELEASE_IMAGE_TAG | default .COMMIT_COUNT }}"
# Constructing docker image name.
DOCKER_IMAGE_PREFIX: "{{ .RELEASE_IMAGE_REGISTRY }}/{{ .DOCKER_IMAGE_NAMESPACE }}"
# Constructing docker image name.
RELEASE_IMAGE_NAME: '{{.RELEASE_IMAGE_NAME | default "dpl-cms-source"}}'
RELEASE_FULL_NAME: "{{.RELEASE_IMAGE_REGISTRY}}/{{.RELEASE_IMAGE_NAME}}:{{.RELEASE_IMAGE_TAG}}"
# Where is the docker file(s) we use for our builds residing?
LAGOON_DIR: "lagoon"
DOCKER_COMPOSE_FILES_DEFAULT: "-f docker-compose.yml"
DOCKER_COMPOSE_FILES: "{{.DOCKER_COMPOSE_FILES | default .DOCKER_COMPOSE_FILES_DEFAULT }}"
DOCKER_COMPOSE_FILES_CI: "{{.DOCKER_COMPOSE_FILES}} -f docker-compose.ci.yml"
DOCKER_COMPOSE_FILES_DEV: "{{.DOCKER_COMPOSE_FILES}} -f docker-compose.dev.yml"
# Sql dump files directory
DIR_RESTORE_DATABASE: "restore/database"
# Directory with lagoon backup files.
DIR_RESTORE_FILES: "restore/files"
# Default language
LANGUAGE: "da"
# Ports and host names:
# Using ports exposed on localhost is important.
# Host names or ports exposed by Dory or other similar projects
# introduce multiple layers of proxies and cause problems.
#
# Cypress.
CYPRESS_BASE_PORT:
sh: docker compose port varnish 8080 2>/dev/null | cut -d ":" -f2
CYPRESS_HOST_LOCAL: "http://localhost:{{ .CYPRESS_BASE_PORT }}"
# Wiremock.
WIREMOCK_HTTP_PORT:
sh: docker compose port wiremock 80 2>/dev/null | cut -d ":" -f2
WIREMOCK_HTTPS_PORT:
sh: docker compose port wiremock 443 2>/dev/null | cut -d ":" -f2
WIREMOCK_HOST_DOCKER: http://wiremock
WIREMOCK_HOST_LOCAL: "http://localhost:{{ .WIREMOCK_HTTP_PORT }}"
WIREMOCK_HOST_LOCAL_HTTPS: "https://localhost:{{ .WIREMOCK_HTTPS_PORT }}"
tasks:
ghcr:login:
summary: Login into Github Container Registry
cmds:
- echo {{ .CR_PAT }} | docker login {{ .RELEASE_IMAGE_REGISTRY }} -u username-not-used --password-stdin
preconditions:
- sh: "[ ! -z {{.CR_PAT}} ]"
msg: "Env variable CR_PAT is not set or empty."
dev:format:
summary: Lint custom code, and fix when possible
cmds:
- cmd: task dev:cli -- php vendor/bin/phpcbf
# PHP Code Beautifier will fail even if it has fixed all errors.
# Continue regardless assumming that PHP Codesniffer will fail on
# any remaining errors.
ignore_error: true
- task dev:cli -- php vendor/bin/phpcs
- task dev:cli -- php vendor/bin/twig-cs-fixer lint --fix
- task dev:cli -- php vendor/bin/phpstan
- yarn install --frozen-lockfile
- npx eslint web -c .eslintrc.json --fix
dev:build:
summary: Build docker containers
# Ensure that we only rebuild if there are changes to Dockerfiles
# or the config files used.
sources:
- "{{ .LAGOON_DIR }}/**/*"
- "{{ .LAGOON_DIR }}/*"
cmds:
- docker compose build
dev:cli:
summary: Performs command inside container. Expects parameter(s).
# This could have a dependency on dev:build but does not to avoid excessive
# log output. dev:cli gets called a lot.
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} run --rm cli sh -c "{{.CLI_ARGS}}"
dev:start:
summary: Run docker compose
deps:
- dev:build
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} up -d {{if eq .CI "true"}}--quiet-pull{{end}}
vars:
CI:
sh: '[[ -z "${CI}" ]] && echo "false" || echo "true"'
dev:stop:
summary: Stop docker compose environment
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} stop
dev:down:
summary: Stop and remove docker compose environment
cmds:
# DNS proxies such as Dory may hang on to the network for a bit which
# causes the process to fail. Wait and retry if that is the case
- docker compose {{ .DOCKER_COMPOSE_FILES }} down --volumes --remove-orphans || (sleep 3 && docker-compose down)
dev:pull:
summary: Pull latest docker images.
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} pull
dev:reset:
desc: Create local development setup in a clean state
deps:
# Build new containers if necessary.
- dev:build
# Stop potential running environment.
- dev:down
cmds:
# Create a .env file with recommended defaults.
- cp -n .env.example .env || true
# Build site.
- task dev:cli -- composer install
# Always reinstall packages tracking develop builds. The content of such
# packages may change without composer package version changes so ensure
# we have the latest version.
- task dev:cli -- composer reinstall danskernesdigitalebibliotek/dpl-design-system danskernesdigitalebibliotek/dpl-react --no-cache
# (Re)run Drupal scaffolding.
- task dev:cli -- composer drupal:scaffold
# Build dev scripts
- task dev:cli -- composer -d dev-scripts/dpl-react install
# Pull the images (necessary for the first reset)
- task dev:pull
# Start local environment.
- task dev:start
# Install site.
- task dev:cli -- drush site-install --existing-config -y
# Practice shows that the cache needs to be cleared to avoid configuration
# errors even after a site install.
- task dev:cache:clear:drupal
# Import translations.
- |
if [ -n "${SKIP_LANGUAGE_IMPORT}" ]; then
echo "Skipping language import due to SKIP_LANGUAGE_IMPORT environment variable"
else
task dev:cli -- drush locale-check
task dev:cli -- drush locale-update
task dev:cli -- drush dpl_po:import-remote-config-po da https://danskernesdigitalebibliotek.github.io/dpl-cms/translations/da.config.po
fi
# Clear all caches to ensure we have a pristine setup.
- task dev:cache:clear:all
# Run deploy hooks.
- task dev:cli -- drush deploy -y
# Ensure site is reachable and warm any caches
- task dev:cli -- curl --silent --show-error --fail --output /dev/null http://varnish:8080/
# Enable dev modules.
- task dev:enable-dev-tools
- task dev:create-users
# Show a one-time login to the local site.
- task dev:cli -- drush user-login
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_DEV }}"
dev:openid:configure:
desc: Set openid connect settings based on .env variables. And run cron.
cmds:
- task dev:cli -- ./dev-scripts/cli-set-openid-settings.sh
- task dev:run-cron
dev:run-cron:
desc: Run cron in the container
cmds:
- task dev:cli -- drush cron
dev:enable-dev-tools:
desc: Enable dev modules and settings, which are not to be used in Prod. They are config-ignored
cmds:
- task dev:cli -- drush install -y devel dpl_example_content field_ui purge_ui restui uuid_url views_ui dblog
dev:enable-xdebug:
desc: "Enable xdebug within the container."
cmds:
- XDEBUG_ENABLE=true task dev:start
- read -p "Press enter to disable Xdebug"
- task dev:start
dev:phpunit:
desc: Run PHPUnit tests with code coverage
cmds:
- docker compose run -e XDEBUG_ENABLE=true -e XDEBUG_MODE=coverage,debug cli vendor/bin/phpunit --coverage-text
dev:create-users:
desc: Create test users, with test roles
cmds:
- task dev:cli -- drush user:create editor --password="test"
- task dev:cli -- drush user:role:add 'editor' editor
- task dev:cli -- drush user:create administrator --password="test"
- task dev:cli -- drush user:role:add 'administrator' administrator
- task dev:cli -- drush user:create mediator --password="test"
- task dev:cli -- drush user:role:add 'mediator' mediator
- task dev:cli -- drush user:create local_administrator --password="test"
- task dev:cli -- drush user:role:add 'local_administrator' local_administrator
- task dev:cli -- drush user:create external_system --password="external_system"
- task dev:cli -- drush user:role:add 'external_system' external_system
- task dev:cli -- drush user:create patron --password="test"
- task dev:cli -- drush user:role:add 'patron' patron
- task dev:cli -- drush user:create graphql_consumer --password="test"
- task dev:cli -- drush user:role:add 'external_system' graphql_consumer
- task dev:cli -- drush user:role:add 'graphql_consumer' graphql_consumer
dev:import-profile-translations:
desc: Import our custom profile translations. This is done automatically on deploy.
cmds:
- task dev:cli -- drush locale-import da profiles/dpl_cms/translations/da.po
dev:restore:database:
desc: 'Restore database from db dump file. Only one sql should be present the "{{ .DIR_RESTORE_DATABASE }}" directory.'
cmds:
- task dev:cli -- drush sql:drop -y
- docker compose exec -T {{ .MYSQL_CONTAINER }} mysql < {{ .SQL_FILE }}
- task dev:cli -- drush deploy
preconditions:
- sh: "[ {{ .SQL_FILES_COUNT }} -gt 0 ]"
msg: "There are no sql files in {{ .DIR_RESTORE_DATABASE }}/. Cannot continue."
- sh: "[ {{ .SQL_FILES_COUNT }} -eq 1 ]"
msg: "There are {{ .SQL_FILES_COUNT }} valid files in {{ .DIR_RESTORE_DATABASE }}/:\n{{ .DIR_RESTORE_DATABASE_CONTENT }}\n...there should be just one."
vars:
SQL_FILES_COUNT:
sh: ls {{ .DIR_RESTORE_DATABASE }}/*.sql | wc -l 2> /dev/null | xargs
SQL_FILE:
sh: ls -t "{{ .DIR_RESTORE_DATABASE }}"/*.sql
DIR_RESTORE_DATABASE_CONTENT:
sh: ls {{ .DIR_RESTORE_DATABASE }}
MYSQL_CONTAINER: "mariadb"
dev:restore:files:
desc: "Restore files by overwriting existing with the ones from the Lagoon backup package"
cmds:
- docker compose exec cli sh dev-scripts/cli-restore-lagoon-files.sh {{ .DIR_RESTORE_FILES }}
- task dev:cache:clear:all
dev:cache:clear:all:
summary: Clears all cache
cmds:
- task dev:cache:clear:drupal
- task dev:cache:clear:external
dev:cache:clear:drupal:
summary: Runs Drupal cache rebuild
cmds:
- task dev:cli -- drush cache:rebuild -y
dev:cache:clear:external:
summary: Purges the varnish cache
cmds:
- task dev:cli -- drush cache:rebuild-external -y
dev:dpl-react:get-asset-url:
summary: Outputs the url to the build in Github
cmds:
- cmd: task dev:cli -- dev-scripts/dpl-react/bin/console construct-assets-url {{ .BRANCH }}
preconditions:
- sh: "[ ! -z {{.BRANCH}} ]"
msg: "Env variable BRANCH is not set or empty."
dev:dpl-react:overwrite:
desc: Downloads assets from Github and overwrites existing dpl-react library
cmds:
- cmd: echo {{ .ASSET_URL }}
- cmd: task dev:cli -- dev-scripts/dpl-react/bin/console download-and-overwrite-library {{ .ASSET_URL }}
vars:
ASSET_URL:
sh: task dev:dpl-react:get-asset-url
dev:codegen:fbs:
desc: Generate FBS client package from OpenAPI specification
cmds:
- cmd: |
docker run --rm \
-v ${PWD}:/local \
openapitools/openapi-generator-cli:v7.1.0 generate \
-i https://raw.githubusercontent.com/danskernesdigitalebibliotek/dpl-react/main/src/core/fbs/fbs-adapter.yaml \
-g php -o /local/packages/fbs-client \
-c /local/.openapi-generator/fbs.config.yaml
dev:codegen:dpl-cms:
desc: Generate CMS API package from OpenAPI specification
cmds:
- cmd: |
cd packages/cms-api && find . ! -name '.' ! -name '..' ! -name '.openapi-generator-ignore' -type d -type f -exec rm -rf {} +
- cmd: |
docker run --rm \
-v ${PWD}:/local \
openapitools/openapi-generator-cli:v7.1.0 generate \
-i ./local/openapi.json \
-g php-symfony -o /local/packages/cms-api \
-c /local/.openapi-generator/dpl-cms.config.yaml
dev:composer:update-design-system:
desc: Update the DPL design system package to a specific version or branch release.
summary: |
Environment variables:
- Required (one of):
BRANCH: The git branch to download the corresponding build for.
RELEASE: The release to download the corresponding build for
- Optional:
VERSION: The version to use for the package. Defaults to 0.0.0-dev
Usage:
- Update to a released version: RELEASE=2024.4.0 VERSION=2024.4.0 task dev:composer:update-design-system
- Update to a branch release: BRANCH=taxonomy_categories task dev:composer:update-design-system
deps: ["deps:jq", "deps:gh"]
cmds:
- task: dev:composer:update-package
vars:
NAME: "danskernesdigitalebibliotek/dpl-design-system"
VERSION:
sh: "echo ${VERSION:-0.0.0-dev}"
DOWNLOAD_URL:
sh: gh release view ${RELEASE:-branch-$BRANCH} --repo danskernesdigitalebibliotek/dpl-design-system --json assets | jq -r '.assets[].url'
preconditions:
- sh: "[[ -z $BRANCH || -z $RELEASE ]]"
msg: Please provide a BRANCH or RELEASE environment variable with the name of the design system branch/release to use
dev:composer:update-react:
desc: Update the DPL React package to a specific version or branch release.
summary: |
Environment variables:
- Required (one of):
BRANCH: The git branch to download the corresponding build for.
RELEASE: The release to download the corresponding build for
- Optional:
VERSION: The version to use for the package. Defaults to 0.0.0-dev
Usage:
- Update to a released version: RELEASE=2024.4.0 VERSION=2024.4.0 task dev:composer:update-react
- Update to a branch release: BRANCH=taxonomy_categories task dev:composer:update-react
deps: ["deps:jq", "deps:gh"]
cmds:
- task: dev:composer:update-package
vars:
NAME: "danskernesdigitalebibliotek/dpl-react"
VERSION:
sh: "echo ${VERSION:-0.0.0-dev}"
DOWNLOAD_URL:
sh: gh release view ${RELEASE:-branch-$BRANCH} --repo danskernesdigitalebibliotek/dpl-react --json assets | jq -r '.assets[].url'
preconditions:
- sh: "[[ -z $BRANCH || -z $RELEASE ]]"
msg: Please provide a BRANCH or RELEASE environment variable with the name of the React components branch/release to use
dev:composer:update-package:
deps: ["deps:jq", "deps:gh"]
internal: true
cmds:
- cmd: jq --indent {{ .JQ_INDENT }} -r '(.repositories[] | select(.package.name == "{{ .NAME }}").package.dist.url) = "{{ .DOWNLOAD_URL }}"' composer.json > composer.temp.json && mv composer.temp.json composer.json
- cmd: jq --indent {{ .JQ_INDENT }} -r '(.repositories[] | select(.package.name =="{{ .NAME }}").package.version) = ("{{ .VERSION }}")' composer.json > composer.temp.json && mv composer.temp.json composer.json
- cmd: sleep 1
- cmd: task dev:cli -- composer require {{ .NAME }}:{{ .VERSION }}
vars:
# This is what matches our composer.json file.
JQ_INDENT: 4
dev:example-content:update:
desc: Update the example content module with data from the current site
cmds:
- cmd: task dev:cli -- drush default-content:export-module dpl_example_content
dev:go:set-graphql-secret:
desc: Sets the GraphQL consumer secret based on the .env variable.
cmds:
- cmd: task dev:cli -- drush dpl_consumers:set-consumer-secret
dev:go:graphql-credentials:
desc: Get the GraphQL consumer credentials
cmds:
- cmd: task dev:cli -- drush dpl_consumers:consumer-credentials
ci:reset:
desc: Create CI setup in a clean state
cmds:
- task dev:reset
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_CI }}"
SKIP_LANGUAGE_IMPORT: "true"
ci:cypress:
desc: Run Cypress functional tests
deps: [ci:wiremock:create-mappings]
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm node-chrome yarn install --frozen-lockfile
- task dev:cli -- drush user:password $CYPRESS_DRUPAL_USERNAME $CYPRESS_DRUPAL_PASSWORD
# We make sure to run the tests that require mappings first.
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm -e CYPRESS_DRUPAL_USERNAME=$CYPRESS_DRUPAL_USERNAME -e CYPRESS_DRUPAL_PASSWORD=$CYPRESS_DRUPAL_PASSWORD cypress --spec "cypress/e2e/withMappings/*.ts"
# All tests that delete mappings and make their own run afterwards.
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm -e CYPRESS_DRUPAL_USERNAME=$CYPRESS_DRUPAL_USERNAME -e CYPRESS_DRUPAL_PASSWORD=$CYPRESS_DRUPAL_PASSWORD cypress --spec "cypress/e2e/*.ts"
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_CI }}"
CYPRESS_DRUPAL_USERNAME: admin
CYPRESS_DRUPAL_PASSWORD: admin
ci:cypress:local:
desc: Run Cypress functional tests locally
deps: [ci:wiremock:create-mappings]
cmds:
- yarn install --frozen-lockfile
- task dev:cli -- drush user:password $CYPRESS_DRUPAL_USERNAME $CYPRESS_DRUPAL_PASSWORD
- http_proxy={{ .WIREMOCK_HOST_LOCAL }} https_proxy={{ .WIREMOCK_HOST_LOCAL_HTTPS }} npx cypress open
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_CI }}"
CYPRESS_BASE_URL: http://localhost:{{ .CYPRESS_BASE_PORT }}
CYPRESS_WIREMOCK_URL: "{{ .WIREMOCK_HOST_LOCAL }}"
CYPRESS_DRUPAL_USERNAME: admin
CYPRESS_DRUPAL_PASSWORD: admin
# Enable this to help with debugging with network and proxy requests.
# https://docs.cypress.io/guides/references/troubleshooting#Print-DEBUG-logs
# DEBUG: cypress:network:*,cypress:server:request,-cypress:network:cors
ci:pa11y:
desc: Run Pa11y to test accessiblity
deps: [ci:wiremock:create-mappings]
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm -e HTTP_PROXY={{ .WIREMOCK_HOST_DOCKER }} node-chrome yarn pa11y:ci
ci:wiremock:browser:
desc: Watch the site with a wiremock http proxy. ⚠️ Depends on Chrome installed on OS ⚠️
deps: [ci:wiremock:create-mappings]
cmds:
- echo '⚠️ Please make sure that Chrome is installed in your OS.'
- yarn wiremock:browser
env:
HTTP_PROXY: "{{ .WIREMOCK_HOST_LOCAL }}"
ci:wiremock:create-mappings:
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm node-chrome yarn install --frozen-lockfile
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm -e HTTP_PROXY={{ .WIREMOCK_HOST_DOCKER }} node-chrome yarn wiremock:create-mappings
ci:lighthouse:
desc: Run Lighthouse to test performance
deps: [ci:wiremock:create-mappings]
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm -e HTTP_PROXY={{ .WIREMOCK_HOST_DOCKER }} node-chrome npx lhci autorun
ci:openapi:validate:
desc: Validate the Drupal OpenAPI specification
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm node-chrome yarn install --frozen-lockfile
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm node-chrome npx swagger-cli validate http://varnish:8080/openapi/rest?_format=json&language=en
ci:openapi:download:
desc: Download the Drupal OpenAPI specification from the running local site to the local filesystem
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm node-chrome yarn install --frozen-lockfile
- docker compose {{ .DOCKER_COMPOSE_FILES_CI }} run --rm node-chrome curl "http://varnish:8080/openapi/rest?_format=json&language=en" | npx jsome -r > openapi.json
source:build:
summary: Build core source image.
cmds:
- docker build -f {{ .LAGOON_DIR }}/cli.dockerfile --tag dpl-cms-cli:0.0.0 .
- docker build -f {{ .LAGOON_DIR }}/source.dockerfile --tag {{ .RELEASE_FULL_NAME }} .
source:push:
summary: Push core source image to container registry.
deps: [ghcr:login]
cmds:
- docker push {{ .RELEASE_FULL_NAME }}
source:deploy:
desc: Build and push core source docker image.
cmds:
- task: source:build
- task: source:push
deps:jq:
internal: true
preconditions:
- sh: jq --version
msg: jq is not installed. Please check https://stedolan.github.io/jq/.
deps:gh:
internal: true
preconditions:
- sh: gh --version && gh auth status
msg: GitHub CLI is not installed or not authenticated. Please check https://cli.github.com/.