Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i use Jenkins with Atlassian Stash?

I've just setup Jenkins and i have some Repositories in my Stash. I installed the "Git plugin" in jenkins. I can now enter the repository url but there is nothing to enter my credentials.

It's possible using

http://username:password@mydomain/xx/yy.git 

but that is something i dont want to do.

What else can i do to authenticate?

like image 760
CBergau Avatar asked Sep 26 '13 16:09

CBergau


People also ask

Can we integrate Jira with Jenkins?

With the webhook URL and secret, you can now create a connection between Jenkins and Jira. In Jenkins, go to Manage Jenkins > Configure System and scroll to the Jira Software Cloud Integration section. Select Add Jira Cloud Site > Jira Cloud Site. New fields will appear for your site name, webhook URL, and secret.

Can we integrate Jenkins with BitBucket?

Step 2: Create a New Repository using BitBucketOnce you have installed the BitBucket Plugin in Jenkins, you will need a repository in BitBucket to link it with Jenkins. The second step in building BitBucket Webhook Jenkins Integration involves creating a new BitBucket repository.


2 Answers

I am the author of this stash plugin that might help you: https://github.com/palantir/stashbot

Taking selectively from the readme:

To work with Jenkins, you MUST install the following jenkins plugins first.

  • Jenkins GIT plugin
  • Post build task

Next, build and install the plugin using the plugin SDK (more details in the readme)

Next, the stash admin goes into the Stashbot Admin page and creates a jenkins server config - here you give it the URL, username/password, etc details of the jenkins server.

Next, for each repository a "Stashbot CI Admin" link shows up for repo admins. From there you can check the "enabled" checkbox and tell it what branches you want build (via a regex) and what command it should run to do the build (optionally verifies and publishes).

After this point, the remainder is completely self-service. Any repo admin can ask for their project to "have CI" by filling out that form, and the jobs will automatically be created in the jenkins server.

Hope that helps.

like image 115
cmyers Avatar answered Oct 16 '22 12:10

cmyers


Set up an SSH key for the user that runs your Jenkins builds and add it to the repository's SSH keys in Stash. See the Stash docs for instructions.

like image 31
gareth_bowles Avatar answered Oct 16 '22 14:10

gareth_bowles