Skip to content

Instantly share code, notes, and snippets.

@vicsz
vicsz / bambooDeploy.gradle
Last active September 11, 2021 07:51
Gradle Bamboo Deploy Release Branch Task
import groovy.json.JsonSlurper
/*
Gradle commandLine task to trigger deployments from release branches
This will trigger deployments for all Deployment Projects for specific plan
Note that bambooUsername and bambooPassword need to be set (environment variables)
.. also for first time usage override the bambooUrl variable, and rootPlanKey
import groovy.json.JsonSlurper
username = 'JIRA_USERNAME'
password = 'JIRA_PASSWORD'
jiraUrl = 'https://myjira.address.com'
jql = 'project=FE AND sprint in openSprints() AND sprint not in futureSprints() order by updated desc'
example = getJiraJqlResults(jql)
@vicsz
vicsz / bambooRestCalls.groovy
Last active September 11, 2021 07:26
Simple snippet for making Bamboo Rest calls ... Given a planName and branchName, create a release and deploy it
import groovy.json.JsonSlurper
username = 'BAMBOO_USERNAME'
password = 'BAMBOO_PASSWORD'
bambooUrl = 'http://my.bamboo.address.com'
String planName = 'ABCD' // Plan name (one that creates artiftacts
String branchName = 'release-3' //The branch that we want to deploy
int deploymentProjectId = 123 //id of deployment project (in deployment tab, that deploys artifact from the above plan