This plugin integrates Sputnik with Atlassian Bamboo and Bitbucket Server (previously Stash).
You can install it by file upload. Distribution packages are available at releases page. This plugin requires Sputnik to be available at Bamboo agents. The most convenient way of using this plugin is to install Sputnik at Bamboo agent and define Sputnik capability. Alternatively, Sputnik path can be defined in task.
- Download latest Sputnik distribution and install it on Bamboo agents.
- Add Sputnik executable
- If
sputnik
command is added to PATH go toBamboo administration
->Server capabilities
, then clickDetect server capabilities
. Sputnik should appear inExecutable
list. - Alternatively, you can add Sputnik capability by hand. Go to
Bamboo administration
->Server capabilities
->Add capability
and set:Capability type
toExecutable
Type
toSputnik
Executable label
-A label to uniquely identify this executable
Path
- path to your sputnik executable
If you don't want define Sputnik Capability you can alternatively set Sputnik path in task using Sputnik path
field (Sputnik can be installed on Bamboo agent or can be downloaded and extracted before Sputnik Task).
Options listed below can be defined by Bamboo variables and as a task configuration:
connector.username
connector.password
connector.useHttps
connector.verifySsl
In order to define a particular option as a variable add asputnik.
prefix to original key and use it as a variable name. For example, usesputnik.connector.username
instead ofconnector.username
to set a username.
For security reasons connector.useHttps
and connector.verifySsl
by default are set to true
and can be defined by global variables only. This setting can be changed. Simply add an extra global variable with a key composed of a original key you want to be defined by non global variable and a suffix .override
with value true
. For example, set sputnik.connector.useHttps.override
to true
if you want to let define connector.useHttps
by non global variable or in task configuration.
Options listed below cannot be defined by the user. They are automatically set based on repository definition.
connector.host
connector.port
connector.path
connector.project
connector.repository
connector.type
is always set to stash
.
Other Sputnik options can be defined in task Configuration
field.
Requirements:
- Sputnik-Stash Bamboo plugin is installed in Bamboo
- Sputnik executable is available
- There is a bamboo plan which checks out project code from Bitbucket Server
- There is a pull request for a given branch
In order to run Sputnik you have to:
- Add Sputnik task to plan
- Set Sputnik configuration in
Configuration
field. - Set Bitbucket username and Bitbucket password by plan variables (
sputnik.connector.username
andsputnik.connector.password
respectively), if they are not defined globally.
Under the hood Sputnik task will create a temporary file with configuration in a working directory. This file will be removed after task execution.
I'm getting error: "com.atlassian.bamboo.task.TaskException: Neither Sputnik capability nor Sputnik path is defined!"
Add Sputnik executable or define Sputnik path in task configuration.
"com.atlassian.bamboo.task.TaskException: No pull request found for branch 'branch1'!"
There is no pull request for branch being checked out. Please create a pull request for this branch in Bitbucket Server.
"com.atlassian.bamboo.task.TaskException: Variable connector.username is missing!"
Define global variable or plan variable with key sputnik.connector.username
.
"com.github.platan.bamboo.sputnik.StashException: Stash REST API returned status code 401 for http://stash.mycompany.com/stash/rest/api/1.0/projects/PROJECT1/repos/repo1/pull-requests"
Please configure correct username and password for Bitbucket Server.
"Exception in thread "main" pl.touk.sputnik.connector.stash.StashException: Error when listing files
"Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?"
Please check your SSL connection. If you want to turn it off use sputnik.connector.useHttps
global variable.
Here are the SDK commands you'll use immediately:
- atlas-run -- installs this plugin into the product and starts it on localhost
- atlas-debug -- same as atlas-run, but allows a debugger to attach at port 5005
- atlas-cli -- after atlas-run or atlas-debug, opens a Maven command line window:
- 'pi' reinstalls the plugin into the running product instance
- atlas-help -- prints description for all commands in the SDK
Full documentation is always available at:
https://developer.atlassian.com/display/DOCS/Introduction+to+the+Atlassian+Plugin+SDK
- initial release
This project is licenced under the Apache License 2.0.