edgexfoundry / edgexfoundry/ci-management
Make stage-snap jobs more smart about pushing metadata
- Dominant language
- Shell
- Stars
- 11
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Currently, all of the snap's that are released from the jenkins `stage-snap` jobs also have a step to push the metadata for the snap:
https://github.com/edgexfoundry/ci-management/blob/0bb57b7373a9f089b6b40c32958e40c60024a6f1/shell/edgexfoundry-snapcraft.sh#L81-L82
This is less than ideal because when we start having multiple git branches building stage-snap jobs concurrently, if the metadata gets out of sync the metadata on the store page will flip between the two jobs as the `stage-snap` jobs for each branch runs. What we did for edgex-go (and thus the [`edgexfoundry`](snapcraft.io/edgexfoundry) snap) is just to ensure that the metadata such as the title, description, license, etc. always matches across the git branches so that there is no visible changes, however this is hacky and subject to be forgotten as maintainers change, etc.
Instead what would be ideal is to have the stage-snap job check if it needs to push metadata by checking 2 conditions:
* The stage-snap job is building on the master branch (we probably only want to pull metadata from the master branch)
* The metadata in the snap file that was just built by the `stage-snap` job doesn't match what is already in the store. This could be done with the snap store's REST API, but would be a little bit finicky I think.
Note that this would probably just be another step in a potential snap job jenkins pipeline
Contributor guide
Assessment
This issue has not been assessed yet.