|
|
|
@ -27,8 +27,6 @@ jobs:
|
|
|
|
|
working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
|
DOCKER_IMAGE_NAME: prom/node-exporter |
|
|
|
|
QUAY_IMAGE_NAME: quay.io/prometheus/node-exporter |
|
|
|
|
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.10-base |
|
|
|
|
REPO_PATH: github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
@ -44,11 +42,9 @@ jobs:
|
|
|
|
|
- run: |
|
|
|
|
command: | |
|
|
|
|
if [ -n "$CIRCLE_TAG" ]; then |
|
|
|
|
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 |
|
|
|
|
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG |
|
|
|
|
else |
|
|
|
|
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME |
|
|
|
|
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME |
|
|
|
|
make docker |
|
|
|
|
fi |
|
|
|
|
- run: docker images |
|
|
|
|
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T |
|
|
|
@ -65,37 +61,25 @@ jobs:
|
|
|
|
|
- image: circleci/golang:1.10 |
|
|
|
|
working_directory: /go/src/github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
|
DOCKER_IMAGE_NAME: prom/node-exporter |
|
|
|
|
QUAY_IMAGE_NAME: quay.io/prometheus/node-exporter |
|
|
|
|
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.10-base |
|
|
|
|
REPO_PATH: github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- checkout |
|
|
|
|
- setup_remote_docker |
|
|
|
|
- attach_workspace: |
|
|
|
|
at: . |
|
|
|
|
- run: ln -s .build/linux-amd64/node_exporter node_exporter |
|
|
|
|
- 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/node_exporter |
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
|
DOCKER_IMAGE_NAME: prom/node-exporter |
|
|
|
|
QUAY_IMAGE_NAME: quay.io/prometheus/node-exporter |
|
|
|
|
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.10-base |
|
|
|
|
REPO_PATH: github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- checkout |
|
|
|
|
- setup_remote_docker |
|
|
|
@ -112,24 +96,17 @@ jobs:
|
|
|
|
|
path: .tarballs |
|
|
|
|
destination: releases |
|
|
|
|
- run: ln -s .build/linux-amd64/node_exporter node_exporter |
|
|
|
|
- run: |
|
|
|
|
command: | |
|
|
|
|
if [ -n "$CIRCLE_TAG" ]; then |
|
|
|
|
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 |
|
|
|
|
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME |
|
|
|
|
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME |
|
|
|
|
fi |
|
|
|
|
- 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:$CIRCLE_TAG |
|
|
|
|
- run: docker push $QUAY_IMAGE_NAME:$CIRCLE_TAG |
|
|
|
|
- run: make docker-publish |
|
|
|
|
- run: make docker-publish DOCKER_REPO=quay.io/prometheus |
|
|
|
|
|
|
|
|
|
workflows: |
|
|
|
|
version: 2 |
|
|
|
|