1
- bash_env : &bash_env
2
- - cp bash_env.txt $BASH_ENV
3
- - source $BASH_ENV
1
+ # These are yaml anchors, reused later
2
+ x-bash-env-steps :
3
+ - &bash_env_cp cp bash_env.txt $BASH_ENV
4
+ - &bash_env_source source $BASH_ENV
4
5
6
+ # This is a larger yaml anchor, reused for each pipeline
5
7
default_steps : &default_steps
6
8
- step :
7
9
name : Configure Environment Variables
8
- image : quay.io/pantheon-public/build-tools-ci:6.x
9
10
script :
10
11
- CI_BRANCH=$BITBUCKET_BRANCH CI_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER PR_NUMBER=$BITBUCKET_PR_ID
11
12
- /build-tools-ci/scripts/set-environment
@@ -18,22 +19,25 @@ default_steps: &default_steps
18
19
caches :
19
20
- composer
20
21
script :
21
- << : *bash_env
22
+ - *bash_env_cp
23
+ - *bash_env_source
22
24
- ./.ci/test/static/run
23
25
- step :
24
26
name : Build PHP
25
27
caches :
26
28
- composer
27
29
script :
28
- << : *bash_env
30
+ - *bash_env_cp
31
+ - *bash_env_source
29
32
- ./.ci/build/php
30
33
artifacts :
31
34
- web/**
32
35
- vendor/**
33
36
- step :
34
37
name : Deploy to Pantheon
35
38
script :
36
- << : *bash_env
39
+ - *bash_env_cp
40
+ - *bash_env_source
37
41
- ./.ci/deploy/pantheon/dev-multidev
38
42
artifacts :
39
43
- web/**
@@ -42,13 +46,14 @@ default_steps: &default_steps
42
46
name : Test Visual Regression
43
47
image : backstopjs/backstopjs:4.1.9
44
48
caches :
45
- - npm
49
+ - node
46
50
variables :
47
51
CI_BUILD_URL : $CI_PIPELINE_IID
48
52
CI_REPOSITORY_URL : $CI_MERGE_REQUEST_IID
49
53
ARTIFACTS_DIR_URL : https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/jobs/$CI_JOB_ID/artifacts
50
54
script :
51
- << : *bash_env
55
+ - *bash_env_cp
56
+ - *bash_env_source
52
57
- ./.ci/test/visual-regression/run
53
58
artifacts :
54
59
- backstop_data/**
@@ -57,7 +62,8 @@ default_steps: &default_steps
57
62
caches :
58
63
- composer
59
64
script :
60
- << : *bash_env
65
+ - *bash_env_cp
66
+ - *bash_env_source
61
67
- ./.ci/test/behat/initialize
62
68
# Start headless Chrome
63
69
- google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --no-sandbox </dev/null &>/dev/null &
@@ -74,8 +80,8 @@ options:
74
80
75
81
pipelines :
76
82
pull-requests :
77
- ' ** ' :
78
- << : *default_steps
83
+ # Using the default_steps anchor means no other items can be added
84
+ ' ** ' : *default_steps
79
85
branches :
80
- master :
81
- << : *default_steps
86
+ # Using the default_steps anchor means no other items can be added
87
+ master : *default_steps
0 commit comments