Tag: jenkins plugins

如何使用jenkinspipe道与nvm包装插件?

我正在使用pipe道( Jenkinsfile ),我需要更改节点版本。 我添加了Nvm包装插件,但我不知道如何正确使用它从Jenkinsfile 我应该在steps添加nvm('…') {}吗? 或者它应该在node步骤的顶层? 目前我甚至没有node步骤 – 一切都使用sh完成

grunt在安装nodejs之后在jenkins中是不能识别的

我想在jenkins(ubuntu)中运行grunt,我已经安装了nodejs插件,然后重新启动了jenkins。 我创build了自己的工作,并在Build Environment中将Build Node和npm bin /文件夹设置为PATH 然后在Execute shell中运行npm –version出售我的输出是+ npm –version 1.4.9 ,但如果我运行grunt –version ,我的输出是grunt: not found 。 我也尝试在Windows中,在这种情况下,我没有安装nodejs插件,我安装了一切从bash命令行。 在这种情况下,我从jenkins节点和npm这一点: C:\Program Files (x86)\Jenkins\jobs\test-jenkins\workspace>node –version v0.10.29 C:\Program Files (x86)\Jenkins\jobs\test-jenkins\workspace>npm –version 1.4.14 并再次为grunt: C:\Program Files (x86)\Jenkins\jobs\test-jenkins\workspace>grunt 'grunt' is not recognize as a command or a bash file

无法在运行时在Jenkins中安装NodeJS

全局configurationNodeJS 在运行时,它显示“找不到节点命令…”

Jenkins和NodeJS插件 – 权限被拒绝错误= 13

我正在运行最新版本的Jenkins (v 1.563)和Node (0.10.28) 。 我有一个良好的Java项目。 当我添加一个预编译步骤作为节点脚本(与提供节点&npm bin /文件夹PATH选中),我得到以下错误,虽然我已经给所有的东西(节点,tomcat,jenkins)777权限。 FATAL: command execution failed java.io.IOException: Cannot run program "/home/sam/Apps/apache-tomcat-8.0.5/temp/hudson5090518537487301688.js" (in directory "/home/sam/.jenkins/jobs/WhiteSwan/workspace"): error=13, Permission Denied…. 构build步骤“执行NodeJS脚本”标记为失败。 当我删除nodejs步骤,它build立良好。 我的脚本很简单, node –version grunt –version bower –version 完整的错误: Checking out Revision e90d7b870646165dba30bd1a663644c0292e9844 (origin/master) > git config core.sparsecheckout > git checkout -f e90d7b870646165dba30bd1a663644c0292e9844 > git rev-list e90d7b870646165dba30bd1a663644c0292e9844 [workspace] $ /home/sam/Apps/apache-tomcat-8.0.5/temp/hudson5090518537487301688.js […]

Jenkinspipe道:selectnodejs版本(+ python版本)

我正在Jenkins文件中面临Jenkinspipe道的问题。 我的Jenkins实例上有4个不同的nodeJs版本。 我想select我要在我的pipe道中使用哪一个,但官方插件示例( https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin )根本不起作用。 我尝试了第一种方法,失败了,因为$ PATH被tools部分覆盖。 pipeline { agent any tools { // I hoped it would work with this command… nodejs 'nodejs6' } stages { stage('Example') { steps { sh 'npm –version' // Failed saying : // Running shell script //nohup: failed to run command 'sh': No such file or directory } } […]

jenkins与Grunt整合

我已经在Windows Server 2008 R2上安装了Jenkins v1.550。 它现在作为服务在http://localhost:8080运行。 我以pipe理员身份login到计算机。 我已经安装Node.js,并可以从命令行运行“npm”。 我还为Jenkins安装了NodeJS插件v0.2.1。 然后进入Jenkins的Configure System部分,滚动到NodeJS安装,点击Add NodeJSbutton,给出“NodeJS”作为名称,“C:\ Program Files \ nodejs”作为安装目录的path。 我没有检查“自动安装”选项,因为我在插件页面上阅读,它只能用于Linux。 然后我创build了一个新的工作,点击“提供Node&npm bin /文件夹到PATH”checkbox,为“执行Windows批处理命令”创build了一个新的构build步骤,并在“node –version”和“grunt – 版本“并保存。 我跑了这个工作,这是输出 – Building in workspace C:\Program Files (x86)\Jenkins\workspace\Test_1.0 [Test_1.0] $ cmd /c call C:\Windows\TEMP\hudson1381541243088903083.bat C:\Program Files (x86)\Jenkins\workspace\Test_1.0>node –version v0.10.24 C:\Program Files (x86)\Jenkins\workspace\Test_1.0>grunt –version 'grunt' is not recognized as an internal or external […]