I'm developing a plugin that creates files on the remote agent. I need to create an artifact and publish it in Bamboo.
1. How do I create the artifact? Is creating an ArtifactDefinition and an Artifact enough?
2. If so, how do I link the ArtifactDefinition to the Plan which runs my plugin? I'm unable to figure out how to get the "current plan".
3. Do I need to copy the files from the Agent to the server first? If so, how?
4. Do you have a simple code example that can help explain (In addition to answering the questions above)?
Please assist me as I've been struggling with this for so long and it's becoming quite urgent.
it's possible to create ArtifactDefinition programatically, bit it doesn't make sense to manage file upload from agent manually, Bamboo should do it. So artifact shoulb defined before build started and sent to agent.
Can you describe the result you want to achieve with your plugin, what is business needs?
I'm creating a plugin for a program that runs a load test on the application the user specifies. It basically emulates a group of "virtual users" that access a web application and records the results. After the test run the results are saved on the agent, and that's where I'm stuck now.
I wanted to collect the result and publish them in Bamboo without having the user do any action manually. Is this possible?
Ok, it's become a little clear now. Good way to handle this situation is to create artifact definition for build reacting on some user actions.
As sample you can look at source code of Bamboo Clover plugin (it's part of Bamboo source code available for customers at my.atlassian.com). Plugin creates ArtifactDefinition for Clover report generated at agent side and then visible to user at additional tab of Build result. It's created when user enables Clover support for Job See com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor#customizeBuildRequirements
ArtifactDefinitionImpl artifact = new ArtifactDefinitionImpl(CLOVER_REPORT_ARTIFACT_LABEL, reportDir, "**/*.*");
Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs