This is an outline of what I (Nick M) believe we need to correctly version releases with our bbl pipeline. This has been tried many times, but we always find some problem. I suspect that one factor is people jumping in and trying to implement it without a clear idea of the necessary design. I will attempt to lay that design out clearly here.
- making ourselves remember to bump the version before the main pipeline starts
- the bump-deployments pipeline publishing using the latest release's major and minor versions, rather than the major and minor versions of the release that it was built on top of.
Relevant jobs:
- main pipeline: cut github draft release
- bump-deployments pipeline: publish github release
- main pipeline: manually bump major version
- main pipeline: manually bump minor version
- bump-deployments pipeline: whichever job pulls in the latest github release
Relevant resources:
- main pipeline semver
- full semver of release that bump-deployments pipeline is building on top of
Requirements:
- job
1
should cut a github draft release with version in resource1
without anypassed
constraints (so that we can bump the version right before cutting the release rather than needing to do it before the whole pipeline runs) - job
5
should get the full semver of the release it pulls in, bump the patch version, andput
that to resource2
- resource
2
should be passed through the bump-deployments pipeline withpassed
constraints (so that job2
doesn't use the wrong semver in the case where the pipeline kicks off again with a new release) - job
2
should publish a github release with the version in resource2
(withpassed
constraint) - job
3
should bump major version of resource1
(resetting minor and patch to0
) - job
4
should bump minor version of resource1
(leaving major the same and resetting patch to0
)
Note: Although I talked about resetting the patch version of resource 1
(in requirements 5
and 6
), it should always be set to 0
. Patch versions are only bumped by the bump-deployments pipeline, which uses resource 2
.