Skip to content

Commit 49ae704

Browse files
wip
1 parent 6206611 commit 49ae704

File tree

2 files changed

+335
-0
lines changed

2 files changed

+335
-0
lines changed

content/en/ci/jenkins/index.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Jenkins"
3+
tags: ["continuous-integration", "ci", "continuous-delivery", "testing"]
4+
weight: 14
5+
description: >
6+
Use LocalStack with [Jenkins](https://www.jenkins.io/)
7+
---
8+
9+
10+
<img src="jenkins-logo.svg" width="100px" alt="Jenkins logo">
11+
12+
13+
## Quick Start
14+
15+
In this quick start we'll start our Jenkins server as a Docker container.
16+
Localstack will be run in a Docker build agent.
17+
18+
To keep requirements low for this guide, we're going to assume you're running everything on a single debian-based local machine with docker and docker-compose installed.
19+
20+
21+
```yaml
22+
version: "3.7"
23+
services:
24+
jenkins:
25+
privileged: true
26+
user: root
27+
image: jenkins/jenkins:2.322-jdk11
28+
ports:
29+
- 8080:8080
30+
- 50000:50000
31+
volumes:
32+
- .jenkins:/var/jenkins_home
33+
- /var/run/docker.sock:/var/run/docker.sock
34+
- /usr/bin/docker:/usr/bin/docker
35+
```
36+
37+
We're starting a jenkins server as a Docker container. The Docker socket and client are mounted into the container.
38+
Alternatively you can also point the docker client in Jenkins to the URL of a remote Docker host with an exposed API.
39+
40+
In your production environment you might also want to install Docker on the runner directly.
41+
42+
```bash
43+
docker-compose up -d
44+
docker-compose logs -f # check the log output for the initial admin user password
45+
```
46+
47+
Head to http://localhost:8080 and initialize Jenkins.
48+
After the initial setup, go to "Manage Jenkins"->"Manage Plugins"->"Available" and install the [Docker plugin](https://plugins.jenkins.io/docker-plugin/).
49+
After the plugin is installed it needs to be configured.
50+
Go to "Manage Jenkins"->"Manage Nodes and Clouds"->"Configure Clouds" and follow the documentation in https://plugins.jenkins.io/docker-plugin/ to set up your docker client and make sure you verify the setup with "Test Connection".
51+
52+

0 commit comments

Comments
 (0)