Question: How to configure bitbucket integration with Spinnaker?


Answer: Bitbucket implementation has problems in Spinnaker for artifacts.

Problem - 1: 

  • Bitbucket implementation and documentation is still using 1.0 API whereas the API is deprecated in bitbucket.com hosted site.

Problem - 2: 

  • Trigger from Bitbucket if configured as Github trigger, then it fails to match artifacts because the format of the artifacts from Bitbucket trigger are treated the same as Github and the fields do not match.

Problem - 3:

  • If we configure the trigger as webhook trigger in Spinnaker, then the artifacts are not compiled anyway since the format expected in webhook trigger is different from Bitbucket trigger.

Problem - 4:

  • We can use triggers as webhook or Bitbucket without artifacts extracted from the payload. However, if we define expected artifacts and give default values it is downloading the artifacts.

BitBucket Account Configuration:

                https://api.bitbucket.org/2.0/repositories/<user>/<repo>/src/master/<path>

  • Sample URL - 

           https://api.bitbucket.org/2.0/repositories/anooptejt/simplehelm/src/master/values.yaml

  • Save Changes, Now you can add Bake stage and Deploy Stage and fill up the parameters as required.