volplugin icon indicating copy to clipboard operation
volplugin copied to clipboard

push versioned container images as part of `make release` target

Open mapuri opened this issue 9 years ago • 3 comments

This ticket proposes an outline of pushing versioned container images with every release:

  • make release target shall be modified to also call the existing make docker-push
  • make docker-push target shall use the BUILD_VERSION environment variable (similar to make run-build) to tag the container images, something like below:
docker-push: docker
    docker push contiv/volplugin:$(if $(BUILD_VERSION),$(BUILD_VERSION),devbuild)

mapuri avatar May 24 '16 00:05 mapuri

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.

erikh avatar May 24 '16 00:05 erikh

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)

mapuri avatar May 24 '16 00:05 mapuri

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

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

erikh avatar May 24 '16 00:05 erikh