-1

我有一个主人和一个奴隶的詹金斯设置。两台机器都是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。当我在 master 上以目标运行构建时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]

我不明白我做错了什么。

4

1 回答 1

2

检查您是否在从属主机中安装了 rpmbuild bin,安装# yum install rpm-build -y

于 2016-11-05T23:25:49.157 回答