Skip to content

Instantly share code, notes, and snippets.

@leevigraham
Created February 7, 2017 03:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save leevigraham/5c2c722a07f03a533f0ef91c71e27f07 to your computer and use it in GitHub Desktop.
Save leevigraham/5c2c722a07f03a533f0ef91c71e27f07 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu
echo "steps:"
echo "
- label: \":hammer: dev\"
command: |-
source .env
composer install --verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction
npm install
./node_modules/bower/bin/bower install
mysql -u \$DB_USER -p\$DB_PASSWORD \$DB_NAME < craft/storage/backups/test.sql
bin/behat
"
if [[ "$BUILDKITE_BRANCH" == "master" && "$BUILDKITE_REPO" == *"github.com:newism"* ]]; then
echo "
- wait
- label: \":shipit: dev\"
command: |-
bin/dep deploy:feature dev --branch=\$BUILDKITE_BRANCH --revision=\$BUILDKITE_COMMIT -vv
- block: \":crystal_ball: Preview stage changes\"
branches: master
- label: \":thinking_face: :git: diff stage\"
branches: master
command: |-
bin/dep deploy:diff dev --branch=\$BUILDKITE_BRANCH --revision=\$BUILDKITE_COMMIT
- block: \":rocket: Deploy to stage\"
branches: master
- label: \":shipit: stage\"
branches: master
command: |-
bin/dep deploy stage --branch=\$BUILDKITE_BRANCH --revision=\$BUILDKITE_COMMIT -vv
- block: \":crystal_ball: Preview prod changes\"
branches: master
- label: \":thinking_face: :git: diff prod\"
branches: master
command: |-
bin/dep deploy:diff prod --branch=\$BUILDKITE_BRANCH --revision=\$BUILDKITE_COMMIT
- block: \":rocket: Deploy to prod\"
branches: master
- label: \":shipit: prod\"
branches: master
command: |-
bin/dep deploy prod --branch=\$BUILDKITE_BRANCH --revision=\$BUILDKITE_COMMIT -vv
"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment