我有Jenkins设置主人和一个奴隶。两台机器都是CentOS6。
在主环境中如下所示:
# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/default/bin:/root/bin
# rpmbuild --version
RPM version 4.4.2.3
# which rpmbuild
/usr/bin/rpmbuild
在奴隶环境中看起来像这样:
# echo $PATH
/usr/local/apache-maven-3.3.9/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
# rpmbuild --version
RPM version 4.8.0
# which rpmbuild
/usr/bin/rpmbuild
我正在使用rpm-maven-plugin版本2.1.5。当我在主服务器上运行目标为rpm:attached-rpm
的构建时,它运行良好。但是当我在奴隶上运行时,它失败了:
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.5:attached-rpm (default) on project netvizura-linux: Unable to build the RPM: Error while executing process. Cannot run program "rpmbuild" (in directory "/usr/jenkins/workspace/netvizura-linux/target/rpm/netvizura-linux/SPECS"): error=2, No such file or directory -> [Help 1]
我不明白我做错了什么。
答案 0 :(得分:0)
检查您是否在从属主机中安装了rpmbuild bin,并使用# yum install rpm-build -y