Friday, 20 November 2015

codeship build error (follow my previous post)



I have another post for explaining how to use codeship with heroku for CIT.

http://baiduhix.blogspot.co.uk/2015/06/codeship-heroku-cicd-continuously.html

But i have to say that we are using free account from codeship and heroku, so when they got new features to test, they will use our project to test and that will broken our build very badly!!!

yesterday i found an issue:

with the solution and build script from "http://baiduhix.blogspot.co.uk/2015/06/codeship-heroku-cicd-continuously.html" my build run smoothly, but heroku app always down.

And i finally found that, codeship haven't push "/dist" to heroku.

The reason is codeship changed their git push heroku from:



to :





so we have to change the script to:

 By default we use the Node.js version set in your package.json or 0.10.25
# You can use nvm to install any Node.js version.
# i.e.: nvm install 0.10.25
# This is to get compass on the server
# rvm use 2.0.0-p195
rvm use ruby-2.1.2
bundle install
# nvm install 0.10.32
# nvm use 0.10.32
npm install
npm install bower -g
bower install
# Install grunt-cli for running your tests or other tasks
npm install grunt-cli
grunt build
#below code are used to remove .gitignore to push output into heroku.
ls -la dist/
rm -f .gitignore
ls -la
pwd
git config --global user.email "herokukiller@f.com"
git config --global user.name "herokukiller"
git add --all
git commit -m "remove .gitignore"
export COMMIT_ID=`git rev-parse HEAD`
export CI_COMMIT_ID=`git rev-parse HEAD`






No comments:

Post a comment