jenkins插件使用小结

jenkins官网:https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project

jenkins插件:

1.AnsiColor : This plugin adds support for ANSI escape sequences, including color, to Console Output.

2.Ant Plugin :This plugin adds Apache Ant support to Jenkins.

3.Copy Artifact Plugin :Adds a build step to copy artifacts from another project.

4.Custom View Tabs Plugin : This plugin allows custom labels and colours on view tabs to show job status information.

5.External Monitor Job Type Plugin : Adds the ability to monitor the result of externally executed jobs.

6.Gerrit Trigger : This plugin integrates with Gerrit code review.

7.Git Client Plugin : Shared library plugin for other Git related Jenkins plugins.

8.Git Plugin : This plugin integrates GIT with Jenkins.

9.LDAP Email Plugin : This plugin resolves user email addresses from an LDAP directory. It is not needed if Jenkins uses LDAP as its authentication source and user records have a standard "mail" attribute.

10.LDAP Plugin : Adds LDAP authentication to Jenkins.

11.Matrix Authorization Strategy Plugin : Offers matrix-based security authorization strategies (global and per-project).

12.Matrix Project Plugin : Multi-configuration (matrix) project type.

13.Multiple SCMs Plugin : This plugin enables the selection of multiple source code management systems for a build. For example, it enables checking out the source code from one SCM while checking out legacy or third-party code from another.

14.Nested View Plugin : View type to allow grouping job views into multiple levels instead of one big list of tabs.

15.Parameterized Remote Trigger Plugin : This plugin triggers a job on a remote Jenkins host

16.Parameterized Trigger plugin : This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build.

17.Promoted Builds Plugin : This plugin implements a "promoted build" feature where a build of one job can be marked as "promoted" when it passes certain criteria.

18.SCM API Plugin : This plugin provides a new enhanced API for interacting with SCM systems.

19.Translation Assistance Plugin : This plugin adds an additional dialog box in every page, which enables people to contribute localizations for the messages they are seeing in the current page.

20.Subversion Plugin : This plugin adds the Subversion support (via SVNKit) to Jenkins.

jenkins环境变量:

Jenkins Set Environment Variables

When a Jenkins job executes, it sets some environment variables that you may use in your shell script, batch command, Ant script or Maven POM 1. The following table contains a list of all of these environment variables.

