2015-11-18 7 views
0

Я пытаюсь настроить Jenkins для моей команды, которая работает над проектами node.js. Мы использовали жасминовый узел для большинства наших проектов.Jenkins jasmine-node command не найден

У меня есть экземпляр jenkins, которым управляет другая группа в org, которая распознает узел и npm.

Я побежал «NPM установить -g жасмин-узел» в качестве одного задания Дженкинс и coonsole выход говорит, что успешна:

Building on master in workspace C:\.jenkins\workspace\ttm-closr 
> git rev-parse --is-inside-work-tree 
Fetching changes from the remote Git repository 
> git config remote.origin.url https://github.cerner.com/ApplicationServices/ttm-closr.git 
Fetching upstream changes from https://github.cerner.com/ApplicationServices/ttm-closr.git 
> git --version 
using .gitcredentials to set credentials 
> git config --local credential.helper store --file=\"C:\Temp\git2392678818489855660.credentials\" 
> git fetch --tags --progress https://github.cerner.com/ApplicationServices/ttm-closr.git +refs/heads/*:refs/remotes/origin/* 
> git config --local --remove-section credential 
> git rev-parse "origin/master^{commit}" 
Checking out Revision 2b8831b19eb22f5d38652ab0b2dd230e2e5cf5d8 (origin/master) 
> git config core.sparsecheckout 
> git checkout -f 2b8831b19eb22f5d38652ab0b2dd230e2e5cf5d8 
> git rev-list 2b8831b19eb22f5d38652ab0b2dd230e2e5cf5d8 
[ttm-closr] $ sh -xe C:\Temp\hudson1199475728575930889.sh 
+ npm install -g jasmine-node 
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\jasmine-node -> C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\jasmine-node\bin\jasmine-node 
[email protected] C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules\jasmine-node 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] 
├── [email protected] 
└── [email protected] ([email protected], [email protected]) 
Sending e-mails to: [email protected] 
Finished: SUCCESS 

Но когда я запускаю тесты жасмина в Дженкинс оболочки для работы с командой «Жасмин-узел». то сервер Дженкинс говорит, что команда жасмин-узел не найден, как показано ниже:

Building on master in workspace C:\.jenkins\workspace\ttm-closr 
> git rev-parse --is-inside-work-tree 
Fetching changes from the remote Git repository 
> git config remote.origin.url https://github.cerner.com/ApplicationServices/ttm-closr.git 
Fetching upstream changes from https://github.cerner.com/ApplicationServices/ttm-closr.git 
> git --version 
using .gitcredentials to set credentials 
> git config --local credential.helper store --file=\"C:\Temp\git7724050299130064334.credentials\" 
> git fetch --tags --progress https://github.cerner.com/ApplicationServices/ttm-closr.git +refs/heads/*:refs/remotes/origin/* 
> git config --local --remove-section credential 
> git rev-parse "origin/master^{commit}" 
Checking out Revision 2b8831b19eb22f5d38652ab0b2dd230e2e5cf5d8 (origin/master) 
> git config core.sparsecheckout 
> git checkout -f 2b8831b19eb22f5d38652ab0b2dd230e2e5cf5d8 
> git rev-list 2b8831b19eb22f5d38652ab0b2dd230e2e5cf5d8 
[ttm-closr] $ sh -xe C:\Temp\hudson2835855030225455242.sh 
+ jasmine-node . 
C:\Temp\hudson2835855030225455242.sh: line 2: jasmine-node: command not found 
Build step 'Execute shell' marked build as failure 
Sending e-mails to: [email protected] 
[BFA] Scanning build for known causes... 

[BFA] Done. 0s 
Finished: FAILURE 

Я не уверен, как установить жасмин-узел на коробке Дженкинс.

Должен ли я добавить jasmine-node в PATH для этого? Если да, как мне это сделать?

пожалуйста, сообщите,

благодаря

ответ

0

Я думаю, вы должны добавить НПМ бинарный файл в вашем пути. Найдите местонахождение ваших национальных двоичных файлов npm: npm config get prefix. Это, вероятно, что-то вроде C:\Users\username\AppData\Roaming\npm

Перейти к «Глобальные свойства -> Переменные среды» и добавить PATH со значением: $PATH:/C:/Users/username/AppData/Roaming/npm

 Смежные вопросы

  • Нет связанных вопросов^_^