[ 
https://issues.apache.org/jira/browse/SLING-11540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579260#comment-17579260
 ] 

Konrad Windszus edited comment on SLING-11540 at 8/13/22 5:12 PM:
------------------------------------------------------------------

I now configured the Git SCM Extension "Clean Checkout" 
(https://plugins.jenkins.io/git/#plugin-content-clean-after-checkout) in the 
GitHub Organization Job at 
https://ci-builds.apache.org/job/Sling/job/modules/configure. Unfortunately the 
new setting is not propagated to the existing multibranch jobs.
[~rombert] Any idea how to set the same via the step "properties" 
(https://www.jenkins.io/doc/pipeline/steps/workflow-multibranch/#properties-set-job-properties)?

I also found 
https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-customize-checkout-for-pipeline-multibranch
 but this approach seems deprecated now that 
https://issues.jenkins.io/browse/JENKINS-37658 is fixed.


was (Author: kwin):
I now configured the Git SCM Extension "Clean Checkout" in the GitHub 
Organization Job at 
https://ci-builds.apache.org/job/Sling/job/modules/configure. Unfortunately the 
new setting is not propagated to the existing multibranch jobs.
[~rombert] Any idea how to set the same via the step "properties" 
(https://www.jenkins.io/doc/pipeline/steps/workflow-multibranch/#properties-set-job-properties)?

I also found 
https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-customize-checkout-for-pipeline-multibranch
 but this approach seems deprecated now that 
https://issues.jenkins.io/browse/JENKINS-37658 is fixed.

> Always clear workspace
> ----------------------
>
>                 Key: SLING-11540
>                 URL: https://issues.apache.org/jira/browse/SLING-11540
>             Project: Sling
>          Issue Type: Improvement
>          Components: CI
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The build may fail after refactorings as the working directory on the node is 
> not empty prior to the SCM checkout (and some folders are never overwritten 
> by an SCM checkout).
> That leads to errors like the following:
> {code}
> ....
> [INFO] --- apache-rat-plugin:0.14:check (rat-check) @ sling-maven-plugin ---
> [WARNING] Files with unapproved licenses:
>   parent/target/.plxarc
>   parent/target/rat.txt
>   relocate/target/.plxarc
>   relocate/target/rat.txt
> ...
> [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.14:check 
> (rat-check) on project sling-maven-plugin: Too many files with unapproved 
> license: 1236 See RAT report in: 
> /home/jenkins/jenkins-agent/workspace/odules_sling-maven-plugin_master/jdk_1.8_latest/target/rat.txt
>  -> [Help 1]
> {code}
> (the log is from 
> https://ci-builds.apache.org/job/Sling/job/modules/job/sling-maven-plugin/job/master/129/consoleFull).
> This is due to the fact that the modules {{parent}} and {{relocate}} have 
> been deleted, but their orphaned {{target}} directories are not removed and 
> survive a build.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to