This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
agnes.yml
64 lines (53 loc) · 1.58 KB
/
agnes.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
agnes:
version: 4
config:
path: .config
repository:
url: git@gitlab.ethz.ch:thealternative/deploy/feedback.git
build:
path: .build
github:
api_token: '%env(GITHUB_API_TOKEN)%'
repository: TheAlternativeZurich/feedback
data:
shared_folders:
- var/persistent
files:
- path: .env.local
required: true
scripts:
build:
hook: build
script:
- composer install --verbose --prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts
- yarn install
- yarn run encore production
- rm -rf node_modules
deploy:
hook: deploy
script:
- php bin/console cache:clear -n --env=prod
- find var -type d -print0 | xargs -0 chmod 0755
- find var -type f -print0 | xargs -0 chmod 0644
- php bin/console doctrine:migrations:migrate -n --env=prod
rollback:
hook: rollback
script:
- cd $PREVIOUS_RELEASE_PATH && export MIGRATE_TO=$(php bin/console doctrine:migrations:latest)
- php bin/console doctrine:migrations:migrate $MIGRATE_TO -n --env=prod
fixtures:
hook: after_deploy
instance_filter: '*:*:dev'
script:
- wget -O composer.phar https://getcomposer.org/composer-stable.phar && chmod +x composer.phar && ./composer.phar install --optimize-autoloader --no-scripts
- php bin/console --env=dev doctrine:fixtures:load -q
tasks:
copy_prod_to_staging_before_deploy:
before: deploy
task: copy
instance_filter: '*:*:staging'
arguments: { source: prod }
deploy_dev_after_release:
after: release
task: deploy
arguments: { target: '*:*:dev' }