mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
Merge pull request #1580 from prometheus/fabxc/quay
build: push to Dockerhub and Quay
This commit is contained in:
commit
490ff9fee8
|
@ -1,4 +1,4 @@
|
||||||
FROM prom/busybox:latest
|
FROM quay.io/prometheus/busybox:latest
|
||||||
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
|
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
|
||||||
|
|
||||||
COPY prometheus /bin/prometheus
|
COPY prometheus /bin/prometheus
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
machine:
|
machine:
|
||||||
environment:
|
environment:
|
||||||
DOCKER_IMAGE_NAME: prom/prometheus
|
DOCKER_IMAGE_NAME: prom/prometheus
|
||||||
|
QUAY_IMAGE_NAME: quay.io/prometheus/prometheus
|
||||||
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.5.4-main
|
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.5.4-main
|
||||||
REPO_PATH: github.com/prometheus/prometheus
|
REPO_PATH: github.com/prometheus/prometheus
|
||||||
pre:
|
pre:
|
||||||
|
@ -21,8 +22,10 @@ dependencies:
|
||||||
- |
|
- |
|
||||||
if [ -n "$CIRCLE_TAG" ]; then
|
if [ -n "$CIRCLE_TAG" ]; then
|
||||||
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG
|
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG
|
||||||
|
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG
|
||||||
else
|
else
|
||||||
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME
|
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME
|
||||||
|
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME
|
||||||
fi
|
fi
|
||||||
post:
|
post:
|
||||||
- mkdir $CIRCLE_ARTIFACTS/binaries/ && cp -a .build/* $CIRCLE_ARTIFACTS/binaries/
|
- mkdir $CIRCLE_ARTIFACTS/binaries/ && cp -a .build/* $CIRCLE_ARTIFACTS/binaries/
|
||||||
|
@ -38,7 +41,9 @@ deployment:
|
||||||
owner: prometheus
|
owner: prometheus
|
||||||
commands:
|
commands:
|
||||||
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
|
- docker login -e $QUAY_EMAIL -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io
|
||||||
- docker push $DOCKER_IMAGE_NAME
|
- docker push $DOCKER_IMAGE_NAME
|
||||||
|
- docker push $QUAY_IMAGE_NAME
|
||||||
hub_tag:
|
hub_tag:
|
||||||
tag: /^[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
tag: /^[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
||||||
owner: prometheus
|
owner: prometheus
|
||||||
|
@ -47,8 +52,11 @@ deployment:
|
||||||
- promu release .tarballs
|
- promu release .tarballs
|
||||||
- mkdir $CIRCLE_ARTIFACTS/releases/ && cp -a .tarballs/* $CIRCLE_ARTIFACTS/releases/
|
- mkdir $CIRCLE_ARTIFACTS/releases/ && cp -a .tarballs/* $CIRCLE_ARTIFACTS/releases/
|
||||||
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
|
- docker login -e $QUAY_EMAIL -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io
|
||||||
- |
|
- |
|
||||||
if [[ "$CIRCLE_TAG" =~ ^[0-9]+(\.[0-9]+){2}$ ]]; then
|
if [[ "$CIRCLE_TAG" =~ ^[0-9]+(\.[0-9]+){2}$ ]]; then
|
||||||
docker tag "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" "$DOCKER_IMAGE_NAME:latest"
|
docker tag "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" "$DOCKER_IMAGE_NAME:latest"
|
||||||
|
docker tag "$QUAY_IMAGE_NAME:$CIRCLE_TAG" "$QUAY_IMAGE_NAME:latest"
|
||||||
fi
|
fi
|
||||||
- docker push $DOCKER_IMAGE_NAME
|
- docker push $DOCKER_IMAGE_NAME
|
||||||
|
- docker push $QUAY_IMAGE_NAME
|
||||||
|
|
Loading…
Reference in a new issue