Docker Image Trigger for Bamboo

Hi

Just to give some context of what I'm trying to do - just incase im going down a rabbit hole. I have a requirement whereby i would like to trigger a build in bamboo whereby when a parent docker image has changed i.e. a user inputs an image I wish to trigger on e.g.

FROM namespace/image:latest

I can then call http://my-internal-docker-repository/namespace/image/manifests/latest periodically and get the sha256 to decide if its changed since the last check and hence run my build.

 

It would appear I could create an eventlistener: https://developer.atlassian.com/bamboodev/bamboo-plugin-guide/bamboo-plugin-module-types/bamboo-event-listeners

and listen for a "ChangeDetectionRequiredEvent". Should the sha256 be different (I assume i can store the digest somewhere - presumably like a source repository can store a revision) I would be able to then fire a BuildTriggerEvent

 

Is my assumption correct?

1 answer

1 vote

If you have Bamboo license you can check source code of com.atlassian.bamboo.trigger.polling.PollingTriggerQuartzJob to check how create new trigger and execute build. Also good reference for custom trigger functionality is at repository https://bitbucket.org/atlassianlabs/bamboo-after-deployment-trigger

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,561 views 0 6
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you