@ -34,10 +34,6 @@ jobs:
- image : circleci/golang:1.10
working_directory : /go/src/github.com/prometheus/prometheus
environment:
DOCKER_IMAGE_NAME : prom/prometheus
QUAY_IMAGE_NAME : quay.io/prometheus/prometheus
steps:
- checkout
- setup_remote_docker
@ -45,23 +41,19 @@ jobs:
at : .
- run : ln -s .build/linux-amd64/prometheus prometheus
- run : ln -s .build/linux-amd64/promtool promtool
- run : make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME
- run : make docker DOCKER_ IMAGE_NAME=$QUAY_IMAGE_NAME
- run : make docker
- run : make docker DOCKER_ REPO=quay.io/prometheus
- run : docker images
- run : docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- run : docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io
- run : docker push $DOCKER_IMAGE_NAME
- run : docker push $QUAY_IMAGE_NAME
- run : make docker-publish
- run : make docker-publish DOCKER_REPO=quay.io/prometheus
docker_hub_release_tags:
docker:
- image : circleci/golang:1.10
working_directory : /go/src/github.com/prometheus/prometheus
environment:
DOCKER_IMAGE_NAME : prom/prometheus
QUAY_IMAGE_NAME : quay.io/prometheus/prometheus
steps:
- checkout
- setup_remote_docker
@ -79,17 +71,17 @@ jobs:
destination : releases
- run : ln -s .build/linux-amd64/prometheus prometheus
- run : ln -s .build/linux-amd64/promtool promtool
- run : make docker DOCKER_IMAGE_ NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_ TAG=$CIRCLE_TAG
- run : make docker DOCKER_IMAGE_ NAME=$QUAY_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG
- run : make docker DOCKER_IMAGE_ TAG=$CIRCLE_TAG
- run : make docker DOCKER_IMAGE_ TAG=$CIRCLE_TAG DOCKER_REPO=quay.io/prometheus
- run : docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- run : docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io
- run : |
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then
docker tag "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" "$DOCKER_IMAGE_NAME:latest "
docker tag "$QUAY_IMAGE_NAME:$CIRCLE_TAG" "$QUAY_IMAGE_NAME:latest"
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG "
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus
fi
- run : docker push $DOCKER_IMAGE_NAME
- run : docker push $QUAY_IMAGE_NAME
- run : make docker-publish
- run : make docker-publish DOCKER_REPO=quay.io/prometheus
workflows:
version : 2