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

Submitting artifacts to Perforce via Bamboo

marcin wieczorek March 20, 2013

I am in a process of evaluating Bamboo for our next project so forgive me if this is a basic question but I was unable to find any related answers in docs / answers.

I have a simple plan that checks out of perforce and builds both Linux and Windows binaries. It packs then as artifacts and passes then to the next stage.

Now being in the next stage, what is my next step?

I guess I have couple of options:

1) Write a command line script that can check out / submit a directory in my working folder?

2) Write ant / maven scripts that do that?

3 ???

Does anyone have any suggestions / best practices?

Thanks,

Marcin

6 answers

0 votes
marcin wieczorek March 24, 2013

Excellent. Thank you for the response.

0 votes
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 24, 2013

I think at some point we wanted to add facilities in Bamboo to allow 'pushing' back some changes to repositories, but AFAIK we ended only in adding "Tag/Branch Task" for Subverison: https://jira.atlassian.com/browse/BAM-9137 - nothing similar for other repositories nor for Perforce. I reckon this is because different users have different needs as to what and how to push back to remote repository. That's why I'd say it is the 'best practice' at the moment to push/submit/tag anything in Perforce repository via a home-made scripts...

regards!

0 votes
marcin wieczorek March 20, 2013

Thanks for the answer Piotr.

To be honest, the messy part is probably more related to the project setup then anything that Bamboo does. Figuring out which files need to be checked out / checked in by the command is not going to be fun. Having an abilty to submit artifact package(s) without having to jump though hoops would be nice.

It is a bit odd that I can very easily integrate with perfore for checkouts but I need to write a script to submit back. Seams a bit odd, not difficult, jost odd. But I guess I'm not missing anything.

0 votes
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2013

Ah, I see. In that case I'll pass on this - I'm not familiar with perforce to give hints about best practices in that area.

Though if it were me I'd start with a Bamboo Script Task (inline one), and if it wouldn't suit my requirements I'd either go with a Script Task stored in repository, or with even Maven/Ant script if necessary.

Actually, why do you feel a command line script is too messy? I assume you want to execute something more than a simple 'perforce submit' command... Care to shed some light on what are you trying to achieve and why the Script Task is not the good solution for you?

0 votes
marcin wieczorek March 20, 2013

Apologies that I didn't mantioned that but yes, I have the artifacts shared between stages. That was very simple to setup.

At this point, I am trying to figure out how I can go about implementing perforce submit.

As I've mantioned in the original post, I have couple of options but both feel messy to me. Bamboo does have Maven integrated to it. Is that the prefered way of performing tasks? via Maven scripts?

Marcin

0 votes
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2013

Hi Marcin,

Actually, what is the exact problem you're encountering? Is it that you just need to retrieve those stored (packed) artifacts from previous stage and you can't instruct Bamboo to do that? Or is it something different?

I think the relevant doc is here: https://confluence.atlassian.com/display/BAMBOO/Configuring+artifact+sharing+between+jobs - you need to create *shared* artifact (you don't mention if your artifact is shared or not), and in the next stage you need to configure "Depedency" on that shared artifact. That way your artifact will be put in the working directory during "next stage" tasks executions magically by Bamboo.

Am I helpful? :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events