IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
41 stars 140 forks source link

HowTo - Manage our own dependencies #280

Closed FALLAI-Denis closed 1 year ago

FALLAI-Denis commented 1 year ago

Hi,

In our context of use, each source file to be the subject of a build is associated with another file giving the properties for the build to be performed. This second file takes the full name of the file to which it adds a second ".build" extension in same (Git) folder:

sourcefile.ext <--> sourcefile.ext.build

The sourcefile.ext.build file can be seen as a properties file associated with the sourcefile.ext file.

When any of these two files is modified, the main file sourcefile.ext must be rebuilt. However, the sourcefile.ext.build file is not itself the subject of a build, and as no output component.

So there is a dependency, direct or indirect, of the sourcefile.ext.build file on the sourcefile.ext file.

Can zAppbuild handle this dependency, and if so how should it be done?

Thanks.

dennis-behm commented 1 year ago

@FALLAI-Denis ,

We have documented that recipe in the zAppBuild Wiki 👍 . Unfortunately, we missed to use permanent links to the different script locations.

It is not directly available in zAppBuild, but the above recipe will allow it in both User and Pipeline builds.

dennis-behm commented 1 year ago

@FALLAI-Denis with your recent question #284 , one additional comment on this question, while indirectly related:

You could even use a third collection to store these dependency information, which allows you to keep the information each in a dedicated collection.

dennis-behm commented 1 year ago

Closing this discussion.