CBS script enhancements to manage packages lifecycle and ability to fetch external dependencies#299
Conversation
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
|
|
||
| # 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.
Would it make sense to remove this line and the next one?
There was a problem hiding this comment.
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.
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.
Can we externalize this cache folder location with a property in the pipelineBackend.config?
There was a problem hiding this comment.
I have updated the pipelineBackend.config with new settings and implemented the logic for the fetch
|
|
||
| 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.
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.
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.
There was a problem hiding this comment.
I still disagree to use the dependencies section to load our own baseline, we should use the baseline section of the AD file to retrieve the baseline archive from the artifactory repository.
| yamlBuilder externalDependencies | ||
|
|
||
| externalDependencyFile = new File(props.externalDependenciesFilePath) | ||
| externalDependencyFile.withWriter("IBM-1047") { extDepWriter -> |
There was a problem hiding this comment.
For the sake of clarity, tagging is missing, even if it might not be useful.
Co-authored-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
M-DLB
left a comment
There was a problem hiding this comment.
A couple of changes. I think we're close, but we could simplify it a bit more, especially with not printing "packageUrl=" when calling computePackageUrl. By the way can we rename it to computeArchiveUrl? :)
I've tried to remove occurrences of Package as much as I can and i know I missed a few, if you can have a look, please.
| dependency.name = applicationDependency | ||
| dependency.version = version | ||
| dependency.type = type | ||
| dependency.type = type |
There was a problem hiding this comment.
There is a mix a tabs and spaces in the indentation.
| * If an existing baseline for a given branch already exists, the method replaces it | ||
| */ | ||
|
|
||
| def addBaseline(ApplicationDescriptor applicationDescriptor, String branch, String baseline) { |
There was a problem hiding this comment.
I think this is derived from the MM. We don't need it here - @M-DLB do you want me to add it back in? Then we can share the entire utils interchangeability?
There was a problem hiding this comment.
Yes please. For easy management, we should have the exact same version than in the MM. You then might want to open a PR on the MM, to update it as well there :)
| if [[ ! ${PackageInputFile:0:1} == "/" ]] ; then | ||
| checkWorkspace | ||
| PackageInputFile="$(getLogDir)/${PackageInputFile}" | ||
| if [ ! ${PackageInputFile:0:1} == "/" ] && [ -z "${usePackageUrl}" ]; then |
There was a problem hiding this comment.
ArchiveInputFile? I know WD uses packageInputFile...
No need to change...
There was a problem hiding this comment.
With introducing the Archive - we already start with a new terminology. We should apply the Wazi Deploy terms here.
Co-authored-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
M-DLB
left a comment
There was a problem hiding this comment.
Thanks @dennis-behm for these great enhancements!
…etch external dependencies (IBM#299) * (CBS) packageBuildOutputs.sh to follow implemented naming conventions how archives are published to Artifact repository * (CBS) dbbBuild.sh and zBuilder.sh to process build dependency configuration defined in the Application Descriptor * (CBS) Download external dependencies based on naming conventions from the artifact repository (Nexus, Artifactory) using the ArtifactRepositoryHelpers * (CBS) Expanding the external dependencies in the build workspace for consumption by the build framework * (CBS) Central cache of external archives * (CBS) Enable wazideploy-generate to automatically download the tar from the Artifact repository * (CBS) Scripts no longer carry configuration parameters to point to existing scripts. It references the scripts directly within this repo. --------- Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com> Co-authored-by: Mathieu Dalbin <mathieu.dalbin@fr.ibm.com> Co-authored-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
This is extending the existing common backend scripts
dbbBuild.shandzBuilder.shto automatically fetch external dependencies from an artifact repository (instead of any concatenation).It updates the structure how tar files are store in the Artifact repository.
wazideploy-generate.sh script to enhanced to re-compute the url of the package, to be able to download the the package with the Wazi Deploy provided mechanics.
High-level capabilities for fetch capability:
Deployment:
Additional changes:
uploadanddownloadare enhanced to return their return code