forked from barrel/barrel-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (58 loc) · 1.52 KB
/
.gitlab-ci.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
stages:
- build
- test
- acceptance
- production
image: barrelny/pantheon-ci:0.0.9
build_theme:
only:
- ^(feature\/.*)|(develop)$
stage: build
script:
- cd ./wp-content/themes/$THEME_NAME && npm i
- npm run build
test_php_syntax:
stage: test
script:
- git diff --diff-filter=ACMR --name-only origin/master -- '*.php' | xargs -L1 php -d short_open_tag=Off -l
test_js_lint:
stage: test
before_script:
- npm config set loglevel warn && npm set progress=false
- npm install -g standard --loglevel=warn
- cd ./wp-content/themes/$THEME_NAME
script: standard
test_modules:
stage: test
script:
- bash private/scripts/test_modules.sh
multidev_develop:
only:
- develop
stage: acceptance
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- bash private/scripts/import_git_remote.sh
script:
- bash private/scripts/multidev_deploy_develop.sh
multidev_feature:
only:
- /^feature\/.*$/
stage: acceptance
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- bash private/scripts/import_git_remote.sh
script:
- bash private/scripts/multidev_deploy_feature.sh
multidev_hotfix:
only:
- /^hotfix\/.*$/
stage: acceptance
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- bash private/scripts/import_git_remote.sh
script:
- bash private/scripts/multidev_deploy_hotfix.sh