Skip to content

Commit a9caa43

Browse files
authored
Merge pull request #106366 from TomArcherMsft/jenkins-user-story-1686377
Jenkins: User Story 1686377
2 parents 7356da5 + 8cce245 commit a9caa43

14 files changed

+124
-91
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49199,5 +49199,10 @@
4919949199
"redirect_url": "/azure/jenkins/service-fabric-cicd-your-linux-applications-with-jenkins",
4920049200
"redirect_document_id": true
4920149201
},
49202+
{
49203+
"source_path": "articles/jenkins/install-jenkins-solution-template.md",
49204+
"redirect_url": "/azure/jenkins/install-solution-template-tutorial",
49205+
"redirect_document_id": true
49206+
}
4920249207
]
4920349208
}

articles/jenkins/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ landingContent:
3636
- linkListType: quickstart
3737
links:
3838
- text: Create a Jenkins server
39-
url: install-jenkins-solution-template.md
39+
url: install-solution-template-quickstart.md
4040
- linkListType: download
4141
links:
4242
- text: Sample jobs and scripts
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Quickstart - Create a Jenkins server on Azure
3+
description: In this quickstart, you install Jenkins on an Azure Linux virtual machine from the Jenkins solution template and build a sample Java application.
4+
keywords: jenkins, azure, devops, portal, virtual machine, solution template
5+
ms.topic: quickstart
6+
ms.date: 03/03/2020
7+
---
8+
9+
# Quickstart: Create a Jenkins server on an Azure Linux VM
10+
11+
This quickstart shows how to install [Jenkins](https://jenkins.io) on an Ubuntu Linux VM with the tools and plug-ins configured to work with Azure. When you're finished, you have a Jenkins server running in Azure building a sample Java app from [GitHub](https://github.com).
12+
13+
[!INCLUDE [jenkins-install-solution-template-include](../../includes/jenkins-install-solution-template-steps.md)]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Tutorial - Create a Jenkins server on Azure
3+
description: In this tutorial, you install Jenkins on an Azure Linux virtual machine from the Jenkins solution template and build a sample Java application.
4+
keywords: jenkins, azure, devops, portal, virtual machine, solution template
5+
ms.topic: tutorial
6+
ms.date: 03/03/2020
7+
---
8+
9+
# Tutorial: Create a Jenkins server on an Azure Linux VM
10+
11+
This tutorial shows how to install [Jenkins](https://jenkins.io) on an Ubuntu Linux VM with the tools and plug-ins configured to work with Azure. When you're finished, you have a Jenkins server running in Azure building a sample Java app from [GitHub](https://github.com).
12+
13+
> [!div class="checklist"]
14+
> * Install and configure a Jenkins server on Azure
15+
> * Access the Jenkins console using an SSH tunnel
16+
> * Create a Freestyle project
17+
> * Compile the code and package the sample app
18+
19+
[!INCLUDE [jenkins-install-solution-template-include](../../includes/jenkins-install-solution-template-steps.md)]

articles/jenkins/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
expanded: true
99
items:
1010
- name: Create a Jenkins server
11-
href: install-jenkins-solution-template.md
11+
href: install-solution-template-quickstart.md
1212
- name: Tutorials
1313
items:
1414
- name: 1. Install
1515
items:
1616
- name: Create a Jenkins server
17-
href: install-jenkins-solution-template.md
17+
href: install-solution-template-tutorial.md
1818
- name: 2. Configure
1919
items:
2020
- name: Scale with Azure Container Instances
Lines changed: 84 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,84 @@
1-
---
2-
title: Create a Jenkins server on Azure
3-
description: Install Jenkins on an Azure Linux virtual machine from the Jenkins solution template and build a sample Java application.
4-
keywords: jenkins, azure, devops, portal, virtual machine, solution template
5-
ms.topic: quickstart
6-
ms.date: 6/7/2017
7-
---
8-
9-
# Create a Jenkins server on an Azure Linux VM from the Azure portal
10-
11-
This quickstart shows how to install [Jenkins](https://jenkins.io) on an Ubuntu Linux VM with the tools and plug-ins configured to work with Azure. When you're finished, you have a Jenkins server running in Azure building a sample Java app from [GitHub](https://github.com).
12-
13-
## Prerequisites
14-
15-
* An Azure subscription
16-
* Access to SSH on your computer's command line (such as the Bash shell or [PuTTY](https://www.putty.org/))
17-
18-
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
19-
20-
## Create the Jenkins VM from the solution template
21-
Jenkins supports a model where the Jenkins server delegates work to one or more agents to allow a single Jenkins installation to host a large number of projects or to provide different environments needed for builds or tests. The steps in this section guide you through installing and configuring a Jenkins server on Azure.
22-
23-
[!INCLUDE [jenkins-install-from-azure-marketplace-image](../../includes/jenkins-install-from-azure-marketplace-image.md)]
24-
25-
## Connect to Jenkins
26-
27-
Navigate to your virtual machine (for example, `http://jenkins2517454.eastus.cloudapp.azure.com/`) in your web browser. The Jenkins console is inaccessible through unsecured HTTP so instructions are provided on the page to access the Jenkins console securely from your computer using an SSH tunnel.
28-
29-
![Unlock jenkins](./media/install-jenkins-solution-template/jenkins-ssh-instructions.png)
30-
31-
Set up the tunnel using the `ssh` command on the page from the command line, replacing `username` with the name of the virtual machine admin user chosen earlier when setting up the virtual machine from the solution template.
32-
33-
```bash
34-
ssh -L 127.0.0.1:8080:localhost:8080 [email protected]
35-
```
36-
37-
After you have started the tunnel, navigate to `http://localhost:8080/` on your local machine.
38-
39-
Get the initial password by running the following command in the command line while connected through SSH to the Jenkins VM.
40-
41-
```bash
42-
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
43-
```
44-
45-
Unlock the Jenkins dashboard for the first time using this initial password.
46-
47-
![Unlock jenkins](./media/install-jenkins-solution-template/jenkins-unlock.png)
48-
49-
Select **Install suggested plugins** on the next page and then create a Jenkins admin user used to access the Jenkins dashboard.
50-
51-
![Jenkins is ready!](./media/install-jenkins-solution-template/jenkins-welcome.png)
52-
53-
The Jenkins server is now ready to build code.
54-
55-
## Create your first job
56-
57-
Select **Create new jobs** from the Jenkins console, then name it **mySampleApp** and select **Freestyle project**, then select **OK**.
58-
59-
![Create a new job](./media/install-jenkins-solution-template/jenkins-new-job.png)
60-
61-
Select the **Source Code Management** tab, enable **Git**, and enter the following URL in **Repository URL** field: `https://github.com/spring-guides/gs-spring-boot.git`
62-
63-
![Define the Git repo](./media/install-jenkins-solution-template/jenkins-job-git-configuration.png)
64-
65-
Select the **Build** tab, then select **Add build step**, **Invoke Gradle script**. Select **Use Gradle Wrapper**, then enter `complete` in **Wrapper location** and `build` for **Tasks**.
66-
67-
![Use the Gradle wrapper to build](./media/install-jenkins-solution-template/jenkins-job-gradle-config.png)
68-
69-
Select **Advanced** and then enter `complete` in the **Root Build script** field. Select **Save**.
70-
71-
![Set advanced settings in the Gradle wrapper build step](./media/install-jenkins-solution-template/jenkins-job-gradle-advances.png)
72-
73-
## Build the code
74-
75-
Select **Build Now** to compile the code and package the sample app. When your build completes, select the **Workspace** link for the project.
76-
77-
![Browse to the workspace to get the JAR file from the build](./media/install-jenkins-solution-template/jenkins-access-workspace.png)
78-
79-
Navigate to `complete/build/libs` and ensure the `gs-spring-boot-0.1.0.jar` is there to verify that your build was successful. Your Jenkins server is now ready to build your own projects in Azure.
80-
81-
## Troubleshooting the Jenkins solution template
82-
83-
If you encounter any bugs with the Jenkins solution template, file an issue in the [Jenkins GitHub repo](https://github.com/azure/jenkins/issues).
84-
85-
## Next Steps
86-
87-
> [!div class="nextstepaction"]
88-
> [Add Azure VMs as Jenkins agents](jenkins-azure-vm-agents.md)
1+
---
2+
author: tomarcher
3+
ms.service: jenkins
4+
ms.topic: include
5+
ms.date: 03/03/2020
6+
ms.author: tarcher
7+
---
8+
9+
## Prerequisites
10+
11+
* An Azure subscription
12+
* Access to SSH on your computer's command line (such as the Bash shell or [PuTTY](https://www.putty.org/))
13+
14+
[!INCLUDE [quickstarts-free-trial-note](quickstarts-free-trial-note.md)]
15+
16+
## Create the Jenkins VM from the solution template
17+
Jenkins supports a model where the Jenkins server delegates work to one or more agents to allow a single Jenkins installation to host a large number of projects or to provide different environments needed for builds or tests. The steps in this section guide you through installing and configuring a Jenkins server on Azure.
18+
19+
[!INCLUDE [jenkins-install-from-azure-marketplace-image](jenkins-install-from-azure-marketplace-image.md)]
20+
21+
## Connect to Jenkins
22+
23+
Navigate to your virtual machine (for example, `http://jenkins2517454.eastus.cloudapp.azure.com/`) in your web browser. The Jenkins console is inaccessible through unsecured HTTP so instructions are provided on the page to access the Jenkins console securely from your computer using an SSH tunnel.
24+
25+
![Unlock jenkins](./media/jenkins-install-solution-template-steps/jenkins-ssh-instructions.png)
26+
27+
Set up the tunnel using the `ssh` command on the page from the command line, replacing `username` with the name of the virtual machine admin user chosen earlier when setting up the virtual machine from the solution template.
28+
29+
```bash
30+
ssh -L 127.0.0.1:8080:localhost:8080 [email protected]
31+
```
32+
33+
After you have started the tunnel, navigate to `http://localhost:8080/` on your local machine.
34+
35+
Get the initial password by running the following command in the command line while connected through SSH to the Jenkins VM.
36+
37+
```bash
38+
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
39+
```
40+
41+
Unlock the Jenkins dashboard for the first time using this initial password.
42+
43+
![Unlock jenkins](./media/jenkins-install-solution-template-steps/jenkins-unlock.png)
44+
45+
Select **Install suggested plugins** on the next page and then create a Jenkins admin user used to access the Jenkins dashboard.
46+
47+
![Jenkins is ready!](./media/jenkins-install-solution-template-steps/jenkins-welcome.png)
48+
49+
The Jenkins server is now ready to build code.
50+
51+
## Create your first job
52+
53+
Select **Create new jobs** from the Jenkins console, then name it **mySampleApp** and select **Freestyle project**, then select **OK**.
54+
55+
![Create a new job](./media/jenkins-install-solution-template-steps/jenkins-new-job.png)
56+
57+
Select the **Source Code Management** tab, enable **Git**, and enter the following URL in **Repository URL** field: `https://github.com/spring-guides/gs-spring-boot.git`
58+
59+
![Define the Git repo](./media/jenkins-install-solution-template-steps/jenkins-job-git-configuration.png)
60+
61+
Select the **Build** tab, then select **Add build step**, **Invoke Gradle script**. Select **Use Gradle Wrapper**, then enter `complete` in **Wrapper location** and `build` for **Tasks**.
62+
63+
![Use the Gradle wrapper to build](./media/jenkins-install-solution-template-steps/jenkins-job-gradle-config.png)
64+
65+
Select **Advanced** and then enter `complete` in the **Root Build script** field. Select **Save**.
66+
67+
![Set advanced settings in the Gradle wrapper build step](./media/jenkins-install-solution-template-steps/jenkins-job-gradle-advances.png)
68+
69+
## Build the code
70+
71+
Select **Build Now** to compile the code and package the sample app. When your build completes, select the **Workspace** link for the project.
72+
73+
![Browse to the workspace to get the JAR file from the build](./media/jenkins-install-solution-template-steps/jenkins-access-workspace.png)
74+
75+
Navigate to `complete/build/libs` and ensure the `gs-spring-boot-0.1.0.jar` is there to verify that your build was successful. Your Jenkins server is now ready to build your own projects in Azure.
76+
77+
## Troubleshooting the Jenkins solution template
78+
79+
If you encounter any bugs with the Jenkins solution template, file an issue in the [Jenkins GitHub repo](https://github.com/azure/jenkins/issues).
80+
81+
## Next Steps
82+
83+
> [!div class="nextstepaction"]
84+
> [Add Azure VMs as Jenkins agents](/azure/jenkins-azure-vm-agents)

0 commit comments

Comments
 (0)