2016-01-30 17:35:25 +02:00
|
|
|
jenkins
|
|
|
|
=======
|
|
|
|
|
2016-06-03 18:25:43 +02:00
|
|
|
![](https://badge.imagelayers.io/jenkinsci/jenkins:latest.svg)
|
2016-01-30 17:35:25 +02:00
|
|
|
|
|
|
|
In a nutshell, [Jenkins][1] is the leading open source automation server. Built
|
|
|
|
with Java, it provides hundreds of plugins to support building, testing,
|
|
|
|
deploying and automation for virtually any project.
|
|
|
|
|
2016-04-27 03:02:16 +02:00
|
|
|
## docker-compose.yml
|
|
|
|
|
2017-09-12 09:54:13 +02:00
|
|
|
```yaml
|
2016-04-27 03:02:16 +02:00
|
|
|
jenkins:
|
2017-09-12 09:54:13 +02:00
|
|
|
image: jenkins/jenkins:lts-alpine
|
2016-04-27 03:02:16 +02:00
|
|
|
ports:
|
|
|
|
- "8080:8080"
|
|
|
|
- "50000:50000"
|
|
|
|
volumes:
|
|
|
|
- ./data:/var/jenkins_home
|
2017-09-12 09:54:13 +02:00
|
|
|
environment:
|
|
|
|
- JAVA_OPTS=-Dhudson.footerURL=http://jenkins.easypi.pro
|
2016-04-27 03:02:16 +02:00
|
|
|
restart: always
|
|
|
|
```
|
|
|
|
|
|
|
|
## up and running
|
|
|
|
|
2017-09-12 09:54:13 +02:00
|
|
|
```bash
|
2016-04-27 03:02:16 +02:00
|
|
|
$ cd ~/fig/jenkins
|
|
|
|
$ mkdir -p data
|
|
|
|
$ sudo chown 1000 data
|
|
|
|
$ docker-compose up -d
|
2016-06-03 18:25:43 +02:00
|
|
|
$ docker-compose exec jenkins bash
|
2016-06-11 02:15:37 +02:00
|
|
|
>>> cat ~/secrets/initialAdminPassword
|
|
|
|
******
|
2016-06-03 18:25:43 +02:00
|
|
|
>>> ssh-keygen
|
2016-06-11 02:15:37 +02:00
|
|
|
>>> cat ~/.ssh/id_rsa.pub
|
|
|
|
......
|
2016-06-03 18:25:43 +02:00
|
|
|
>>> exit
|
2016-05-03 14:38:01 +02:00
|
|
|
$ docker-compose exec --user root jenkins apk add -U git
|
2016-04-27 03:02:16 +02:00
|
|
|
$ firefox http://localhost:8080/
|
|
|
|
```
|
|
|
|
|
2019-10-20 11:09:50 +02:00
|
|
|
## fix slow network
|
|
|
|
|
|
|
|
```
|
|
|
|
$ vim data/war/jsbundles/pluginSetupWizard.js
|
|
|
|
// default 10 seconds for AJAX responses to return before triggering an error condition
|
|
|
|
var pluginManagerErrorTimeoutMillis = 10 * 1000;
|
|
|
|
```
|
|
|
|
|
2019-12-03 13:16:02 +02:00
|
|
|
> Chinese users may add `-Dhudson.model.DownloadService.noSignatureCheck=true` option to use [plugin update mirror site][2].
|
|
|
|
|
2017-09-12 09:54:13 +02:00
|
|
|
[1]: https://jenkins.io/index.html
|
2019-12-03 13:16:02 +02:00
|
|
|
[2]: https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/current/update-center.json
|