1
+ # These are yaml anchors, reused later
2
+ x-bash-env-steps :
3
+ - &bash_env_export export BASH_ENV="$BITBUCKET_CLONE_DIR/.bashrc"
4
+ - &bash_env_source source $BASH_ENV
5
+
6
+ # This is a larger yaml anchor, reused for each pipeline
7
+ default_steps : &default_steps
8
+ - step :
9
+ name : Configure Environment Variables
10
+ services :
11
+ - docker
12
+ caches :
13
+ - docker
14
+ script :
15
+ - *bash_env_export
16
+ - export CI_BRANCH=${BITBUCKET_BRANCH:-master} && echo $CI_BRANCH
17
+ - export PR_NUMBER=$BITBUCKET_PR_ID && echo $PR_NUMBER
18
+ - export CI_PR_URL=https://bitbucket.org/$BITBUCKET_REPO_OWNER/$BITBUCKET_REPO_SLUG/pull-requests/$BITBUCKET_PR_ID && echo $CI_PR_URL
19
+ - export CI_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER && echo $CI_BUILD_NUMBER
20
+ - export CI_PROJECT_USERNAME=$BITBUCKET_REPO_OWNER && echo $CI_PROJECT_USERNAME
21
+ - export CI_PROJECT_REPONAME=$BITBUCKET_REPO_SLUG && echo $CI_PROJECT_REPONAME
22
+ - export CI_PROJECT_NAME=$BITBUCKET_REPO_FULL_NAME && echo $CI_PROJECT_NAME
23
+ - /build-tools-ci/scripts/set-environment
24
+ - echo $TERMINUS_ENV
25
+ artifacts :
26
+ - .bashrc
27
+ - parallel :
28
+ - step :
29
+ name : Static Tests
30
+ services :
31
+ - docker
32
+ caches :
33
+ - docker
34
+ - composer
35
+ script :
36
+ - *bash_env_export
37
+ - *bash_env_source
38
+ - ./.ci/test/static/run
39
+ - step :
40
+ name : Build PHP
41
+ services :
42
+ - docker
43
+ caches :
44
+ - docker
45
+ - composer
46
+ script :
47
+ - *bash_env_export
48
+ - *bash_env_source
49
+ - ./.ci/build/php
50
+ artifacts :
51
+ - web/**
52
+ - vendor/**
53
+ - step :
54
+ name : Deploy to Pantheon
55
+ services :
56
+ - docker
57
+ caches :
58
+ - docker
59
+ script :
60
+ - *bash_env_export
61
+ - *bash_env_source
62
+ - ./.ci/deploy/pantheon/dev-multidev
63
+ artifacts :
64
+ - web/**
65
+ - vendor/**
66
+ - step :
67
+ name : Test Visual Regression
68
+ image : backstopjs/backstopjs:4.1.9
69
+ services :
70
+ - docker
71
+ caches :
72
+ - docker
73
+ - node
74
+ script :
75
+ - *bash_env_export
76
+ - *bash_env_source
77
+ - ./.ci/test/visual-regression/run
78
+ artifacts :
79
+ - backstop_data/**
80
+ - step :
81
+ name : Test Behat
82
+ services :
83
+ - docker
84
+ caches :
85
+ - docker
86
+ - composer
87
+ script :
88
+ - *bash_env_export
89
+ - *bash_env_source
90
+ - ./.ci/test/behat/initialize
91
+ # Start headless Chrome
92
+ - google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --no-sandbox </dev/null &>/dev/null &
93
+ - ./.ci/test/behat/run
94
+ after-script :
95
+ - *bash_env_export
96
+ - *bash_env_source
97
+ - ./.ci/test/behat/cleanup
98
+ artifacts :
99
+ - behat-screenshots/**
100
+
101
+ image : quay.io/pantheon-public/build-tools-ci:6.x
102
+
103
+ options :
104
+ max-time : 30
105
+
106
+ pipelines :
107
+ pull-requests :
108
+ # Using the default_steps anchor means no other items can be added
109
+ ' ** ' : *default_steps
110
+ branches :
111
+ # Using the default_steps anchor means no other items can be added
112
+ master : *default_steps
0 commit comments