2
votes

I recently started toying with the workflow plugin to script a build release. When I try to run the script, the release fails because the release plugin complains of untracked files. I have the same set of plugins running and working fine in a traditional job set up.

My set up:

Jenkins Version:1.596
Workflow Plugins : 1.2
OS : Linux 2.6
Build Tool:Apache Maven 3.x
SCM : Git
Release Plugin: JGitFlow (from Atlassian)

My script reads

node {
    git branch: 'develop', url:' ******** '
    sh 'mvn clean install'
    sh 'mvn --batch-mode  jgitflow:release-start  jgitflow:release-finish -Prelease'
}

When I run this script (which is extremely simple), the release fails reporting the presence of untracked files. To debug this, I added a few git status commands intermittently and i can see the following files

  • .6e6a43dd/jenkins-log.txt
  • .6e6a43dd/pid
  • .6e6a43dd/script.sh

When I run 'git status' on my workspace using the shell command line, it says I have no untracked changes.

Any pointers?

1
Are you sure, that you looked at the correct workspace? Jenkins creates (clones) your given git repository into an own folder (you can find it under .jenkins/workspace/<your job name>). I think this is the folder where you find these files. But usually Jenkins does not create any files there...Stefan Wegener

1 Answers

0
votes

This is tracked as JENKINS-27152. The workaround is to list such “control” directories in .gitignore so the Maven release plugin (and similar) do not complain about their presence.