Skip to content

Commit

Permalink
fix staging/development environment deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Apr 1, 2015
1 parent b767f03 commit 949ebf2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -6,4 +6,4 @@ env:
global:
- TERM=dumb
- GRADLE_OPTS="-Xmx768m -Xms256m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled"
- secure: NbmlUtXZdc6c48RfvgWrdl0R9PG4mJBziYQ9vfwqIZI9vDfH7nZ+LSLlJgQpgBp/VTi7VPCulUqlZWz8OLJIQ5E9k+iRhgSI2eiBszQjytFl55yQLTcwK+Yy88gDk8tB2uRbAuAR1xMcfgMVREGpuebeqw7zz66Q149xPGl+cAY=
- secure: CFwWLeLqRIZr4IQXJppe/OYojYTtuddrtz6ZEzCkQwcL/oGPJPomK0Sg4auAS4MrYQN+W8idBWyDvje+HOtwC6ApKjpKqFwfDZbYAbUYnGsZ+ucR+pCjh47ymIgPCjj21jYA1j/azbVu18OsWvq8kw75yLGW9WspNeu4JbPwHh0=
Binary file modified cf-deploy-war.tar.gz.gpg
Binary file not shown.
3 changes: 2 additions & 1 deletion cf-deploy.gradle.properties.gpg
@@ -1 +1,2 @@
� ���yh�`�q� .�^|-\���jӝ\�'��F����ߢ�I�,y�q`�_�� �ճ?#��,y���4���QG�~����:@☬�|"w�J���P�eK3h;��8�亗�GK�㢨���
� ���c|p�`�n*J>1jP�X����][%>e2��=�Z"Z�|j!�U�Ig�Ik��9[�w,b^���.RN��-a����AjC��]
k���X�5���/d?�5���e��8=R22a,,f��?
Expand Down
8 changes: 6 additions & 2 deletions travis-build.sh
Expand Up @@ -11,11 +11,13 @@ deploy_to_cf() {
fi
if [[ $CF_SPACE == production ]]; then
DEPLOY_ARGS="-Pprod"
GRADLE_TASK="cfDeploy"
else
DEPLOY_ARGS=""
GRADLE_TASK="cfPush"
fi
gradle_cf_deploy="gradle -b cf-deploy.gradle $DEPLOY_ARGS"
$gradle_cf_deploy cfDeploy
$gradle_cf_deploy $GRADLE_TASK
GIT_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)"
CF_DEPLOY_IN_COMMIT=1
echo "$GIT_COMMIT_MSG" | grep '\[cf-deploy\]' || CF_DEPLOY_IN_COMMIT=0
Expand All @@ -40,9 +42,11 @@ deploy_to_cf() {
if [[ ( $TRAVIS_BRANCH == master || $TRAVIS_TAG == prod_* ) && $TRAVIS_REPO_SLUG == "grails-samples/grails-website"
&& $TRAVIS_PULL_REQUEST == 'false' ]]; then
./grailsw war --non-interactive
if [ -n "$CF_FILES_CRYPT_KEY" ]; then
set +x
if [[ -n $CF_FILES_CRYPT_KEY ]]; then
./travis-decrypt-files.sh
fi
set -x
# push to production if commit is tagged with tag starting with prod_
if [[ $TRAVIS_TAG == prod_* ]]; then
deploy_to_cf production
Expand Down

0 comments on commit 949ebf2

Please sign in to comment.