Ich richte einen Ubuntu-Server, der Jenkins für CI hat.Jenkins Build fehlgeschlagen auf Npm installieren
Wenn ich versuche, einen Build I Ausfall
Frage erhalten auszuführen: Wie kann ich npm install
Arbeit von meinem jenkins Job?
build 1:
[morningharwood] $ /bin/sh -xe /tmp/hudson8925730298288495807.sh
+ pwd
/var/lib/jenkins/workspace/morningharwood
+ ls
bower.json
client
e2e
Gruntfile.js
karma.conf.js
package.json
protractor.conf.js
server
+ npm install
/tmp/hudson8925730298288495807.sh: 5: /tmp/hudson8925730298288495807.sh: npm: not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Jenkin bauen
UPDATE:
~$ pwd
/home/ubuntu
ls -a
. .bash_history .bashrc .config .gem .gnupg .node-gyp .nvm .rbenv .ssh .viminfo
.. .bash_logout .cache .dotfiles .gemrc .local .npm .profile .rvm .vim
Jetzt, wo ich die .npm
+ /home/ubuntu/.npm/npm install
/tmp/hudson1456103398115324880.sh: 5: /tmp/hudson1456103398115324880.sh: /home/ubuntu/.npm/npm: not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Konfigurationsskript:
Was passiert, wenn Sie von SSH-Terminal laufen?
npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.11.14","npm":"2.0.0"})
npm ERR! Linux 3.13.0-36-generic
npm ERR! argv "/home/ubuntu/.nvm/v0.11.14/bin/node" "/home/ubuntu/.nvm/v0.11.14/bin/npm" "install"
npm ERR! node v0.11.14
npm ERR! npm v2.0.0
npm ERR! path /var/lib/jenkins/workspace/morningharwood/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/var/lib/jenkins/workspace/morningharwood/node_modules'
...
So Chown Ich habe den Ordner:
+ pwd
/var/lib/jenkins/workspace/morningharwood
sudo chown ubuntu /var/lib/jenkins/workspace/morningharwood/ -Rv
...
Ran npm nach diesem npm installieren installieren
Es war erfolgreich!
NEUES PROBLEM: Mein Build schlägt fehl, wenn ich versuche, das Repository von GitHub über Jenkins zu klonen.
Console log
Started by user matthew harwood
Building in workspace /var/lib/jenkins/workspace/morningharwood
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url [email protected]:matthewharwood/morningharwood.git # timeout=10
ERROR: Error fetching remote repo 'origin'
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
Zeigen Besitzer:
ls -la
drwxr-xr-x 3 jenkins jenkins 4096 Dec 26 20:31 .
drwxr-xr-x 13 jenkins jenkins 4096 Dec 26 08:23 ..
drwxr-xr-x 7 ubuntu jenkins 4096 Dec 26 20:59 morningharwood
Hey Mann vielen Dank für die Hilfe! Ich habe es niedergebrannt und wieder angefangen. Ich erstelle den Job gerade neu. Wird bald aktualisiert! –
Ausgezeichnet ausgearbeitet! vielen Dank! hey ich habe das selbe problem aber mit ruby jetzt lol ich bin furchtbar. http://stackoverflow.com/questions/27670407/set-up-ruby-globally-for-all-users-on-ubuntu –
"Es sieht aus wie Sie Knoten 0.11 verwenden. Warum?" Was für eine Frage. Wie kann jemand einen bestimmten Grund haben, 0,11 zu verwenden? Erwarten Sie wirklich eine Antwort dafür? – eyurdakul