​jenkins​​​​blueocean​​​​JClouds Plugin​

Jenkins

  1. 重启,关闭,重载
    ​​​http://localhost:8080/exit​​​http://localhost:8080/restart
    http://localhost:8080/reload

Jenkins & Docker

CloudBees Custom Builds Environment Plugin

CloudBees Custom Builds Environment Plugin allows Docker images and files to serve as template for Jenkins agents, reducing the administrative overhead of an agent installation to only updating a few lines in a handful of environment definitions for potentially thousands of agents.

Jenkins Pipeline Docker plugin

The Jenkins Pipeline Docker plugin extends these pipelines even further to provide first class support for Docker images and containers. This plugin allows Jenkins to build/release Docker images and leverage Docker containers for customized and reproducible agent environments.
​​​Orchestrating Pipelines with Jenkins and Docker with the CloudBees Pipeline Docker Plugin​​​​docker-workflow-plugin​​​​Docker Pipeline Plugin​

Pipeline Utility Steps

提供了很多方便的函数可以在编写jenkinsfile文件的时候使用;
​​​Pipeline Utility Steps​​​ 注意,安装完此插件之后需要重启,否则会出现如下的问题​​Jenkins CI Pipeline Scripts not permitted to use method groovy.lang.GroovyObject​​;大部分插件安装完之后,都需要重启一下才好使,不然各种问题;

Cloudbees Docker Traceability

you can track all projects using an image, or configure this project to be triggered automatically when an updated image is pushed to the Docker registry. If you use Cloudbees Docker Traceability

FAQ

问题1
找不到/var/run/docker.sock文件
解决方案:
docker容器内的jenkins在容器内肯定找不到/var/run/docker.sock文件
启动的时候挂在上:

docker run -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock jenkinsci/blueocean

问题2

+ docker pull maven:3.5.2-jdk-8
Warning: failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.33/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.33/images/create?fromImage=maven&tag=3.5.2-jdk-8: dial unix /var/run/docker.sock: connect: permission denied
script returned exit code 1

解决方案:

docker run -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock --group-add=$(stat -c %g /var/run/docker.sock) jenkinsci/blueocean

参考

​ Jenkins的关闭、重启​