edgexfoundry / ci-management

Control repo for Jenkins job and build minion definitions | Owner: DevOps WG
Apache License 2.0
10 stars 34 forks source link

Make stage-snap jobs more smart about pushing metadata #475

Open anonymouse64 opened 5 years ago

anonymouse64 commented 5 years ago

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 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:

Note that this would probably just be another step in a potential snap job jenkins pipeline

jamesrgregg commented 4 years ago

@tonyespy perhaps you could take a look at this issue in our icebox and let us know if this is still relevant and something we should consider for Hanoi scope. Thank you.

tonyespy commented 4 years ago

@jamesrgregg yes, I think this should be considered for Hanoi. The proposed changes are fairly simple. At minimum, we just restrict the metadata push to releases from master. I'm not sure it's worth doing the additional optimization (i.e. diff store metadata against local metadata, and only push if different) though.