jenkins的日志在什么地方

jenkins的日志在什么地方,第1张

浏览器打宴梁开http://<jenkins-server>/log/all 可以看到所有的错误日志。

如果罩慧在master机器上的话

Linux:/var/log/jenkins/jenkins.log

Windows:%JENKINS_HOME%/jenkins.out 和 %JENKINS_HOME%/jenkins.err

每台slave上有相应的jenkins-slave log文件和master路径一晌闷运样

如果只是要看某个build的日志,打开job,在Build History中点开相应的build,点左边的Console Output

更多可以参见https://wiki.jenkins-ci.org/display/JENKINS/Logging

浏览器打开http://<jenkins-server>/log/all 可以看到所有的错误日志。

如果在master机器上的话:

Linux:/var/log/jenkins/jenkins.log

Windows:%JENKINS_HOME%/jenkins.out 和 %JENKINS_HOME%/jenkins.err

每台slave上有相应的jenkins-slave log文件和master路径一样

首先保证系统中已经安装了jdk,最好是jdk1.5以上。

第一种启动方法,切换到jenkins.jar存放的目录旅宏,输入如下命令:

$ java -jar jenkins.jar

然后在浏览器中(推荐用火狐)输入localhost:8080,localhost可以是本机的ip,也可以是计算机名。就可以打开jenkins

第二种方法是用tomcat打开带碰

解压tomcat到某个目录,如/usr/local,进入tomcat下的/bin目录,启动tomcat

将jenkins.war文件放入tomcat下的webapps目录下,启动tomcat时,会自动在webapps目录下建立jenkins目录,所以在地址栏上需要输入的地址于上一种方法有点不拆行册一样。

例如:${JOB_NAME}_${BUILD_DATE_FORMATTED, "yyyyMMdd"}_${BUILDS_TODAY}

BUILD_DATE_FORMATTED

Takes the second argument and returns a java-formatted date string for the given build date. For example, ${BUILD_DATE_FORMATTED, "yyyy-MM-dd"} would return the date (and not the time) as something like 2009-10-01. The date format string must be surrounded by quotes, and any whitespace within the format string is significant.

BUILD_DAY

With no arguments, it just returns the day of the build as an integer. If there is an argument, it takes the number of characters in the argument and uses that pad the date string. For example, if it's the third of the month, ${BUILD_DAY} would return 3, ${BUILD_DAY, X} would return 3, and ${BUILD_DAY, XX} would return 03.

BUILD_WEEK

Returns the week, with the same argument convention for BUILD_DAY

BUILD_MONTH

Returns the month, with the same argument convention for BUILD_DAY

BUILD_YEAR

Returns the year, with the same argument convention for BUILD_DAY

BUILDS_TODAY

Returns the number of builds that have happened today, including this one. This resets at midnight. The argument convention is the same as for BUILD_DAY

BUILDS_THIS_WEEK

Returns the number of builds that have happened this week, including this one. This resets at the start of the week. The argument convention is the same as for BUILD_DAY

BUILDS_THIS_MONTH

Returns the number of builds that have happened this month, including this one. This resets at the first of the month. The argument convention is the same as for BUILD_DAY

BUILDS_THIS_YEAR

Returns the number of builds that have happened this year. This resets at the first of the year. The argument convention is the same as for BUILD_DAY.

BUILDS_ALL_TIME

Returns the number of builds that have happened since the project has begun. This is distinct from the hudson build number, in that it can be reset periodically (for example, when moving from 1.0.${BUILDS_ALL_TIME} to 2.0.${BUILDS_ALL_TIME}, and can be configured to start at an arbitrary number instead of the standard begin date.

MONTHS_SINCE_PROJECT_START

The number of months since the project start date. This is strictly dependent on the month of the current build and the month of the project start dateif the project was begun October 31st and the build was November 1st, then this would return 1. If the project was begin October 1st and the build was November 30th, this would also return 1. The argument convention is the same as for BUILD_DAY.

YEARS_SINCE_PROJECT_START

The number of years since the project start date. Like MONTHS_SINCE_PROJECT_START, this is dependent only on the year.


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/8228051.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-14
下一篇 2023-04-14

发表评论

登录后才能评论

评论列表(0条)

保存