Schedule existing release in Bamboo

ashishpanwar December 20, 2018

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

0 votes
Rafael Pinto Sperafico
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.
December 27, 2018

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
AUG Leaders

Atlassian Community Events