From 41d8d8cf3206574558ef0265c1ae4a09404729c4 Mon Sep 17 00:00:00 2001 From: Daniel Montgomery Date: Wed, 18 May 2016 10:28:22 -0500 Subject: [PATCH] Revert "Removing branch argument from deploy tasks." --- .travis.yml | 2 +- template/.travis.yml | 4 ++-- template/build/core/phing/tasks/deploy.xml | 11 +++++------ template/scripts/deploy/travis-deploy.sh | 5 +++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index ae2e050fb..45585d51a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ script: - ../bolted8/bolt.sh build:validate:test -Dbehat.run-server=true -Dbehat.launch-phantom=true # Deploy build artifact. - export DEPLOY_PR=true - - ../bolted8/scripts/deploy/travis-deploy.sh 8.x + - ../bolted8/scripts/deploy/travis-deploy.sh 8.x 8.x-build # Validate and run 'bolt' phpunit tests. - phpcs --standard=../bolted8/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml tests - phpunit tests diff --git a/template/.travis.yml b/template/.travis.yml index 1f7f1a3ef..0e868eb62 100644 --- a/template/.travis.yml +++ b/template/.travis.yml @@ -53,6 +53,6 @@ script: after_success: # Watch for successful build job on `master` branch; deploy to `master-build`. - # - scripts/deploy/travis-deploy.sh master + # - scripts/deploy/travis-deploy.sh master master-build # Watch for successful build job on `develop` branch; deploy to `develop-build`. - # - scripts/deploy/travis-deploy.sh develop + # - scripts/deploy/travis-deploy.sh develop develop-build diff --git a/template/build/core/phing/tasks/deploy.xml b/template/build/core/phing/tasks/deploy.xml index b2020ce35..a9651f169 100644 --- a/template/build/core/phing/tasks/deploy.xml +++ b/template/build/core/phing/tasks/deploy.xml @@ -2,15 +2,16 @@ - + + - You must pass deploy.commitMsg as a runtime parameter. + You must pass deploy.branch and deploy.commitMsg as runtime parameters. - + @@ -38,10 +39,8 @@ - - + - diff --git a/template/scripts/deploy/travis-deploy.sh b/template/scripts/deploy/travis-deploy.sh index 261cbbcb7..06b836951 100755 --- a/template/scripts/deploy/travis-deploy.sh +++ b/template/scripts/deploy/travis-deploy.sh @@ -3,7 +3,7 @@ # What does this script do? # This script will watch for a Travis build on a specific # $source_branch on the canonical GitHub repository and deploy build artifacts -# to [source-branch]-build on the git.remote specified in project.yml. +# to $dest_branch on the git.remote specified in project.yml. # How to use this script? # This script should be executed in the `after_success` section of .travis.yml. @@ -11,6 +11,7 @@ # `scripts/deploy/travis-deploy.sh master master-build` source_branch=$1 # The branch to watch. +dest_branch=$2 # The branch to which the build artifact should be committed and deployed. DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # Note that the canonical repository is watched. Commits to forked repositories @@ -26,7 +27,7 @@ if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] || [[ "${DEPLOY_PR}" = "true" ]]; echo "Build artifact will be deployed." commit_msg="Automated commit by Travis CI for Build #${TRAVIS_BUILD_ID}"; # Call the `deploy` Phing target, passing in required parameters. - ${DIR}/../../bolt.sh deploy:artifact -Ddeploy.commitMsg="${commit_msg}"; + ${DIR}/../../bolt.sh deploy:artifact -Ddeploy.branch="${dest_branch}" -Ddeploy.commitMsg="${commit_msg}"; else echo "Build artifact will NOT be deployed for this branch." fi