'Jenkins Configuration as Code and Bitbucket Server
I'm working on our Jenkins setup and I want to go for the configuration as code approach. We want to generate different variants of Jenkins masters using Terraform in Azure cloud and configure them with yaml. I found the configuration-as-code-plugin which I think could be a good solution. The problem is that I cannot find meaningful documentation and references for the single plugins to be configured in yaml. There are some examples but the they are just not enough.
What I tried to do is to setup a Jenkins master to use Bitbucket the traditional way and then with the plugin I extracted the actual configuration as a yaml file:
...
- credentials:
- bitbucketToken:
description: "Bitbucket token"
id: "60840b9a-636b-4be7-a9c8-81cc7fab59a9"
secret: "{AQAAABAAAAAwK+Yc/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxx==}"
...
bitbucketPluginConfiguration:
serverList:
- adminCredentialsId: "60840b9a-636b-4be7-a9c8-81cc7fab59a9"
baseUrl: "http://localhost:7990/"
id: "zzzzzz-zzzzz-zzzz-zzzzzz-zzzzzzzz"
serverName: "Bitbucket Server"
...
most of the entries are clear to me, but two are strange:
"secret" and the two "id"s
From where are the "id"s and the "secret" coming? Are they automatically generated by Jenkins? How can I create/get them without the need of having a running Jenkins? Is there any reference about these parameters?
Thanks in advance for your help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
