I'm writing a 'CustomPostBuildCompletedAction' module for bamboo and want it to run at the last possible second or at least after all artifacts have been published. Is there a "weight" attribute I can give to the xml descriptor for "PostBuildCompletedAction" or should I be using a different module altogether?
Try using SystemDirectory class methods to get to artifact directories.
Thanks. I was not aware this class existed. Much cleaner and fault-tolerant solution to grabbing the bamboo-home-dir than what I came up with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get the "artifact root" (because there was no way I could find to grab it through the API and it's related classes) directory I grabbed the "bamboo.home" property from system-properties and simply worked my way up to the relevant artifact directory using the plan-key, artifact-name, and artifact-file-name. Not sure if this is the correct way to go about things but it worked for my case.
EDIT: use of class SystemDirectory has all the classes one would need to find bamboo-home-dir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Following the advice from the below thread I was able to execute the necessary calls but the returned Collection<ArtifactLink> is of size 0. However at the time of execution the artifacts are clearly on disk so I'm not exactly sure why Bamboo is not picking this up. Is there a way to grab the artifact root directory somehow?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The CustomBuildProcessorServer module does exactly this but I still can't seem to get to the artifacts in anyway. I tried using the BuildResultsSummaryManager and subsequently getting the ResultsSummary but exceptions are thrown trying to iterate over the Collection<AtrifactLink> (via getArtifactLinks()):
[INFO] [talledLocalContainer] net.sf.hibernate.LazyInitializationException: Fail
ed to lazily initialize a collection - no session or session was closed
This is odd considering the collection itself is non-null but attempting to iterate over it throws an exceptions. Is there anyway I can get at the artifacts from the CustomBuildProcessorServer module?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.