0

I've been trying to provide some tokens through CasC (BitBucket Plugin) but every time the Jenkins instance restarted then the tokens are not working. As I see that is happening because Jenkins use different salt and the Hash is changing. How i can provide in groovy the token in order to produce the secret ?

1 Answers1

0

I dont use BitBucket but here is how I do this for Slack

---
credentials:
  system:
    domainCredentials:
      - credentials:
          - string:
              description: "Slack auth token"
              scope: GLOBAL
              id: "slack-token"
              secret: ${slack-token}

unclassified:
  slackNotifier:
    teamDomain: "apr-1985-slack-space"
    tokenCredentialId: slack-token

This is using the AWS SSM plugin to pull the credential out of the Parameter Store and add them to Jenkins.

apr_1985
  • 1,764
  • 2
  • 14
  • 27
  • Thank you for your answer, I have do the following without success! ` credentials: system: domainCredentials: - credentials: - bitbucketToken: id: "bitbucket-token" secret: ${bitbucket-token} bitbucketPluginConfiguration: serverList: - adminCredentialsId: "bitbucket-token" baseUrl: "http://hostname/bitbucket" id: "my-token-here" serverName: "bitbucket" ` – Dimitris Fragkos Apr 15 '21 at 10:58