-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
rm workspace/aqa-tests/TKG if cleanWs() fails #4426
Conversation
Looking at this code, it feels like there is a big chunk of duplicate code in the zos and non-zos case: aqa-tests/buildenv/jenkins/openjdk_tests Lines 292 to 308 in 8c6c017
and aqa-tests/buildenv/jenkins/openjdk_tests Lines 317 to 333 in 8c6c017
Is there an opportunity to also reduce duplication within runTest()? |
Also, the cleanWs code in this PR is duplicated from aqa-tests/buildenv/jenkins/JenkinsfileBase Lines 858 to 868 in 8c6c017
We should create a function for it as it is used in 3 places. |
2aad837
to
a960858
Compare
Grinder: |
Defined the function forceCleanWS() twice. One is in jenkinsfileBase ( for post stage of jenkins job) and one is in openjdk_tests ( Initial stage of the jenkins job). Otherwise extra the git clone ( an extra git clone for this specific case) or curl the file jenkinsfileBase file would be needed. I'm fine with two definitions, but open to other suggestions. |
buildenv/jenkins/JenkinsfileBase
Outdated
try { | ||
cleanWs disableDeferredWipeout: true, deleteDirs: true | ||
} catch (Exception e) { | ||
echo 'Exception: ' + e.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace?
buildenv/jenkins/openjdk_tests
Outdated
@@ -295,7 +295,7 @@ def runTest() { | |||
} | |||
retry_count++ | |||
timeout(time: 1, unit: 'HOURS') { | |||
cleanWs disableDeferredWipeout: true, deleteDirs: true | |||
forceCleanWS() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace?
buildenv/jenkins/openjdk_tests
Outdated
try { | ||
cleanWs disableDeferredWipeout: true, deleteDirs: true | ||
} catch (Exception e) { | ||
echo 'Exception: ' + e.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace again
804a776
to
9d059c8
Compare
buildenv/jenkins/JenkinsfileBase
Outdated
@@ -1246,7 +1235,7 @@ def run_parallel_tests() { | |||
def childJobs = parallel parallel_tests | |||
node { | |||
// cleanWs() does not work in some cases, so set opts below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the comment? If so, it should be moved before line1298?
Signed-off-by: Sophia Guo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related #4417 (comment)
Related adoptium/infrastructure#2630
Signed-off-by: Sophia Guo [email protected]