conjurdemos / pet-store-demo

Tiny pet store app suitable for use in demos, tutorials, and POCs
Apache License 2.0
4 stars 24 forks source link

Fixes rule for when to publish image to DockerHub #40

Closed diverdane closed 3 years ago

diverdane commented 3 years ago

Currently, the checks for whether to publish or not in Jenkins is looking for the branch name for a commit to be "main", and then there's a check for git description --tags returning a perfect semver tag.

This check is broken, since pushes with tagged versions will have a branch name being the version tag (e.g. v1.2.0), rather than having a branch name of main.

The fix is to check for the branch name being a version tag (i.e. a v followed by a semver version number, e.g. v1.2.0). This check is added to the Jenkinsfile, so we can eliminate any conditionals/checking of branches/tags in bin/publish (i.e. that script publishes unconditionally).