jekins说明

日程表语法 http://www.360doc.com/content/13/0412/09/10504424_277718090.shtml
“构建触发器”选项用来配置什么时候会进行构建项目:
Build whenever a SNAPSHOT dependency is built:当此项目所依赖的项目在jenkins中被构建
Build after other projects are built:在某个项目被构建后,构建此项目
Build periodically:按照指定的时间间隔进行自动构建,不管代码有没有变更。
Poll SCM:按照指定的时间间隔对SCM进行检测,如果代码库有更新则拉取后进行构建。
--------------
“pre steps”:build命令之前执行的操作。可以写脚本。
Root POM:项目中pom.xml所在的路径,此路径是相对于workspace的相对路径。
Goals and options:可以填写,build命令后跟的参数,如:clean install(先clean在install),clean install -Dmaven.test.skip=true(清除以前的包,重新打包,并跳过测试)
If you are executing a Windows Batch Command,the variables should be referenced using the %VARIABLE_NAME% pattern. For example:
0_Script\CopyLastTestResultsToBuildFolder.cmd Build_%BUILD_NUMBER%
Ececute shell:
build.sh -label $JOB_NAME-$BUILD-NUMBER -java_home $JAVA_HOME
---------------
“post steps”:build命令之后执行的操作。同pre steps。同样可以写脚本。
------------
BUILD_NUMBER:目前的构建号The current build number, such as "153"
BUILD_ID:构建ID The current build id, such as "2005-08-22_23-59-59"
BUILD_URL :The URL where the results of this build can be found
NODE_NAME:The name of the node the current build is running on
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}.
JENKINS_URL:Set to the URL of the Jenkins master that's running the build. This value is used by Jenkins CLI for 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.
WORKSPACE:The absolute path of the workspace.
GIT_COMMIT :每次提交的哈希值
GIT_URL:git clone ...(就是GIT_URL)
GIT_BRANCH :分支名
https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project
------------------------------------------------------------------
https://segmentfault.com/a/1190000002895521

猜你喜欢

转载自zouhuiying.iteye.com/blog/2282608