我運行的CloudBees有以下預編譯腳本配置:問題與NPM包裝中已安裝在CloudBees的
# install nodejs, if using cloudbees
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.11.1 source ./use-node
# install phantomjs, karma
npm cache clean
[ -d node_modules/phantomjs ] || npm install phantomjs
[ -d node_modules/karma ] || npm install karma
[ -d node_modules/karma-junit-reporter ] || npm install karma-junit-reporter
[ -d node_modules/karma-phantomjs-launcher ] || npm install karma-phantomjs-launcher
[ -d $HOME/bin ] || mkdir $HOME/bin
[ -f $HOME/bin/karma ] || ln -s /scratch/jenkins/addons/node/$node_name/bin/karma $HOME/bin/karma
[ -f $HOME/bin/node ] || ln -s /scratch/jenkins/addons/node/$node_name/bin/node $HOME/bin/node
以下是錯誤我得到:
[bignibou-unit] $ /bin/sh -xe /tmp/hudson1843348359516925007.sh
+ curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
+ NODE_VERSION=0.11.1
+ source ./use-node
++ [[ -z 0.11.1 ]]
++ set -e
++ mkdir -p /scratch/jenkins/addons/node
+++ uname -m
++ ARCH=x86_64
++ node_name=node-0.11.1-x86_64
++ test -f /scratch/jenkins/addons/node/node-0.11.1-x86_64.tar.bz2
++ test -f /scratch/jenkins/addons/node/node-0.11.1-x86_64/bin/node
++ export PATH=/scratch/jenkins/addons/node/node-0.11.1-x86_64/bin:/opt/maven/latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ PATH=/scratch/jenkins/addons/node/node-0.11.1-x86_64/bin:/opt/maven/latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
+ npm cache clean
+ '[' -d node_modules/phantomjs ']'
+ '[' -d node_modules/karma ']'
+ '[' -d node_modules/karma-junit-reporter ']'
+ '[' -d node_modules/karma-phantomjs-launcher ']'
+ '[' -d /home/jenkins/bin ']'
+ '[' -f /home/jenkins/bin/karma ']'
+ ln -s /scratch/jenkins/addons/node/node-0.11.1-x86_64/bin/karma /home/jenkins/bin/karma
ln: failed to create symbolic link `/home/jenkins/bin/karma': File exists
Build step 'Execute shell' marked build as failure
[bignibou-unit] $ /bin/sh -xe /tmp/hudson7240697467917683493.sh
Finished: FAILURE
讓我感到震驚的是,在我的cloudbees未被提供之前,這個配置曾經很好地工作。任何人都可以幫忙嗎?
謝謝。我應該在哪裏插入這一行? – balteo