Docker Connection General Version Control System (gitlab/github) Auto Build

Source: Internet
Author: User
Tags version control system cloudbees docker registry

Since the official only supports Docker to connect to GitHub's auto build, what should we do with other version control (such as GITLAB,CVS, etc.)?

Bloggers Use the Docker plugin provided by Jenkins+jenkins.

Need to use Dood (Docker-outside-of-docker) or Dind (docker-in-docker) technology.

Specific reference:

http://container-solutions.com/running-docker-in-jenkins-in-docker/

After the Jenkins container has access to the Docker command, continue to install the Docker plugin on the relevant Jenkins to complete the auto build process on the Gitlab Docker.

The Docker-related plug-ins used in this article include the following five (refer to article http://www.linuxidc.com/Linux/2015-07/120287.htm):

    • Cloudbees Docker Build and Publish Plugin-this plugin provides the ability to Build projects with a Dockerfile, and publ Ish the resultant Tagged Image (repo) to the Docker registry.
    • Docker Build Step Plugin-this plugin allows to add various Docker commands into you job as a build step.
    • Docker Plugin-this Plugin allows slaves to be dynamically provisioned using Docker.
    • Kubernetes plugin-this Plugin allows slaves to being dynamically provisioned on multiple Docker hosts using Kubernetes.
    • Docker Commons Plugin-apis for using Docker from other plugins.

Among them, the relationship between them is as follows:

    • Docker Commons plugin provides APIs for other Docker-related plugins
    • Cloudbees Docker Build and Publish Plugin and Docker build step Plugin all rely on Docker Commons Plugin
    • Kubernetes Plugin relies on Docker Plugin

Keng:

Click on the bottom right side of any path in the Kitematic interface, the dialog will pop up, and if you choose enable volumes four bad things will happen:

1. Force restart of Jenkins server, even if a job is not completed;

2. Re-install Jenkins plugin after reboot;

3. A docker command that causes Jenkins to be unable to use Dood.

3.admin user's password will change.

So remember not to click the Enable volumes at any time using the Jenkins container.

Workaround:

Stop (remove) Docker, rerun the following command and configure the new Jenkins container.

docker run  -d -v /var /run/dockersock:/var/run/docker sock \

                 -v  $ (which  Docker :/usr/bin/docker  -p < Span class= "CRAYON-CN" >8080:8080 < Span class= "Crayon-i" >myjenk

Docker Connection General Version Control System (gitlab/github) Auto build

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.