Check if last version Git tag exists
Summary:
Last upgrade to 4.9.2 created the tag "latest" on Docker Hub,
but not the tag "4.9.2", as the Git tag was missing.
More generally, tags management (tag locally, push tags) is prone to errors
for repositories where packages publishing depends of tags definition.
This Jenkins pipeline detect that case and suggest a simple way to ensure
the expected new tag is pushed to the reference repository.
Test Plan:
- Created on ci.nasqueron.org a pipeline docker-openfire-sandbox project
- Run the job with that Jenkinsfile Groovy code, build pass
Reviewers: aceppaluni
Reviewed By: aceppaluni
Differential Revision: https://devcentral.nasqueron.org/D3605