If I'm not mistaken, there doesn't seem like there's anything too special there that couldn't be replaced with a more familiar line like in Jenkinsfile.release:
I already thought about reusing the shared library.
we could also do:
checkout(githubScm.resolveRepository("kogito-runtimes", "kiegroup", env.BRANCH_NAME, false))
Currently, each build stage in
Jenkinsfile.deploy
has an unwieldy long line of code to checkout the repository:https://github.com/Kevin-Mok/kogito-runtimes/blob/2fe5b346f10e67cf07c24d0660ca1dacd4538120/Jenkinsfile.deploy.new#L39
If I'm not mistaken, there doesn't seem like there's anything too special there that couldn't be replaced with a more familiar line like in
Jenkinsfile.release
:https://github.com/Kevin-Mok/kogito-runtimes/blob/2fe5b346f10e67cf07c24d0660ca1dacd4538120/Jenkinsfile.release#L26-L27
Or even better, using the checkout function from the shared library:
This goes hand-in-hand with #1 such that all the cloning could be in a single stage with cleaner syntax.