Build with Azure container in Azure

Install

Prerequisites

In order to complete this tutorial, you will need a few things.

  1. If you don’t have an Azure subscription, create a free account before you begin.
    Create your free Azure account

  2. A Jenkins master server. If you don’t have one, view the quickstart in Jenkins Hub to set up one in Azure.
    Create your Jenkins Master

  3. Make sure you update the Jenkins DNS name in Managed Jenkins -> Configure System -> Administrative monitors configuration -> Jenkins URL. Otherwise, the agent won’t be able to connect with the master.

  4. Since the slave/agent connects with master via JNLP, make sure JNLP is allowed. In Jenkins, under Configure Global Security -> TCP port for JNLP agents, select Fixed and use 12345.
    Jenkins JNLP

    Make sure you add a corresponding inbound security rule for the Jenkins master. In Azure, you add the rule in the Network Security Group for the Jenkins master:
    JNLP port

Install the Azure plugins

*Hint: If you deployed Jenkins on Azure using the solution template, the Azure Credential Plugin and Azure Container Agents are already installed.

  1. From the Jenkins dashboard, select Manage Jenkins, then select Manage Plugins.
  2. Select the Available tab, then search for Azure Credentials and Azure Container Agents Plugin. Select the checkbox next to the entry for each of the plugin and select Install without restart from the bottom of the dashboard.

I ran into an issue I have installed my Azure plugins