Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
JENKINS-16426: back up only directorys in the job directory
- Loading branch information
|
@@ -111,6 +111,28 @@ |
|
|
<version>1.3</version> |
|
|
<scope>test</scope> |
|
|
</dependency> |
|
|
<dependency> |
|
|
<groupId>org.jenkins-ci.main</groupId> |
|
|
<artifactId>jenkins-core</artifactId> |
|
|
<version>1.409</version> |
|
|
<exclusions> |
|
|
<exclusion> |
|
|
<artifactId>junit</artifactId> |
|
|
<groupId>junit</groupId> |
|
|
</exclusion> |
|
|
</exclusions> |
|
|
</dependency> |
|
|
<dependency> |
|
|
<groupId>org.jenkins-ci.main</groupId> |
|
|
<artifactId>jenkins-test-harness</artifactId> |
|
|
<version>1.409</version> |
|
|
<exclusions> |
|
|
<exclusion> |
|
|
<artifactId>junit</artifactId> |
|
|
<groupId>junit</groupId> |
|
|
</exclusion> |
|
|
</exclusions> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
<distributionManagement> |
|
|
<repository> |
|
@@ -125,8 +147,9 @@ |
|
|
<pluginManagement> |
|
|
<plugins> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-compiler-plugin</artifactId> |
|
|
<version>2.3.2</version> |
|
|
<version>3.0.0</version> |
|
|
<executions> |
|
|
<execution> |
|
|
<id>default-testCompile</id> |
|
|
|
@@ -177,7 +177,7 @@ private void backupJobsDirectory(final File jobsDirectory, final File jobsBackup |
|
|
|
|
|
for (final String jobName : jobNames) { |
|
|
final File jobDirectory = new File(jobsDirectory, jobName); |
|
|
if (jobDirectory.exists()) { // sub jobs e.g. maven modules need not be copied |
|
|
if (jobDirectory.exists() && jobDirectory.isDirectory()) { // sub jobs e.g. maven modules need not be copied |
|
|
if (jobDirectory.canRead()) { |
|
|
File childJobsFolder = new File(jobDirectory, HudsonBackup.JOBS_DIR_NAME); |
|
|
if (childJobsFolder.exists()) { // found CloudBeesFolder |
|
|