Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ clean-drupal: clean-composer
# Targets for Bitbucket Pipelines
#

# Bootstrap scripts/make directory
pipelines-bootstrap:
./scripts/bootstrap-build-framework.sh

# Build Drupal under Pipelnes.
pipelines-build-drupal:
./scripts/make/install-drupal.sh
Expand Down
28 changes: 28 additions & 0 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ clone:
pipelines:
branches:
master:
- step:
name: Bootstrap
image: deeson/deployer
script:
- make pipelines-bootstrap
artifacts:
- 'scripts/make/**'
- step:
name: Build Drupal
image: wodby/drupal-php:7.1-2.4.3
Expand Down Expand Up @@ -39,6 +46,13 @@ pipelines:
script:
- make pipelines-deploy
develop:
- step:
name: Bootstrap
image: deeson/deployer
script:
- make pipelines-bootstrap
artifacts:
- 'scripts/make/**'
- step:
name: Build Drupal
image: wodby/drupal-php:7.1-2.4.3
Expand Down Expand Up @@ -74,6 +88,13 @@ pipelines:
script:
- make pipelines-deploy
UAT:
- step:
name: Bootstrap
image: deeson/deployer
script:
- make pipelines-bootstrap
artifacts:
- 'scripts/make/**'
- step:
name: Build Drupal
image: wodby/drupal-php:7.1-2.4.3
Expand Down Expand Up @@ -110,6 +131,13 @@ pipelines:
- make pipelines-deploy
tags:
'*':
- step:
name: Bootstrap
image: deeson/deployer
script:
- make pipelines-bootstrap
artifacts:
- 'scripts/make/**'
- step:
name: Build Drupal
image: wodby/drupal-php:7.1-2.4.3
Expand Down
13 changes: 10 additions & 3 deletions scripts/bootstrap-build-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ if [ ! -d "./make" ]; then
version=$(cat ./.dbf)
fi

docker run -v $(pwd):/app -w /app --env DBFVER=$version deeson/deployer /bin/bash \
-c 'git clone -b "$DBFVER" --single-branch --depth 1 https://github.com/teamdeeson/drupal-build-framework.git make \
DBFVER=$version
clone_script='git clone -b "$DBFVER" --single-branch --depth 1 https://github.com/teamdeeson/drupal-build-framework.git make \
&& cd ./make \
&& rm -Rf .git'
&& rm -Rf .git';

#If were not under pipelines, run in container, otherwise we're already in a container, run locally.
if [ -z "$CI" ]; then
docker run -v $(pwd):/app -w /app --env DBFVER=$version deeson/deployer /bin/bash -c "$clone_script"
else
eval "$clone_script"
fi
fi