Tag: jenkins

Jenkins上的npm / nodejs

我试图让npm / nodejs在Jenkins(v2.32.3)上工作,但在将Nodejs插件从版本0.2.2升级到1.1.2之后出现问题。 我已经手动下载了Nodejs,并将其解压到/etc/nodejs/node-v6.9.4-linux-x64 ,并在Global Tool Configuration(全局工具configuration)中进行了configuration。 我有一个简单的工作(Execute shell): echo $PATH whoami npm –version node –version 结果是: [EnvInject] – Loading node environment variables. Building in workspace /var/lib/jenkins/jobs/test- nodejs_test/workspace [workspace] $ /bin/sh -xe /tmp/hudson1755936462393481437.sh + echo /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + whoami jenkins + npm –version /tmp/hudson1755936462393481437.sh: 4: /tmp/hudson1755936462393481437.sh: npm: not found Build step 'Execute shell' marked build […]

如何解决错误:在运行Karma时产生Jenkins上的EACCES?

我已经设置了AWS Codepipeline。 该pipe道使用Git作为源,Jenkins进行testing,并使用EC2实例进行部署。 该项目是基于Angular Class的Angular Starter 。 因此,它使用Karma进行unit testing。 Jenkins服务在Ubuntu 16.04上运行。 Karma使用Headless Chrome进行testing。 问题是我目前在Jenkins上运行testing时遇到以下错误: [31m07 05 2017 14:30:35.779:ERROR [karma]: [39m{ Error: spawn EACCES at exports._errnoException (util.js:1050:11) at ChildProcess.spawn (internal/child_process.js:319:11) at exports.spawn (child_process.js:378:9) at spawnWithoutOutput (/var/lib/jenkins/workspace/ExampleTask/node_modules/karma/lib/launchers/process.js:168:24) at Object.ProcessLauncher._execCommand (/var/lib/jenkins/workspace/ExampleTask/node_modules/karma/lib/launchers/process.js:76:21) at Object.ProcessLauncher._start (/var/lib/jenkins/workspace/ExampleTask/node_modules/karma/lib/launchers/process.js:33:10) at Object.<anonymous> (/var/lib/jenkins/workspace/ExampleTask/node_modules/karma/lib/launchers/process.js:19:10) at emitOne (events.js:101:20) at Object.emit (events.js:191:7) at Object.BaseLauncher.start (/var/lib/jenkins/workspace/ExampleTask/node_modules/karma/lib/launchers/base.js:42:10) at Object.j […]

如何避免通过SauceLabs远程下载文件时的“另存为”提示

从Jenkins作业运行的量angular器规格,连接到SauceLabs。 它点击一个button来下载PDF,并检查文件是否成功下载。 我无法使Chrome浏览器使用绝对path打开“另存为”提示。 如果我使用'~/Downloads'作为filename ,但是我的browser.wait等待文件存在永远挂起,我可以避免“另存为”提示。 // spec.js import fs from 'fs' import path from 'path' fs.mkdirSync('./downloads') describe('Clicking DOWNLOAD button', () => { it('should download a proposal', () => { const filename = path.resolve(__dirname, './downloads/proposal.pdf') if (fs.existsSync(filename)) { fs.unlinkSync(filename) } page.downloadProposalBtn.click() browser.wait(() => fs.existsSync(filename), 180000) .then(() => { expect(fs.existsSync(filename)).toBe(true) }) }, 180000) }) 以下是我的conf文件的相关部分。 我期望的prompt_for_download设置,使提示不显示,但它.. // […]

Jenkins在Azure上部署NodeJS应用程序

首先,这是我第一次和jenkins合作。 我想让Jenkins构build我的NodeJS应用程序并将其部署到Azure。 我可以通过bitbucket成功地触发我的构build,我可以成功地将我的后构build设置为“发布Azure Web应用程序”。 所以,我不知道该怎么做的事情,是build设的步骤。 我认为我应该创造一个神器,但我找不到合适的文件。 非常感谢帮助。

无法在jenkins上为节点应用程序构build作业

我使用节点版本4.4.5和npm版本是5.3.0。 jenkins版本是2.46.2。 在构build时,我得到这个exception: /bin/sh -xe /tmp/hudson7756731843340614304.sh + PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin + npm install /tmp/hudson7756731843340614304.sh: 6: /tmp/hudson7756731843340614304.sh: npm: not found构build步骤'Execute shell'标记为失败 The execute shell consist of: #echo "PATH is :$PATH" #echo "node version is :'node -v' " #echo "npm version is:'npm -v' " PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin npm install npm run coverage zip -r EngagementSystemNodeApi.zip . 需要做什么PLZbuild议。

如何不让npm安装失败

我正在使用grunt和Jenkins来远程构build我的项目。 目前“npm install”步骤有时可能会失败,我宁愿忽略这个失败,因为某些types的构build只需要一些包。 显示的错误是: npm ERR! Error: No compatible version found: … npm ERR! System Linux 3.5.0-21-generic npm ERR! node -v v0.11.2 npm ERR! npm -v 1.2.21 我build立在一个Linux的框,我有一些插件只能在OSX上工作,但我不需要他们来构buildWeb目标,这就是我现在正在build立的。 有没有办法强制名义报告好,即使它不能完成安装?

nodejs插件为Jenkinsconfiguration问题上的dalek问题

我们正试图在Jenkins的Windows机器上运行dalek。 我们在Windows机器上安装了nodejs二进制文件。 我们在Jenkins上安装了nodejs插件。 当我们运行我们的工作时,我们得到这个错误: [Test] $ C:\Windows\TEMP\hudson1848754731046994976.js FATAL: command execution failed java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson1848754731046994976.js" (in directory "C:\jenkins\workspace\Test"): CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:763) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at […]

e2e与jenkins,selenium网格和量angular器testing

我正在尝试使用Jenkins,Selenium和Protractor来构build我的testing环境。 我决定使用selenium插件(selenium网格)在远程机器(节点)之间调度testing。 我到目前为止所取得的成就是build立selenium中枢与节点之间的联系。 Jenkins上安装的Node.js版本是5.12.0,量angular器是3.3.0。 我还安装了npm chromedriver并在protractor.config.js中设置了这个驱动程序的path,如下所示: chromeDriver: '/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/chromedriver/bin/chromedriver' 节点正在运行selenium独立服务器,全局安装npm。 当我执行我的protractor.config.js文件时,我有以下错误: protractor /u01/apps/jenkins/data/workspace/Servers/testApp/protractor.conf.js [14:49:08] I/direct – Using ChromeDriver directly… [14:49:08] I/launcher – Running 1 instances of WebDriver /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329 return callbackFn(this.value_); ^ Error: Server terminated early with status 127 at Error (native) at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:210:20 at Promise.invokeCallback_ (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14) at TaskQueue.execute_ (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14) at TaskQueue.executeNext_ (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21) at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2652:27 at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7 […]

根在项目目录中找不到gulp命令

我目前的任务是做一个Jenkins的工作,下载一个git仓库,将会build立一个项目,并最终将数据同步到一个S3存储桶。 我的麻烦是用root找不到的gulp build命令。 我阅读了关于在全球安装nvm的文章,并在使用之后: wget -qO- https://raw.githubusercontent.com/xtuple/nvm/master/install.sh | sudo bash 能够安装nvm到/ usr / local / nvm。 在项目目录(/ var / lib / jenkins / project)中运行: sudo /usr/local/bin/npm install 所有模块都转到project dir中的node_modules dir。 那我呢: sudo gulp build –env=production sudo: gulp: command not found 它看起来像根无法find吞咽 。 在node_modules / gulp / bin里面有一个gulp.js文件,但我不知道如何使用它。 那么我怎么才能让root为root工作呢? 以前我用一个普通的用户轻微的努力安装和build立项目,我知道项目是好的,问题performance在切换到根后。 我的工作环境是具有node.js版本4.4.7的Amazon Linux。 这些都是我的第一步,就是把nvm,gulp和node.js作为一个整体,所以请不要太苛刻,如果我做的事显然是愚蠢的。

jenkins:npm安装失败,没有sudo

我需要执行npm install命令而不使用sudo,但是当我试图执行这个命令时,我的Jenkins作业中出现了这个错误,这是错误控制台消息: + npm install npm WARN grunt-bump@0.8.0 requires a peer of grunt@>=1.0.1 but none was installed. npm WARN Site_mmm@0.0.1 No repository field. npm WARN Site_mmm@0.0.1 No license field. npm ERR! Linux 3.13.0-32-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v5.1.0 npm ERR! npm v4.0.2 npm ERR! path /var/lib/jenkins/workspace/mmm/node_modules/.staging npm ERR! code EACCES […]