-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (38 loc) · 1.78 KB
/
Makefile
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
build:
docker build -t prisoner-content-hub-backend .
push:
@docker login -u="${QUAYIO_USERNAME}" -p="${QUAYIO_PASSWORD}" quay.io
docker tag prisoner-content-hub-backend quay.io/hmpps/prisoner-content-hub-backend:$(APP_VERSION)
docker tag prisoner-content-hub-backend quay.io/hmpps/prisoner-content-hub-backend:latest
docker push quay.io/hmpps/prisoner-content-hub-backend:$(APP_VERSION)
docker push quay.io/hmpps/prisoner-content-hub-backend:latest
push-preview:
@docker login -u="${QUAYIO_USERNAME}" -p="${QUAYIO_PASSWORD}" quay.io
docker tag prisoner-content-hub-backend quay.io/hmpps/prisoner-content-hub-backend:$(APP_VERSION)
docker push quay.io/hmpps/prisoner-content-hub-backend:$(APP_VERSION)
install-drupal:
vendor/bin/drush site-install prisoner_content_hub_profile --existing-config -y
coding-standards:
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,theme,css,js docroot/modules/custom/ docroot/themes/custom/ docroot/sites/default/settings.php
run-tests:
echo "Running tests on existing site"
vendor/bin/phpunit --testsuite=existing-site --log-junit ~/phpunit/junit-existing-site.xml --verbose
deploy:
drush cache:rebuild
echo "Enabling maintenance and readonly mode"
drush state-set readonlymode_active 1
drush state-set system.maintenance_mode 1
echo "Running deploy commands"
drush deploy
echo "Disabling maintenance and readonly mode"
drush state-set readonlymode_active 0
drush state-set system.maintenance_mode 0
sync:
# Downloading latest db backup from S3
docker-compose exec drupal scripts/downloadDBFromBackup.sh
# Download complete
# Clearing Drupal db of existing data
docker-compose exec -it drupal drush sql-drop -y
# Importing db backup to Drupal DB
docker-compose exec drupal scripts/importDBFromBackup.sh
# Import complete