jenkins+git (2)

    继续前面的实验操作,接下来做一下Git Parameter插件

    在插件管理处安装好本插件后,可新建一个项目进行git配置。在此操作之前,需要在git服务器上先行安装配置好gitlab,快速的操作一下即可
    wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

After yum is installed, you need to modify the external_url'http ://ip:port ' in the configuration file /etc/gitlab/gitlab.rb
jenkins+git (2)
and reset: gitlab-ctl reconfigure
start: gitlab-ctl restart
login in the browser, initial account : root password: set by yourself for the first login
jenkins+git (2)

Creation sequence: create a group, create a project, create a user
, configure the private key of the Git server to the SSH Keys of gitlab

After configuring gitlab, put the Jenkins public key in the gitlab project, the location is as shown
jenkins+git (2)
in the figure: After the Jenkins server test pulls the project and
jenkins+git (2)
pulls the project, create a project on the jenkins browser page, configure git,
jenkins+git (2)
save it, and build it immediately , The results are as follows:
jenkins+git (2)

After git test without problems, configure to add parameterized build, fill in the name, select the branch of the parameter type, and the default value is origin/master
jenkins+git (2)

After saving, you can see the name branch and branch information we just filled in at the construction parameter selection
jenkins+git (2)

    开始构建,

jenkins+git (2)

If you want to specify the branch to be built, manually enter the branch name in the source code management office. For example, if I
jenkins+git (2)
save the new branch zhou locally, I can select the branch zhou at the construction parameter selection.
jenkins+git (2)

Select the branch zhou to be built and start building
jenkins+git (2)

Guess you like

Origin blog.51cto.com/xiaoahehe/2571267