Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testDependency dir under C:/Users/jenkins/ should not be removed on windows #19791

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions buildenv/jenkins/jobs/infrastructure/Cleanup-Nodes.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ timeout(time: TIMEOUT_TIME.toInteger(), unit: TIMEOUT_UNITS) {
cleanDirsStr += cleanDirs.join(" ${buildWorkspace}/../../")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, or cleanDirs has to change; as is, this still includes ${buildWorkspace}/../../test* which will remove the testDependency directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keithc-ca cleanDirsStr = cleanDirsStr.replaceAll("${buildWorkspace}/../../test\\*", "") this line would exclude removing test* items from ${buildWorkspace}/../../ directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I missed that line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest a better approach would be to add 'test*' to cleanDirs only for non-Windows nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keithc-ca ,
I think even in windows we are required to clean test* dirs in /tmp directory. The only exclusion is for the testDependency dir. Is that not right @llxia @AdamBrousseau?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, are we agreed that we should change those jobs to use a different name than testDependency, say to external or support?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llxia what should be the action taken?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @llxia. It will be good to raise an aqa-tests issue for awareness for others that the folder name will be changed to better support automatic cleaning of test material, while maintaining the benefit of preloading test dependencies. Other than communicating the change and checking that any references to that folder are accounted for, I have no objections.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// shared classes cache
cleanDirsStr += " ${buildWorkspace}/../../javasharedresources /tmp/javasharedresources /temp/javasharedresources"
// to remove {buildWorkspace}/../../test* directories except testDependency
cleanDirsStr = cleanDirsStr.replaceAll("${buildWorkspace}/../../test\\*", "")
sh(script: "ls -d ${buildWorkspace}/../../test* | grep -v '/testDependency\$' | xargs rm -rf", returnStdout: true).trim()
}

// cleanup test results
Expand Down