Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Schedule existing release in Bamboo

Hi ,

We would like to know if there any way to schedule existing release in Bamboo.

As of now  with existing functionality we can trigger the deployment job at any specific time but it will always pick up the latest successful build from either the custom branch or the default branch depending upon how triggers are configured.

We have a business case where only certified packages can be promoted to next environment , so scheduling of existing release remains very important point in Bamboo framework where anyone can schedule a certified existing release to higher environment.

please let us know in case this is achievable with some other Bamboo feature or its readily available to utilize.

 

Regards,

Ashish Panwar

1 answer

Hi @ashishpanwar,

You could potentially make use of Bamboo REST API (https://docs.atlassian.com/atlassian-bamboo/REST/6.7.2/) and promote the build you are looking for creating the release / version you need. However, this should be scripted as a cron job, for instance.

Here is just an example, lets say you have a PROJ-PLAN and have ran 3 builds with it:

# Fire build execution for specified plan
# /queue/{projectKey}-{buildKey}

curl -k -u USERNAME \
-H 'X-Atlassian-Token: no-check' \
-X POST 'http://localhost:8085/rest/api/latest/queue/PROJ-PLAN'

Then, you decided creating a release from the 2nd build, called version2:

# Create deployment version for given deployment project.
# /deploy/project/{deploymentProjectId}/version

curl -k -u USERNAME \
-H 'X-Atlassian-Token: no-check' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"planResultKey":"PROJ-PLAN-2","name":"version2","nextVersionName":"version3"}' \
-X POST 'http://localhost:8085/rest/api/latest/deploy/project/1114113/version'

Then running the deployment by issuing the version:

# Trigger deployment for deployment environment and version.
# /queue/deployment?environmentId={environmentId}&versionId={versionId}

curl -k -u USERNAME \
-H 'X-Atlassian-Token: no-check' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-X POST 'http://localhost:8085/rest/api/latest/queue/deployment?environmentId=1212417&versionId=1376257'

Please, refer to https://developer.atlassian.com/server/bamboo/rest-api-deployment-triggers-for-bamboo/ for more information.

Kind regards,

Rafael

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

64 views 0 4
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