Skip to content

Commit 514966d

Browse files
author
composer-lock-update
committed
Set CI_BRANCH to master if BITBUCKET_BRANCH is not defined
1 parent 57cca35 commit 514966d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

bitbucket-pipelines.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# These are yaml anchors, reused later
22
x-bash-env-steps:
3-
- &bash_env_export export BASH_ENV="$HOME/.bashrc"
4-
- &bash_env_cp cp bash_env.txt $BASH_ENV
3+
- &bash_env_export export BASH_ENV="$BITBUCKET_CLONE_DIR/.bashrc"
54
- &bash_env_source source $BASH_ENV
65

76
# This is a larger yaml anchor, reused for each pipeline
@@ -10,19 +9,17 @@ default_steps: &default_steps
109
name: Configure Environment Variables
1110
script:
1211
- *bash_env_export
13-
- CI_BRANCH=$BITBUCKET_BRANCH CI_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER PR_NUMBER=$BITBUCKET_PR_ID
12+
- CI_BRANCH=${BITBUCKET_BRANCH:-master} CI_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER PR_NUMBER=$BITBUCKET_PR_ID
1413
- /build-tools-ci/scripts/set-environment
15-
- cp $BASH_ENV bash_env.txt
1614
artifacts:
17-
- bash_env.txt
15+
- .bashrc
1816
- parallel:
1917
- step:
2018
name: Static Tests
2119
caches:
2220
- composer
2321
script:
2422
- *bash_env_export
25-
- *bash_env_cp
2623
- *bash_env_source
2724
- ./.ci/test/static/run
2825
- step:
@@ -31,7 +28,6 @@ default_steps: &default_steps
3128
- composer
3229
script:
3330
- *bash_env_export
34-
- *bash_env_cp
3531
- *bash_env_source
3632
- ./.ci/build/php
3733
artifacts:
@@ -41,7 +37,6 @@ default_steps: &default_steps
4137
name: Deploy to Pantheon
4238
script:
4339
- *bash_env_export
44-
- *bash_env_cp
4540
- *bash_env_source
4641
- ./.ci/deploy/pantheon/dev-multidev
4742
artifacts:
@@ -58,7 +53,6 @@ default_steps: &default_steps
5853
ARTIFACTS_DIR_URL: https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/jobs/$CI_JOB_ID/artifacts
5954
script:
6055
- *bash_env_export
61-
- *bash_env_cp
6256
- *bash_env_source
6357
- ./.ci/test/visual-regression/run
6458
artifacts:
@@ -69,7 +63,6 @@ default_steps: &default_steps
6963
- composer
7064
script:
7165
- *bash_env_export
72-
- *bash_env_cp
7366
- *bash_env_source
7467
- ./.ci/test/behat/initialize
7568
# Start headless Chrome

0 commit comments

Comments
 (0)