Skip to main content

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.

  1. 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.
  2. Click your account button on the top right hand corner of the screen and select Security.
  3. Click Personal access tokens on the left hand column.
  4. Choose a suitable name that allows you to identify the token and an expiration time.
  5. 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.
  6. Scroll down to Scopes, ensure that under Code, the Read & write and Status options are selected.
  7. 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.

  1. Open a terminal in Linux or Powershell in Windows.

  2. Input the command below:

    ssh-keygen -t rsa
  1. You will be prompted to enter a location to save the key. Press Enter to accept the default location which is shown.
  2. When prompted, enter a secure passphrase.
  3. 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

  1. 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.

  2. Click your account button on the top right hand corner of the screen and select Security.

  3. Click SSH public keys on the left hand column.

  4. Click the Add button.

  5. 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

  6. Click Save to save the key in Azure DevOps.

Now that you have created the token (and optional SSH key), it is time to link your Azure DevOps collection to BeetleboxCI.

  1. Click on your profile on the right hand side of the BeetleboxCI webapp and select the Settings button.
  2. In the Settings tab select Linked Organisations and then the Azure tab. Under Azure 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.
  1. 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:

  1. 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.
  2. 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> or ssh://<server_url_or_IP>:22/<collection_name>/<project_name>/_git/<repository_name>
  1. 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
  1. Click proceed. You will now be redirected to the pipelines page where you can see the project that you just created.