重启后Jenkins符号链接/永久链接断开

时间:2018-04-04 22:09:39

标签: jenkins symlink permalinks

Jenkins版本2.114正在运行构建,但它们似乎在重新启动后从仪表板中消失。我在Linux上安装了Jenkins,所有日志都在 ${JENKINS_HOME}/jobs/${ITEM_FULL_NAME}/builds

我已尝试从磁盘重新加载配置,并在/etc/sysconfig/jenkins

中设置了以下内容
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"

以下是构建和工作区目录设置:

Workspace Root Directory :${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}
Build Record Root Directory: ${ITEM_ROOTDIR}/builds

下面你可以看到内部版本号117和118,但是,lastFailedBuild,lastStableBuild,lastSuccessfulBuild仍然设置为-1,它不存在

drwxr-xr-x 4 jenkins jenkins 4096 Apr  2 20:17 117
drwxr-xr-x 4 jenkins jenkins 4096 Apr  3 20:17 118
lrwxrwxrwx 1 jenkins jenkins    2 Apr  3 11:09 lastFailedBuild -> -1
lrwxrwxrwx 1 jenkins jenkins    2 Apr  4 10:44 lastStableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins    2 Apr  4 03:21 lastSuccessfulBuild -> -1
lrwxrwxrwx 1 jenkins jenkins    2 Apr  3 10:58 lastUnstableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins    2 Apr  3 10:58 lastUnsuccessfulBuild -> -1

我也设置了

Discard Old Builds Slicer - Days to keep artifacts as 30
Discard Old Builds Slicer - Max # of builds to keep as 40

我在其中一个工作上运行了jenkins-job-checker [https://github.com/docwhat/jenkins-job-checker],发现了以下内容:

 Problem: NOTLINK: The number link builds/1 is not a symlink!
 Problem: NOTLINK: The number link builds/2 is not a symlink!
 Problem: NOTLINK: The number link builds/3 is not a symlink!
 Proposal: Archive non-link builds/1
 Proposal: Archive non-link builds/2
 Proposal: Archive non-link builds/3

真的得到了一些帮助

1 个答案:

答案 0 :(得分:0)

我安装了插件 operations-center-context ,这解决了我的问题

我在下面的链接中找到了解决方案:

https://support.cloudbees.com/hc/en-us/articles/216227047-After-moving-a-job-symlinks-for-folders-became-actual-folders