diff options
author | Simon Pasquier <spasquie@redhat.com> | 2019-07-02 18:40:25 +0200 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2019-07-02 18:40:25 +0200 |
commit | 0841244283924be15da64aea4c4c94d28f1ec1b6 (patch) | |
tree | 468f0767b1f14afe48185e6c335e69e97cd14e1b /.circleci | |
parent | cdd9a5fdef180018518b197d138e2410ec0d813d (diff) | |
download | prometheus_node_collector-0841244283924be15da64aea4c4c94d28f1ec1b6.tar.bz2 prometheus_node_collector-0841244283924be15da64aea4c4c94d28f1ec1b6.tar.xz prometheus_node_collector-0841244283924be15da64aea4c4c94d28f1ec1b6.zip |
Use Prometheus Circle CI's orb (#1412)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 71 |
1 files changed, 8 insertions, 63 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e645c1..455c6f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml | |||
@@ -1,6 +1,9 @@ | |||
1 | --- | 1 | --- |
2 | version: 2.1 | 2 | version: 2.1 |
3 | 3 | ||
4 | orbs: | ||
5 | prometheus: prometheus/prometheus@0.1.0 | ||
6 | |||
4 | executors: | 7 | executors: |
5 | # Whenever the Go version is updated here, .promu.yml should | 8 | # Whenever the Go version is updated here, .promu.yml should |
6 | # also be updated. | 9 | # also be updated. |
@@ -13,13 +16,10 @@ jobs: | |||
13 | executor: golang | 16 | executor: golang |
14 | 17 | ||
15 | steps: | 18 | steps: |
16 | - checkout | 19 | - prometheus/setup_environment |
17 | - run: make promu | ||
18 | - run: make | 20 | - run: make |
19 | - store_artifacts: | 21 | - prometheus/store_artifact: |
20 | path: node_exporter | 22 | file: node_exporter |
21 | destination: /build/node_exporter | ||
22 | - run: rm -v node_exporter | ||
23 | 23 | ||
24 | codespell: | 24 | codespell: |
25 | docker: | 25 | docker: |
@@ -68,61 +68,6 @@ jobs: | |||
68 | make test-docker | 68 | make test-docker |
69 | fi | 69 | fi |
70 | 70 | ||
71 | docker_hub_master: | ||
72 | executor: golang | ||
73 | |||
74 | steps: | ||
75 | - checkout | ||
76 | - setup_remote_docker: | ||
77 | version: 18.06.0-ce | ||
78 | - run: docker run --privileged linuxkit/binfmt:v0.6 | ||
79 | - attach_workspace: | ||
80 | at: . | ||
81 | - run: make docker | ||
82 | - run: make docker DOCKER_REPO=quay.io/prometheus | ||
83 | - run: docker images | ||
84 | - run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
85 | - run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io | ||
86 | - run: make docker-publish | ||
87 | - run: make docker-publish DOCKER_REPO=quay.io/prometheus | ||
88 | - run: make docker-manifest | ||
89 | - run: make docker-manifest DOCKER_REPO=quay.io/prometheus | ||
90 | |||
91 | docker_hub_release_tags: | ||
92 | executor: golang | ||
93 | |||
94 | steps: | ||
95 | - checkout | ||
96 | - setup_remote_docker: | ||
97 | version: 18.06.0-ce | ||
98 | - run: docker run --privileged linuxkit/binfmt:v0.6 | ||
99 | - attach_workspace: | ||
100 | at: . | ||
101 | - run: make promu | ||
102 | - run: promu crossbuild tarballs | ||
103 | - run: promu checksum .tarballs | ||
104 | - run: promu release .tarballs | ||
105 | - store_artifacts: | ||
106 | path: .tarballs | ||
107 | destination: releases | ||
108 | - run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG | ||
109 | - run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG DOCKER_REPO=quay.io/prometheus | ||
110 | - run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
111 | - run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io | ||
112 | - run: make docker-publish DOCKER_IMAGE_TAG="$CIRCLE_TAG" | ||
113 | - run: make docker-publish DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus | ||
114 | - run: make docker-manifest DOCKER_IMAGE_TAG="$CIRCLE_TAG" | ||
115 | - run: make docker-manifest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus | ||
116 | - run: | | ||
117 | if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then | ||
118 | make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" | ||
119 | make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus | ||
120 | make docker-publish DOCKER_IMAGE_TAG="latest" | ||
121 | make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO=quay.io/prometheus | ||
122 | make docker-manifest DOCKER_IMAGE_TAG="latest" | ||
123 | make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO=quay.io/prometheus | ||
124 | fi | ||
125 | |||
126 | workflows: | 71 | workflows: |
127 | version: 2 | 72 | version: 2 |
128 | node_exporter: | 73 | node_exporter: |
@@ -139,7 +84,7 @@ workflows: | |||
139 | filters: | 84 | filters: |
140 | tags: | 85 | tags: |
141 | only: /.*/ | 86 | only: /.*/ |
142 | - docker_hub_master: | 87 | - prometheus/publish_master: |
143 | context: org-context | 88 | context: org-context |
144 | requires: | 89 | requires: |
145 | - test | 90 | - test |
@@ -147,7 +92,7 @@ workflows: | |||
147 | filters: | 92 | filters: |
148 | branches: | 93 | branches: |
149 | only: master | 94 | only: master |
150 | - docker_hub_release_tags: | 95 | - prometheus/publish_release: |
151 | context: org-context | 96 | context: org-context |
152 | requires: | 97 | requires: |
153 | - test | 98 | - test |