circleci: fix Docker jobs (#1527)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
34bc54cee1
commit
3799768d94
|
@ -32,10 +32,6 @@ jobs:
|
|||
- image: circleci/golang:1.10
|
||||
working_directory: /go/src/github.com/prometheus/alertmanager
|
||||
|
||||
environment:
|
||||
DOCKER_IMAGE_NAME: prom/alertmanager
|
||||
QUAY_IMAGE_NAME: quay.io/prometheus/alertmanager
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
|
@ -43,23 +39,19 @@ jobs:
|
|||
at: .
|
||||
- run: ln -s .build/linux-amd64/alertmanager alertmanager
|
||||
- run: ln -s .build/linux-amd64/amtool amtool
|
||||
- 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/alertmanager
|
||||
|
||||
environment:
|
||||
DOCKER_IMAGE_NAME: prom/alertmanager
|
||||
QUAY_IMAGE_NAME: quay.io/prometheus/alertmanager
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
|
@ -77,17 +69,17 @@ jobs:
|
|||
destination: releases
|
||||
- run: ln -s .build/linux-amd64/alertmanager alertmanager
|
||||
- run: ln -s .build/linux-amd64/amtool amtool
|
||||
- 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
|
||||
|
|
Loading…
Reference in New Issue