Environment Variable Description
BUILD_NUMBER The current build number, such as "153"
BUILD_ID The current build id, such as "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss)
BUILD_URL & T/ z: D: Z/ Z0 G  w The URL where the results of this build can be found (e.g. http://buildserver/jenkins/job/MyJobName/666/)
NODE_NAME The name of the node the current build is running on. Equals ‘master‘ for master node.
JOB_NAME Name of the project of this build. This is the name you gave your job when you first set it up. It‘s the third column of the Jenkins Dashboard main page.
BUILD_TAG String of jenkins-${JOB_NAME}-${BUILD_NUMBER}. Convenient to put into a resource file, a jar file, etc for easier identification.
JENKINS_URL Set to the URL of the Jenkins master that‘s running the build. This value is used by Jenkins CLIfor example
EXECUTOR_NUMBER The unique number that identifies the current executor (among executors of the same machine) that‘s carrying out this build. This is the number you see in the "build executor status", except that the number starts from 0, not 1.
JAVA_HOME If your job is configured to use a specific JDK, this variable is set to the JAVA_HOME of the specified JDK. When this variable is set, PATH is also updated to have $JAVA_HOME/bin.
WORKSPACE The absolute path of the workspace.
SVN_REVISION For Subversion-based projects, this variable contains the revision number of the module. If you have more than one module specified, this won‘t be set. 
CVS_BRANCH For CVS-based projects, this variable contains the branch of the module. If CVS is configured to check out the trunk, this environment variable will not be set.
GIT_COMMIT  For Git-based projects, this variable contains the Gitish of the commit checked out for the build3 ^: F6 x* y5 ~+ ?+ S5 O
GIT_BRANCH  For Git-based projects, this variable contains the Git branch that was checked out for the build (normally master) ; k. N; D; |- _( _- z( e( W

Promoted Build Plugin Environment Variables

If you are using the Promoted Build Plugin, you will have access to the following environment variables. This allows you to access information about your Jenkins build since certain environment variables stated above (such as BUILD_TAG now refer to the Promoted Build Plugin‘s job.

Environment Variable Replaces Description
PROMOTED_URL BUILD_URL The URL of the original Jenkins job that is involved with the promotion. BUILD_URL now refers to the Promotion‘s URL
PROMOTED_JOB_NAME JOB_NAME The name of the original Jenkins job that is involved with the promotion. JOB_NAME now refers to the Promotion‘s job‘s name
PROMOTED_NUMBER BUILD_NUMBER The Build Number of the job being promoted. BUILD_NUMBER now refer‘s the the Promotion Number
PROMOTED_ID BUILD_ID The Build ID (ex. "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss) ) of the original Jenkins job. BUILD_ID now refer‘s to the Promotion‘s build ID.

向其他project传递参数方式:

当前project的build_num:

REAL_DEPLOY_NUM=<SpecificBuildSelector><buildNumber>$PROMOTED_NUMBER</buildNumber></SpecificBuildSelector>

当前project的project_name

QUICK_JOB=$PROMOTED_JOB_NAME

时间: 2024-11-03 22:34:34

jenkins插件使用小结的相关文章

jenkins插件的安装与卸载

说明 Jenkins大部分的功能都是插件来实现的,所以必须知道jenkins插件的安装和卸载. 一.配置插件代理 jenkins在安装插件时候经常出现无法安装的情况,所以可以通过配置jenkins代理,来解决这个问题.如下: 系统管理→插件管理: 高级→代理设置: 上述截图中,我们只需要输入代理服务器地址.端口.用户名和密码,就完成了jenkins插件代理的配置. 二.安装插件 Jenkins插件的安装,我们可以分为自动安装和手动安装两种,下面分别介绍. 2.1 自动安装插件 自动安装插件,我们

安装jenkins插件的两种方法

安装jenkins插件有两种方法,一种是在线安装,一种是离线安装.两种方式介绍如下: 1.如果服务器可以上网,那边选择在线安装最好不过了,安装流程为:系统管理----插件管理---选择需要的插件直接安装即可 2.如果服务器不能上网,那么就只能离线安装,首先去 http://updates.jenkins-ci.org/download/plugins/ 下载需要的plugin,选择匹配的版本号,下载到本地,然后打开:系统管理---插件管理-高级---找到"上传插件"(浏览,找到扩展名为

Jenkins插件、war下载地址

1.jenkins的war包下载地址 地址:http://mirrors.jenkins-ci.org/,打开链接后,表格有war列,Releases行是短期更新包.LTS是长期更新包.一般选择Releases下载即可. 2.jenkins各插件的下载地址 地址:http://mirrors.jenkins-ci.org/plugins/ 3.修改jenkins工作目录 地址:http://kurenai.elastos.org/2013/03/29/,第六篇文章 4.批处理update SVN

Jenkins插件管理

1.配置jenkins需要的maven.jdk路径 1 [[email protected] secrets]# echo $JAVA_HOME 2 /application/jdk 3 [[email protected] secrets]# java -version 4 java version "1.8.0_60" 5 Java(TM) SE Runtime Environment (build 1.8.0_60-b27) 6 Java HotSpot(TM) 64-Bit S

Jenkins - 插件管理

about 环境是Windows 我们来介绍以下如何在Jenkins中安装插件.首先获取自己的Jenkins的版本页面的右下角可以看到Jenkins的版本. 自动安装 所谓的自动安装,就是通过Jenkins的插件管理来搜索下载插件.选择系统管理下面的插件管理,选择可选插件,然后在过滤输入框中输入你想要的插件,然后点击直接下载即可.PS:如果该插件已存在,貌似不会有过滤结果.......完事之后,会进入插件安装步骤.当你勾选了安装后重启Jenkins(空闲时),就会在合适的时间进行重启Jenkin

Jenkins插件管理及汉化

Jenkins插件管理 Jenkins本身不提供很多功能,我们可以通过使用插件来满足我们的使用.例如从Gitlab拉取代码,使用Maven构建项目等功能需要依靠插件完成.接下来演示如何下载插件.修改Jenkins插件下载地址Jenkins国外官方插件地址下载速度非常慢,所以可以修改为国内插件地址:Jenkins->Manage Jenkins->Manage Plugins,点击Available  等这个页面请求好,然后修改这样做是为了把 Jenkins官方的插件列表下载到本地,接着修改地址

java.lang.NoSuchMethodError,jenkins插件升级导致问题报错

Started by user test java.lang.NoSuchMethodError: org.eclipse.jgit.lib.Repository.getRef(Ljava/lang/String;)Lorg/eclipse/jgit/lib/Ref; at jenkins.plugins.git.GitSCMFileSystem$1.invoke(GitSCMFileSystem.java:117) at jenkins.plugins.git.GitSCMFileSystem

jenkins插件pipeline使用介绍

pipeline字面意思就是流水线,将很多步骤按顺序排列好,做完一个执行下一个.下面简单介绍下如何使用该插件帮我们完成一些流水线型的任务一,安装pipeline.进入jenkins的[系统管理]--[插件管理]页面,选择[可选插件]然后搜索pipeline. 然后选择直接安装,它会将依赖的一些插件也一并安装.安装完成后重启jenkins就可以使用了.二,使用pipeline.1.在jenkins主页点击新建视图 2.然后选择[Build Pipeline View]  3.创建完成后可以对它进行

使用jenkins 插件自动部署项目至tomcat

前面使用maven.ant编译项目就不说,只说一下使用jenkins的插件自动部署项目 1.首先jenkins安装插件Deploy to container Plugin ,下载地址为:https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin 2.安装完后,将会在项目配置中见到一下选项 3.配置tomcat远程部署账号,在tomcat目录下conf文件内tomcat-users.xml 文件增加以下配置 <role rolename=&quo