我正在尝试设置一个jenkin来在ubantu机器上构建maven android项目
Android SDK : android-sdk_r23.0.2-linux.tgz OS : ubantu Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre使用android SDK部署程序安装了android依赖项
如果我在命令行项目构建成功运行“mvn clean install”,但是如果我尝试使用jenkin作业,那么它会失败,因为它无法找到手动安装的jar。
jenkin用户匿名
试过以下仍然面临同样的问题:
我遇到了一个问题,我通过以下链接添加了一个新用户https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-12-04-andand -centos -6-
以root身份添加新用户的步骤:
sudo adduser jenkinadmin sudo /usr/sbin/visudo编辑如下文件在用户权限规范下添加用户名和root权限将授予他们sudo权限。
- #用户权限规范
root ALL=(ALL:ALL) ALL jenkinadmin ALL=(ALL:ALL) ALL按'cntrl x'退出文件,然后按'Y'保存
并将/ etc / default / jenkins文件JENKINS_USER更新为上面创建的新用户。 然后发出
chown -R jenkinadmin /var/log/jenkins chown -R jenkinadmin /var/lib/jenkins chown -R jenkinadmin /var/run/jenkins chown -R jenkinadmin /var/cache/jenkins然后重新启动Jenkins jenkins并使用ps命令检查用户是否已更改/etc/init.d/jenkins restart ps -ef | grep jenkins
我可以看到jenkin正在盯着同一个新用户,但我仍然得到相同的mave repo错误。
现在用以下命令sudo / usr / sbin / visudo编辑sudouser之后,我总是提示这个错误
“jenkinadmin不在sudoers文件中。此事件将被报告”
我也使用sudo apt-get install maven安装了maven,然后安装了maven
root@myBox:/etc# mvn -v Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00) Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-32-generic", arch: "amd64", family: "unix"I'm trying to setup a jenkin to build the maven android project on ubantu machine
Android SDK : android-sdk_r23.0.2-linux.tgz OS : ubantu Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jreInstalled the android dependency using the android SDK deployer
If i run the "mvn clean install" on command line project build successfully, but if i tried with a jenkin job it's failing because it's not able to find the manually installed jars.
jenkin user anonymous
Tried the following still facing the same issue:
I ran into a problem, I added a new user by following this link https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-12-04-and-centos-6
Steps to add a new user as root:
sudo adduser jenkinadmin sudo /usr/sbin/visudoEdit the file as below Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.
--#User privilege specification
root ALL=(ALL:ALL) ALL jenkinadmin ALL=(ALL:ALL) ALLPress ‘cntrl x’ to exit the file and then ‘Y’ to save it
and update the /etc/default/jenkins file JENKINS_USER to new user created above. then issue the
chown -R jenkinadmin /var/log/jenkins chown -R jenkinadmin /var/lib/jenkins chown -R jenkinadmin /var/run/jenkins chown -R jenkinadmin /var/cache/jenkinsThen restarted the Jenkins jenkins and check the user has changed using a ps command /etc/init.d/jenkins restart ps -ef | grep jenkins
I can see the jenkin is staring with the same new user, but still im getting the same mave repo error.
also after editing the sudouser with the below command sudo /usr/sbin/visudo now I'm alsways prompt with this error
"jenkinadmin is not in the sudoers file. This incident will be reported"
Also I've installed the maven using the sudo apt-get install maven and this install the maven on
root@myBox:/etc# mvn -v Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00) Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-32-generic", arch: "amd64", family: "unix"更多推荐
发布评论