Azure DevOps Server (On-premises)
Overview
BeetleboxCI supports Azure DevOps Server integration, which is the recommended method for connecting Azure DevOps repositories. Azure DevOps pipelines can also be created manually. This requires users to provide the repositories, alongside credentials to access those repositories if needed. Please note that pull requests cannot be detected on repositories that are added using the manual method.
BeetleboxCI supports both Azure DevOps Services (cloud-based) and Azure DevOps Server (on-premises).
Integrating BeetleboxCI with Azure DevOps Server
Create a Personal Access Token
The first stage is to create a personal access token for BeetleboxCI to use in order to connect to your Azure DevOps account.
In Azure DevOps server, the username and collection name are distinct.
- Switch to the correct collection for which you want to create the token by going to the Azure Devops homepage (click the Azure DevOps logo on the top left) and select the correct collection from the left-hand column.
- Click your account button on the top right hand corner of the screen and select
Security
. - Click Personal access tokens on the left hand column.
- Choose a suitable name that allows you to identify the token and an expiration time.
- Ensure that the correct collection is selected on the dropdown menu. You may wish to allow this token to grant access to all collections if needed.
- Scroll down to
Scopes
, ensure that underCode
, theRead & write
andStatus
options are selected. - Copy the token and save it somewhere safe, as you will not be able to see it again.
Create an SSH Key (optional)
You may optionally include an SSH key as part of the integration, and the pipelines you create through Azure DevOps integration will use the SSH protocol to access repositories as opposed to the default HTTPS protocol which will be used if an SSH key is not specified. SSH keys are restricted to a single collection and cannot access multiple collections, unlike Personal access tokens.
Generate an SSH-RSA Key
These commands are identical for both Windows and Linux.
Open a terminal in Linux or Powershell in Windows.
Input the command below:
ssh-keygen -t rsa
- You will be prompted to enter a location to save the key. Press Enter to accept the default location which is shown.
- When prompted, enter a secure passphrase.
- Now two files will have been generated, and you can browse to the location where you saved them. The file ending in .pub contains the public key which will need to be added to your Azure DevOps collection.
Add the SSH key to your Azure DevOps Collection
Switch to the correct collection for which you want to create the token by going to the Azure Devops homepage (click the Azure DevOps logo on the top left) and select the correct collection from the left-hand column.
Click your account button on the top right hand corner of the screen and select
Security
.Click
SSH public keys
on the left hand column.Click the
Add
button.Choose a name for the key that helps to remember what it is for, and paste the public key from the file you generated earlier.
The public key will be similar to:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABRIit/S93UY9M8= user@example.com
Click
Save
to save the key in Azure DevOps.
Link your Azure DevOps Collection to BeetleboxCI
Now that you have created the token (and optional SSH key), it is time to link your Azure DevOps collection to BeetleboxCI.
- Click on your profile on the right hand side of the BeetleboxCI webapp and select the
Settings
button. - In the
Settings
tab selectLinked Organisations
and then theAzure
tab. UnderAzure Integration Settings
, fill in the following information:
Authorization URL
-http://<server_url_or_IP>/<collection_name>
API version
- 7.1 (BeetleboxCI currently used Azure DevOps API version 7.1)Beetlebox URL
- the URL of your Beetlebox app, e,g.http://192.168.1.10:32767
.Organization/Collection
- The name of the Azure collection that you selected.Username
- This is the Windows username of the account on the server which owns the Azure DevOps collection.Personal access token
- Paste in the personal access token that you created earlier.Private SSH key (optional)
- Paste in the private key that you optionally created earlier.
- Once finished, select
Update Azure Data
.
Manually Adding a Repository to BeetleboxCI
When you add a private repository to BeetleboxCI, you will need to provide either:
- An SSH key (please refer to the Create an SSH Key section above)
- A windows username and password (a personal access token will not work)
The steps are as follows:
- On the pipelines page of BeetleboxCI in your browser: If you do not already have any pipelines in BeetleboxCI, click 'Create your first pipeline'. Otherwise, click "Create Pipeline" at the bottom of the pipelines page.
- In the following screen, fill in the following:
- Project Name: [Name of your repository]
- Repository URL:
http://<server_url_or_IP>/<collection_name>/<project_name>/_git/<repository_name>
orssh://<server_url_or_IP>:22/<collection_name>/<project_name>/_git/<repository_name>
- Also fill in either the "Authentication settings" section OR the "SSH Authentication" section. You will need need to use username and token authentication if you chose the HTTPS URL or SSH authentication if you chose the SSH URL.
- Authentication Settings — Username:
<windows_username>
- Authentication Settings — Password:
<window_password>
- SSH Authentication — SSH private key
- Click proceed. You will now be redirected to the pipelines page where you can see the project that you just created.