Skip to content

Commit

Permalink
chore: deploy (grafana#836)
Browse files Browse the repository at this point in the history
- bump build image to 0.4.0
- re-gen protos
- re-add deploy task
  • Loading branch information
sh0rez authored Aug 1, 2019
1 parent fc12a23 commit ace5993
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 266 deletions.
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ workflows:
- publish/docker-driver:
requires: [ lint, test ]
filters: { <<: *tag-or-master }

- deploy:
requires:
- publish/loki
- publish/promtail
- publish/canary
- publish/docker-driver
filters: {<<: *tag-or-master}

- test-helm:
requires: [ lint, test ]
Expand All @@ -60,7 +68,7 @@ workflows:
# https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
.defaults: &defaults
docker:
- image: grafana/loki-build-image:0.3.0
- image: grafana/loki-build-image:0.4.0
working_directory: /go/src/github.com/grafana/loki

.machine: &machine
Expand Down Expand Up @@ -195,6 +203,16 @@ jobs:
name: docker-driver
command: make docker-driver-push

deploy:
<<: *defaults
steps:
- checkout
- run: |
curl -s --header "Content-Type: application/json" \
--data "{\"build_parameters\": {\"CIRCLE_JOB\": \"deploy\", \"IMAGE_NAMES\": \"$(make print-images)\"}}" \
--request POST \
https://circleci.com/api/v1.1/project/github/raintank/deployment_tools/tree/master?circle-token=$CIRCLE_TOKEN
test-helm:
environment:
CT_VERSION: 2.3.3
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IMAGE_NAMES := $(foreach dir,$(DOCKER_IMAGE_DIRS),$(patsubst %,$(IMAGE_PREFIX)%,
# make BUILD_IN_CONTAINER=false target
# or you can override this with an environment variable
BUILD_IN_CONTAINER ?= true
BUILD_IMAGE_VERSION := 0.3.0
BUILD_IMAGE_VERSION := 0.4.0

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down Expand Up @@ -285,7 +285,7 @@ helm-clean:

PLUGIN_TAG ?= $(IMAGE_TAG)

docker-driver: docker-driver-clean
docker-driver: docker-driver-clean
mkdir cmd/docker-driver/rootfs
docker build -t rootfsimage -f cmd/docker-driver/Dockerfile .
ID=$$(docker create rootfsimage true) && \
Expand Down Expand Up @@ -316,6 +316,10 @@ docker-driver-clean:

images: promtail-image loki-image loki-canary-image docker-driver

print-images:
$(info $(patsubst %,%:$(IMAGE_TAG),$(IMAGE_NAMES)))
@echo > /dev/null

IMAGE_NAMES := grafana/loki grafana/promtail grafana/loki-canary

# push(app, optional tag)
Expand Down
Loading

0 comments on commit ace5993

Please sign in to comment.