Skip to content

Commit

Permalink
add fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaev committed Mar 19, 2019
1 parent a672b27 commit 8424a4b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ deploy:
skip_cleanup: true
on:
tags: true
- provider: script
script:
- make docker_latest_images
skip_cleanup: true
on:
tags: true
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ GIT_HASH := $(shell git log --pretty=format:%H -n 1)
GIT_HASH_SHORT := $(shell echo "${GIT_HASH}" | cut -c1-7)
GIT_TAG := $(shell git describe --always --tags --abbrev=0 | tail -c+2)
GIT_COMMIT := $(shell git rev-list v${GIT_TAG}..HEAD --count)
GIT_COMMIT_DATE := $(shell git show -s --format=%ci | cut -d\ -f1)
GO_VERSION := $(shell go version | cut -d' ' -f3)
VERSION_FEATURE := ${GIT_TAG}-${GIT_BRANCH}
VERSION_DEVELOP := ${GIT_HASH_SHORT}
VERSION_DEVELOP := ${GIT_COMMIT_DATE}-${GIT_HASH_SHORT}
VERSION_DEFAULT := ${GIT_TAG}.${GIT_COMMIT}
VENDOR := "SKB Kontur"
URL := "https://github.com/moira-alert/moira"
Expand Down Expand Up @@ -140,6 +141,13 @@ docker_develop_images:
docker push moira/$$service-${MARK_NIGHTLY}:${VERSION_DEVELOP} ; \
done

.PHONY: docker_latest_images
docker_latest_images:
for service in "filter" "notifier" "api" "checker" ; do \
docker build --build-arg MoiraVersion=${VERSION_DEFAULT} --build-arg GO_VERSION=${GO_VERSION} --build-arg GIT_COMMIT=${GIT_HASH} -f Dockerfile.$$service -t moira/$$service:latest . ; \
docker push moira/$$service:latest ; \
done

.PHONY: docker_release_images
docker_release_images:
for service in "filter" "notifier" "api" "checker" ; do \
Expand Down

0 comments on commit 8424a4b

Please sign in to comment.