As a user, I would like to be able to access semvers used for promotion for non-docker components
jcantosz opened this issue · 0 comments
jcantosz commented
For promotion pipelines, it would be useful for the promote
to use modular components so that items like the currSemVers can be accessed and used to promote non-docker artifacts (ie. npm, nuget, python, etc) when an image is promoted without duplicating this code.
In the simplest sense this could be done like:
class BoxPromote {
def getCurrentSemanticVersion(){ ... }
def getNextSemanticVersion(){ ... }
def hasVersionChanged(){ ... }
}
with a subclass like this using it as it likes:
class MyPromote extends BoxPromote {
@Override
def init(){
def currVer = getCurrentSemanticVersion()
def nextVer = getNextSemanticVersion()
Config.pipeline.env['VERSION'] = (hasVersionChanged()) ? currVer : nextVer
}
}