Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Update Makefile to build latest-pgX
Browse files Browse the repository at this point in the history
Latest tag is no longer built. Three
images can be made now depending on a
variable sent to the Makefile. For each
image two tags are made latest-pgV and
X.Y.Z-pgV
  • Loading branch information
Blagoj Atanasovski authored and atanasovskib committed Oct 25, 2019
1 parent c7fbfd6 commit 72b726b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SQL_FILES = sql/prometheus.sql
EXT_VERSION = $(shell cat pg_prometheus.control | grep 'default' | sed "s/^.*'\(.*\)'$\/\1/g")
EXT_SQL_FILE = sql/$(EXTENSION)--$(EXT_VERSION).sql
PG_VER=pg11
TIMESCALEDB_VER=1.4.1

DATA = $(EXT_SQL_FILE)
MODULE_big = $(EXTENSION)
Expand Down Expand Up @@ -68,13 +69,13 @@ package: clean $(EXT_SQL_FILE)
$(install_sh) -m 644 $(EXT_SQL_FILE) 'package/extension/'

docker-image: Dockerfile
docker build --build-arg PG_VERSION_TAG=$(PG_VER) -t $(ORGANIZATION)/$(DOCKER_IMAGE_NAME) .
docker tag $(ORGANIZATION)/$(EXTENSION):latest $(ORGANIZATION)/$(EXTENSION):${GIT_VERSION}
docker tag $(ORGANIZATION)/$(EXTENSION):latest $(ORGANIZATION)/$(EXTENSION):${EXT_VERSION}
docker build --build-arg TIMESCALEDB_VERSION=$(TIMESCALEDB_VER) --build-arg PG_VERSION_TAG=$(PG_VER) -t $(ORGANIZATION)/$(DOCKER_IMAGE_NAME):latest-$(PG_VER) .
docker tag $(ORGANIZATION)/$(EXTENSION):latest-$(PG_VER) $(ORGANIZATION)/$(EXTENSION):${GIT_VERSION}-$(PG_VER)
docker tag $(ORGANIZATION)/$(EXTENSION):latest-$(PG_VER) $(ORGANIZATION)/$(EXTENSION):${EXT_VERSION}-$(PG_VER)

docker-push: docker-image
docker push $(ORGANIZATION)/$(EXTENSION):latest
docker push $(ORGANIZATION)/$(EXTENSION):${EXT_VERSION}
docker push $(ORGANIZATION)/$(EXTENSION):latest-$(PG_VER)
docker push $(ORGANIZATION)/$(EXTENSION):${EXT_VERSION}-$(PG_VER)

typedef.list: clean $(OBJS)
./scripts/generate_typedef.sh
Expand Down

0 comments on commit 72b726b

Please sign in to comment.