Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Find an rpm artifact

Bryan Andrews April 9, 2015

I have a bamboo job that pulls a git repo and successfully builds an RPM. However I can't figure out how to get the bamboo job to recognize the RPM artifact correctly.

Here is the successful RPM creation via script:

09-Apr-2015 19:09:59Wrote: /home/jira/rpmbuild/RPMS/noarch/project-1.3.3-1.noarch.rpm
09-Apr-2015 19:09:59Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.mzy1wM
09-Apr-2015 19:09:59+ umask 022
09-Apr-2015 19:09:59+ cd /home/jira/rpmbuild/BUILD
09-Apr-2015 19:09:59+ cd project-1.3.3
09-Apr-2015 19:09:59+ /usr/bin/rm -rf /home/jira/rpmbuild/BUILDROOT/project-1.3.3-1.x86_64
09-Apr-2015 19:09:59+ exit 0
09-Apr-2015 19:09:59Unable to publish artifact [project RPM]: null

 

Here is the job artifact settings:

  • Location: /home/jira/rpmbuild/RPMS/noarch/
  • Copy Pattern: *.rpm 

 

Any idea what I'm doing wrong?

4 answers

1 accepted

2 votes
Answer accepted
Bryan Andrews April 13, 2015

I was able to resolve this by adding this line to the end of the build script:

 

cp project-*.rpm ${bamboo_build_working_directory}

 

The Bamboo plan artifacts section can only look in the 

${bamboo_build_working_directory} directory or relative to it. 
0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 13, 2015

try to use Ant pattern to copy rpm resource from all folders: **/*.rpm

0 votes
Bryan Andrews April 10, 2015
10-Apr-2015 08:59:22
looking at /home/jira/rpmbuild/RPMS/noarch

10-Apr-2015 08:59:22
total 12K

10-Apr-2015 08:59:22
drwxr-xr-x. 2 jira jira   43 Apr 10 08:59 .

10-Apr-2015 08:59:22
drwxr-xr-x. 3 jira jira   19 Apr  9 19:00 ..

10-Apr-2015 08:59:22
-rw-r--r--. 1 jira jira 8.7K Apr 10 08:59 project-1.3.3-1.noarch.rpm

10-Apr-2015 08:59:22
looing at home

10-Apr-2015 08:59:22
total 32K

10-Apr-2015 08:59:22
drwx------. 6 jira jira 4.0K Apr 10 08:53 .

10-Apr-2015 08:59:22
drwxr-xr-x. 5 root root   41 Mar 13 14:36 ..

10-Apr-2015 08:59:22
-rw-------. 1 jira jira  162 Mar 13 22:33 .bash_history

10-Apr-2015 08:59:22
-rw-r--r--. 1 jira jira   18 Sep 25  2014 .bash_logout

10-Apr-2015 08:59:22
-rw-r--r--. 1 jira jira  193 Sep 25  2014 .bash_profile

10-Apr-2015 08:59:22
-rw-r--r--. 1 jira jira  231 Sep 25  2014 .bashrc

10-Apr-2015 08:59:22
drwxr-xr-x. 3 jira jira   18 Mar 13 23:01 .java

10-Apr-2015 08:59:22
drwxr-----. 3 jira jira   18 Apr  9 18:54 .pki

10-Apr-2015 08:59:22
drwxr-xr-x. 8 jira jira   83 Apr  9 19:00 rpmbuild

10-Apr-2015 08:59:22
drwx------. 2 jira jira    6 Mar 13 22:41 .ssh

10-Apr-2015 08:59:22
-rw-r--r--. 1 jira jira 8.7K Apr 10 08:59 project-1.3.3-1.noarch.rpm

10-Apr-2015 08:59:22
Unable to publish artifact [project RPM]: null

 

Good idea. I added a couple echo's and ls -lah commands to the script to confirm the files are there. Maybe I don't understand how the artifact page works. I was expecting to be able to tell it a path and wildcard like *.rpm to get all RPM files but that isn't working even thought in stage1 the RPM files is certainly there. 

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2015

Hello Bryan,

Can you add another Script task with "ls -l" command to see if your rpm file is exists at  /home/jira/rpmbuild/RPMS/noarch/ folder

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events