码迷,mamicode.com
首页 > 其他好文 > 详细

jenkins插件使用小结

时间:2015-04-22 20:39:19      阅读:569      评论:0      收藏:0      [点我收藏+]

标签:

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

jenkins插件使用小结

标签:

原文地址:http://www.cnblogs.com/276815076/p/4448413.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!