Skip to content

Commit

Permalink
update to CI image build/publish
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniszewski committed May 14, 2018
1 parent f71b179 commit b937f40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ NC := \033[0m
# build the docker images with the given tags and tag suffix for the specified
# dockerfile.
build-docker:
echo "image tags: ${GREEN}$(IMAGE_TAGS)${NC}"
tags="" ; \
for tag in $(IMAGE_TAGS); do if [ "$(IMAGE_TAG_SUFFIX)" ]; then tag="$$tag-$(IMAGE_TAG_SUFFIX)"; fi; tags="$${tags} -t $(IMAGE_NAME):$${tag}" ; done ; \
echo "tags: $$tags" ; \
echo "${GREEN}tags: $$tags${NC}" ; \
docker build -f dockerfile/$(IMAGE_DOCKERFILE) \
--build-arg BUILD_DATE=$(BUILD_DATE) \
--build-arg BUILD_VERSION=$(PKG_VERSION) \
Expand Down
5 changes: 5 additions & 0 deletions bin/ci/build_and_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ echo "All tags for ${IMAGE_NAME}: ${tags[@]}"
# uses a Make target defined there.
#

# Since release.dockerfile is based off of vaporio/synse-server:slim, we
# will want to to generate that tag here as well.
IMAGE_TAGS=slim IMAGE_DOCKERFILE=slim.dockerfile make build-docker

IMAGE_TAGS="${tags[@]}" make docker


Expand All @@ -105,6 +109,7 @@ IMAGE_TAGS="${tags[@]}" make docker
images=$(docker images \
--filter "label=org.label-schema.vcs-ref=`git rev-parse --short HEAD 2> /dev/null || true`" \
--filter "label=org.label-schema.name=vaporio/synse-server" \
--filter "dangling=false" \
--format "{{.Repository}}:{{.Tag}}")

echo "images to push: ${images}"
Expand Down

0 comments on commit b937f40

Please sign in to comment.