git - Jenkins continuous deployment error -
i learning jenkins ci test & deploy stated in excellent tutorial http://code.tutsplus.com/tutorials/setting-up-continuous-integration-continuous-deployment-with-jenkins--cms-21511
at end of tutorial, should handle deployment of app... per deploy script , jenkins project config w ./script/deploy
#!/bin/sh ssh app@my.server.ip <<eof cd ~/hello-jenkins git pull npm install --production forever restartall exit eof
the testing ok, deployment raises error on git pull
. should git commit -f
before git pull
?
error: local changes following files overwritten merge: app.js
which listed in jenkins console output. don't understand why...
./script/test / ✓ respond hello jenkins (41ms) 1 passing (56ms) + ./script/deploy pseudo-terminal not allocated because stdin not terminal. welcome ubuntu 14.04.2 lts (gnu/linux 3.13.0-52-generic x86_64) * documentation: https://help.ubuntu.com/ system information of sat jun 13 06:32:35 edt 2015 system load: 0.0 processes: 74 usage of /: 9.1% of 19.56gb users logged in: 0 memory usage: 25% ip address eth0: 46.101.165.112 swap usage: 0% graph data , manage system at: https://landscape.canonical.com/ 38 packages can updated. 17 updates security updates. updating 784e256..a4095a8 error: local changes following files overwritten merge: app.js please, commit changes or stash them before can merge. aborting [32minfo[39m: forever restarted processes: [90mdata[39m: [37m [39m [37muid[39m [90mcommand[39m [90mscript[39m [37mforever[39m [37mpid[39m [37mid[39m [35mlogfile[39m [33muptime[39m [90mdata[39m: [0] uvyu [90m/usr/local/bin/node[39m [90mapp.js[39m 4271 13896 [35m/home/app/.forever/uvyu.log[39m [33m0:0:1:42.664[39m finished: success
you met error because edited app.js
file locally. if execute command git pull
, git pull latest update remote server , result, action overwrite local version, git throw out error message:
error: local changes following files overwritten merge: app.js
you can either commit local changes issuing commands:
git add . git commit -m "some msg here"
or if don't want commit local changes, can temporarily save local changes issuing command:
git stash
after quick read link pasted, believe in case, should choose git commit
rather git stash
.
Comments
Post a Comment