-
Notifications
You must be signed in to change notification settings - Fork 133
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
Enhanced Packaging process #262
Conversation
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
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.
@M-DLB can you please have a look to the additional comments, please?
} | ||
} else { | ||
println "*! Copying $container(${deployableArtifact.file}) could not be copied due to missing mapping. Packaging failed." | ||
props.error = "true" | ||
println "*! [ERROR] Copy failed: The file '$container(${deployableArtifact.file})' could not be copied due to missing mapping." |
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.
What about?
println "*! [ERROR] Copy failed: The file '$container(${deployableArtifact.file})' could not be copied due to missing mapping." | |
println "*! [ERROR] Copy failed: The file '$container(${deployableArtifact.file})' could not be copied. No mapping found for last level qualifier in script configuration 'copyModeMap'. Please verify." |
} | ||
} | ||
if (props.generateSBOM && props.generateSBOM.toBoolean() && !props.error) { | ||
if (props.generateSBOM && props.generateSBOM.toBoolean() && rc < 1) { |
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.
What about
if (props.generateSBOM && props.generateSBOM.toBoolean() && rc < 1) { | |
if (props.generateSBOM && props.generateSBOM.toBoolean() && rc == 0) { |
rc = runProcess(processCmd, new File(props.workDir)) | ||
assert rc == 0 : "Failed to append $logPattern." | ||
processRC = runProcess(processCmd, new File(props.workDir)) | ||
assert processRC == 0 : "Failed to append '$logPattern'." |
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.
Isn't the idea of rc
to now properly run through the script and avoid Assert Exceptions?
@@ -742,10 +751,12 @@ def relativizePath(String path) { | |||
class DeployableArtifact { | |||
private final String file; | |||
private final String deployType; | |||
private final Boolean zFSArtifact; |
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.
It's odd to see zFSArtifact
, I assume if this is false, it assumes to be a PDS member?
What if you introduce a String objectType
that can be zFSArtifact
, PDS-MEMBER
, SEQ-Dataset
... So, it allows a bit more flexibility for additional objects, that we want to package in the future.
@@ -755,7 +766,7 @@ class DeployableArtifact { | |||
} | |||
|
|||
public boolean equals(DeployableArtifact other) { |
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.
This misses a method description.
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.
With the rc
logic, should we now rework a bit the section starting in line 688 as well, instead of throwing AssertionErrors?
@@ -665,7 +660,7 @@ def parseInput(String[] cliArgs){ | |||
} | |||
|
|||
if(opts.t == false) { | |||
println("*! Error: tarFilename is only optional when no build report order is specified") | |||
println("*! [ERROR] tarFilename is only optional when no build report order is specified") |
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.
println("*! [ERROR] tarFilename is only optional when no build report order is specified") | |
println("*! [VALIDATION-ERROR] tarFilename is only optional when no build report order is specified") |
@@ -665,7 +660,7 @@ def parseInput(String[] cliArgs){ | |||
} | |||
|
|||
if(opts.t == false) { | |||
println("*! Error: tarFilename is only optional when no build report order is specified") | |||
println("*! [ERROR] tarFilename is only optional when no build report order is specified") | |||
System.exit(3) |
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.
I think, this should used rc
, right? And there are a couple of more exits
in the validation .
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
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.
Hi @M-DLB, thanks for the fixes. Some additional comment and suggestions.
|
||
props = parseInput(args) | ||
|
||
def startTime = new Date() | ||
// Just printing the Usage and exiting |
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.
Let's add that into the parseInput method
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
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.
Thank you @M-DLB
This PR contains various fixes and an enhancement to the error management in the script.