push versioned container images as part of `make release` target
This ticket proposes an outline of pushing versioned container images with every release:
make releasetarget shall be modified to also call the existingmake docker-pushmake docker-pushtarget shall use theBUILD_VERSIONenvironment variable (similar tomake run-build) to tag the container images, something like below:
docker-push: docker
docker push contiv/volplugin:$(if $(BUILD_VERSION),$(BUILD_VERSION),devbuild)
Actually, let's carve this so that dev builds can't be pushed. This is not necessary and we probably don't want to push them at all to avoid confusing users.
ah, yeah that's a good point. May be we can fail the docker-push target if build-version is empty, assuming that it will caution the user (with push credentials) to think.
docker-push: docker
@if [ "$(BUILD_VERSION)x" == "x" ]; then \
echo "docker-push shall be called with a valid build version. It is usually called from 'make release' CI job"; \
exit 1; \
fi
@docker push contiv/volplugin:$(BUILD_VERSION)
Yes, that was what I was thinking too. Thanks.
-Erik
On 23 May 2016, at 17:20, Madhav Puri wrote:
ah, yeah that's a good point. May be we can fail the
docker-pushtarget if build-version is empty, assuming that it will caution the user (with push credentials) to think.docker-push: docker @if [ "$(BUILD_VERSION)x" == "x" ]; then \ echo "docker-push shall be called with a valid build version. It is usually called from 'make release' CI job"; \ exit 1; \ fi @docker push contiv/volplugin:$(BUILD_VERSION)
You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/contiv/volplugin/issues/277#issuecomment-221133512