forked from govCMS/govcms8-scaffold-paas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ahoy.yml
87 lines (69 loc) · 2.05 KB
/
.ahoy.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
---
ahoyapi: v2
commands:
up:
usage: Build project.
cmd: docker-compose up -d "$@"
down:
usage: Delete project.
cmd: docker-compose down
build:
usage: Build project.
cmd: docker-compose up -d --build "$@"
cli:
usage: Start a shell inside TEST container.
cmd: docker-compose exec test bash
composer:
usage: Start a shell inside TEST container.
cmd: docker-compose exec -T test composer "$@"
run:
usage: Run command inside TEST container.
cmd: docker-compose exec -T test bash -c "$@"
drush:
usage: Run drush commands in TEST container.
cmd: docker-compose exec -T test drush "$@"
logs:
usage: Show Docker logs.
cmd: docker-compose logs "$@"
ps:
usage: List running Docker containers.
cmd: docker-compose ps
restart:
usage: Restart Docker containers.
cmd: docker-compose restart
stop:
usage: Stop Docker containers.
cmd: docker-compose stop "$@"
install:
usage: Install the profile.
cmd: docker-compose exec -T test drush si -y govcms "$@"
login:
usage: Login to a website.
cmd: docker-compose exec -T test drush uli "$@"
lint:
usage: Lint code
cmd: docker-compose exec -T test vendor/bin/phpcs
test-behat:
usage: Run Behat tests.
cmd: docker-compose exec -T test vendor/bin/behat "$@"
pull:
usage: Pull latest docker images.
cmd: docker image ls --format \"{{.Repository}}:{{.Tag}}\" | grep govcms8lagoon/ | grep -v none | xargs -n1 docker pull | cat
refresh-db:
usage: Refresh the database container with latest nightly dump.
cmd: |
ahoy confirm "Running this command will replace your current database. Are you sure?" &&
# Run this if confirm returns true
cat .env | grep MARIADB_DATA_IMAGE | cut -c20- | xargs -n1 docker pull && ahoy up ||
# Run this if confirm returns false
echo "OK, probably a wise choice..."
confirm:
cmd: |
read -r -p "$@ [y/N] " response
if [[ $response = y ]]
then
true
else
false
fi
hide: true