-
Notifications
You must be signed in to change notification settings - Fork 135
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
Enhance CBS scripts to fetch external dependencies #299
base: main
Are you sure you want to change the base?
Enhance CBS scripts to fetch external dependencies #299
Conversation
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[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.
A few comments.
##################################################################################################### | ||
## DBB-BUILD.sh parameters ########################################################################## | ||
##################################################################################################### | ||
|
||
# Path to main build script build.groovy. | ||
zAppBuild="$HOME/dbb-zappbuild" | ||
# DBEHM: MyCustomization for Path to build.groovy. |
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.
Would it make sense to remove this line and the next one?
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 will be just for testing for the moment
|
||
# (Optional) Additional property files to customize the build framework | ||
zAppBuildPropFiles="" | ||
zAppBuildPropFiles="/var/dbb/dbb-zappbuild-config/build.properties,/var/dbb/dbb-zappbuild-config/datasets.properties,/var/dbb/dbb-zappbuild-config/buildFolder.properties" |
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.
Would it make sense to remove this line?
importFolder.mkdirs() | ||
|
||
// setup package cache | ||
cacheFolder = new File("/tmp/.pkg") |
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.
Can we externalize this cache folder location with a property in the pipelineBackend.config?
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 have updated the pipelineBackend.config with new settings and implemented the logic for the fetch
cacheFolder = new File("/tmp/.pkg") | ||
if (!cacheFolder.exists()) cacheFolder.mkdirs() | ||
|
||
def yamlSlurper = new groovy.yaml.YamlSlurper() |
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.
We have a Utility class for the Application Descriptor in the DBB repo: https://github.com/IBM/dbb/blob/main/Pipeline/PackageBuildOutputs/utilities/applicationDescriptorUtils.groovy
I guess it would be better to use it.
|
||
println("** Downloading application package '$artifactUrl' from Artifact Repository into ${cacheFolder}/${artifactRelPath}.") | ||
def rc = artifactRepositoryHelpers.download(artifactUrl, tarFile as String, user, password, true) | ||
println "download complete $rc" // TODO: Error handling in helper |
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.
Could we have a better info message, and a handling of rc != 0?
} | ||
} | ||
|
||
// Do we actually need this or can this just be obtained from the dependencies? |
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.
The Baseline section of the AD file is meant to describe "dependency" on itself for a given application. It can serve two purposes: the first one is downloading the packages from earlier version that can be used as a base for artifacts that are not rebuilt (i.e., private object decks, generated include files from BMS, ...). The second one is to detect the baselineReference tag during an impact build.
I think the next section is necessary. Maybe it can be optimized to be turned into a method, to minimize the common code with the previous section.
yamlBuilder externalDependencies | ||
|
||
externalDependencyFile = new File(props.externalDependenciesFilePath) | ||
externalDependencyFile.withWriter("IBM-1047") { extDepWriter -> |
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.
For the sake of clarity, tagging is missing, even if it might not be useful.
Co-authored-by: Mathieu Dalbin <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
This is extending the existing common backend scripts
dbbBuild.sh
andzBuilder.sh
to automatically fetch external dependencies from an artifact repository (instead of any concatenation).High-level capabilities: