Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to share artifact from two different build plans of two repositories

Hi,

I guess this question may be asked before by other users, but I really need your assistance to complete a build of a program which has dependency on another program. These two programs are put into two different repositories, now, we need to setup "clean install" on  building program A and then program B can pick up program A from maven repositories within bamboo to continue its build. 

However, I want to find a way such that a jar is built from program A build plan and build plan of Program B picks up the jar as part of library to build. I think share artifact works like this. 

But I cannot find a correct documentation / example on doing this. Would you see if you can provide assistance on this ?

 

Thanks a lot,

1 answer

Hi @Ray_Lee

I don't think we have a document with a sequence of steps for this configuration, but we have documents about the features you need to use in order to accomplish this.

General steps:

  1. Create plan A with the repository for plan A.
  2. Configure its tasks in order to create the Jar you want as an artifact.
  3. Create an artifact definition and configure it as shared and required.
    For the artifact creation: Configuring a job's build artifacts - Atlassian Documentation.
  4. Create plan B with the repository for plan B.
  5. Configure its tasks in order to build the second app. It needs to have the artifact download task right after the checkout task.
    For the artifact download configuration: Sharing artifacts - Atlassian Documentation.
  6. Configure plan A to trigger plan B when a new build happens in A.
    For the build dependency configuration: Setting up plan build dependencies - Atlassian Documentation.


Bitbucket_server_-_Plan_A_-_library__Edit_plan_configuration_-_Atlassian_Bamboo_-_Vivaldi.png

I hope the example above helps you to move forward. =]

Hi Daniel,

Really thank you for your reply. We finally make the sharing artifact across two repository build project. Your instructions are really helpful. But we hit one drawback in our implementation, we need to explicitly have one dependency set in child project

(the project depending on another project artifact output when building)

<dependency>
<groupId>com.test.product</groupId>
<artifactId>testParent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/testParent/target/testParent-0.0.1-SNAPSHOT.jar</systemPath>
</dependency>

 

Do you have any idea how we overcome this thing ? 

 

As when two projects putting into same workspace in eclipse, we need to copy the jar file into the target library folder before another project can be built with manual action.

Not sure I make mistake in the configuration, would you help to share your hints to me ?

Thanks a lot,

Ray

Hi @Ray_Lee

I'm not sure if I understood you correctly.

  • Are you trying to download the artifact from the parent plan (plan A) or from and external source from outside Bamboo?

Hi @Daniel Santos 

Yes, in plan B, I include Job to download source from Plan A and Build package for Plan A and share artifact. Then Plan B tries to use the share artifact from a specific path to continue its build process.

In Plan B, I need to specify 

<dependency>
<groupId>com.test.product</groupId>
<artifactId>testParent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/testParent/target/testParent-0.0.1-SNAPSHOT.jar</systemPath>
</dependency>

such that Plan B can get Plan A artifact to build in bamboo

However, in my eclipse workspace, I need to put the jar (from Plan A) in the above path such that Plan B can build manually in eclipse

I really have no idea how to fix this thing.

Would you help me ?

Thanks,

Hi @Ray_Lee

You should have the artifact in the build working directory, by following the first configuration shared.

Builds can be run in local agents (in the Bamboo server) or in Remote agents (can be anywhere in the same network).

Assuming your Eclipse workspace is in the Bamboo server, you can use a script task to copy the artifact to the new location.

In case your eclipse workspace is in a different machine you will need to use the SCP task to copy the artifact through SSH.


Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

219 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you