Skip to content

Commit

Permalink
cloudbees-folders are not created anymore if already existing
Browse files Browse the repository at this point in the history
- because of different jobdir for cloudbees-folder an already existing jobs was recreated
  • Loading branch information
mthirdy authored Sep 11, 2024
1 parent 1c0081f commit 6d5dc83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion manifests/job/present.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
}
}

$job_dir = "${jenkins::job_dir}/${jobname}"
# in case of a cloudbees-folder element inserting sub-directory '/jobs' for every folder level so the existing config_path or job_dir/builds is found
$job_subdir_name = regsubst($jobname, /\//, '/jobs/', 'G')
$job_dir = "${jenkins::job_dir}/${job_subdir_name}"
$config_path = "${job_dir}/config.xml"

# Bring variables from Class['::jenkins'] into local scope.
Expand Down

0 comments on commit 6d5dc83

Please sign in to comment.