|
|
@ -27,8 +27,6 @@ jobs: |
|
|
|
working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/node_exporter |
|
|
|
working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
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 |
|
|
|
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.10-base |
|
|
|
REPO_PATH: github.com/prometheus/node_exporter |
|
|
|
REPO_PATH: github.com/prometheus/node_exporter |
|
|
|
|
|
|
|
|
|
|
@ -44,11 +42,9 @@ jobs: |
|
|
|
- run: |
|
|
|
- run: |
|
|
|
command: | |
|
|
|
command: | |
|
|
|
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_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 |
|
|
|
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
- run: docker images |
|
|
|
- run: docker images |
|
|
|
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T |
|
|
|
- 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 |
|
|
|
- image: circleci/golang:1.10 |
|
|
|
working_directory: /go/src/github.com/prometheus/node_exporter |
|
|
|
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: |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- checkout |
|
|
|
- setup_remote_docker |
|
|
|
- setup_remote_docker |
|
|
|
- attach_workspace: |
|
|
|
- attach_workspace: |
|
|
|
at: . |
|
|
|
at: . |
|
|
|
- run: ln -s .build/linux-amd64/node_exporter node_exporter |
|
|
|
- run: ln -s .build/linux-amd64/node_exporter node_exporter |
|
|
|
- run: make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME |
|
|
|
- run: make docker |
|
|
|
- run: make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME |
|
|
|
- run: make docker DOCKER_REPO=quay.io/prometheus |
|
|
|
- run: docker images |
|
|
|
- run: docker images |
|
|
|
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD |
|
|
|
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD |
|
|
|
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io |
|
|
|
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io |
|
|
|
- run: docker push $DOCKER_IMAGE_NAME |
|
|
|
- run: make docker-publish |
|
|
|
- run: docker push $QUAY_IMAGE_NAME |
|
|
|
- run: make docker-publish DOCKER_REPO=quay.io/prometheus |
|
|
|
|
|
|
|
|
|
|
|
docker_hub_release_tags: |
|
|
|
docker_hub_release_tags: |
|
|
|
docker: |
|
|
|
docker: |
|
|
|
- image: circleci/golang:1.10 |
|
|
|
- image: circleci/golang:1.10 |
|
|
|
working_directory: /go/src/github.com/prometheus/node_exporter |
|
|
|
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: |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- checkout |
|
|
|
- setup_remote_docker |
|
|
|
- setup_remote_docker |
|
|
@ -112,24 +96,17 @@ jobs: |
|
|
|
path: .tarballs |
|
|
|
path: .tarballs |
|
|
|
destination: releases |
|
|
|
destination: releases |
|
|
|
- run: ln -s .build/linux-amd64/node_exporter node_exporter |
|
|
|
- run: ln -s .build/linux-amd64/node_exporter node_exporter |
|
|
|
- run: |
|
|
|
- run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG |
|
|
|
command: | |
|
|
|
- run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG DOCKER_REPO=quay.io/prometheus |
|
|
|
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: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD |
|
|
|
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD |
|
|
|
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io |
|
|
|
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io |
|
|
|
- run: | |
|
|
|
- run: | |
|
|
|
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then |
|
|
|
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then |
|
|
|
docker tag "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" "$DOCKER_IMAGE_NAME:latest" |
|
|
|
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" |
|
|
|
docker tag "$QUAY_IMAGE_NAME:$CIRCLE_TAG" "$QUAY_IMAGE_NAME:latest" |
|
|
|
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus |
|
|
|
fi |
|
|
|
fi |
|
|
|
- run: docker push $DOCKER_IMAGE_NAME:$CIRCLE_TAG |
|
|
|
- run: make docker-publish |
|
|
|
- run: docker push $QUAY_IMAGE_NAME:$CIRCLE_TAG |
|
|
|
- run: make docker-publish DOCKER_REPO=quay.io/prometheus |
|
|
|
|
|
|
|
|
|
|
|
workflows: |
|
|
|
workflows: |
|
|
|
version: 2 |
|
|
|
version: 2 |
|
|
|