From d7f14efff0cfbf7de6712ac93625a18f5ed10c47 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Wed, 1 Jul 2020 16:57:08 +0200 Subject: [PATCH 1/2] Manually download promu in crossbuild stage Signed-off-by: Kemal Akkoyun --- .circleci/config.yml | 4 ++++ Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68eed3adcf..5137cdf6da 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,8 +40,12 @@ jobs: working_directory: /home/circleci/.go_workspace/src/github.com/thanos-io/thanos environment: GOBIN: "/home/circleci/.go_workspace/go/bin" + PROMU_VERSION: "0.5.0" steps: - checkout + - run: curl -L "https://github.com/prometheus/promu/releases/download/v${PROMU_VERSION}/promu-${PROMU_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz" | tar --strip-components=1 -xzf - -C ${GOBIN} + - run: source .bingo/variables.env + - run: mv -f ${GOBIN}/promu ${PROMU} - run: make crossbuild - persist_to_workspace: root: . diff --git a/Makefile b/Makefile index b1008ebc6d..3019cbccda 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ build: check-git deps $(PROMU) .PHONY: crossbuild crossbuild: ## Builds all binaries for all platforms. -crossbuild: deps $(PROMU) +crossbuild: $(PROMU) @echo ">> crossbuilding all binaries" $(PROMU) crossbuild -v From a1749b62b0e06fd7834400015b9ed8a960b7f7f1 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Thu, 2 Jul 2020 08:15:21 +0200 Subject: [PATCH 2/2] Make sure all directories created in the path Signed-off-by: Kemal Akkoyun --- .circleci/config.yml | 4 +++- Makefile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5137cdf6da..76684952a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,8 +43,10 @@ jobs: PROMU_VERSION: "0.5.0" steps: - checkout - - run: curl -L "https://github.com/prometheus/promu/releases/download/v${PROMU_VERSION}/promu-${PROMU_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz" | tar --strip-components=1 -xzf - -C ${GOBIN} - run: source .bingo/variables.env + - run: mkdir -p ${GOBIN} + - run: curl -L "https://github.com/prometheus/promu/releases/download/v${PROMU_VERSION}/promu-${PROMU_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz" | tar --strip-components=1 -xzf - -C ${GOBIN} + - run: mkdir -p $(dirname "${PROMU}") - run: mv -f ${GOBIN}/promu ${PROMU} - run: make crossbuild - persist_to_workspace: diff --git a/Makefile b/Makefile index 3019cbccda..f4410d1406 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ build: check-git deps $(PROMU) .PHONY: crossbuild crossbuild: ## Builds all binaries for all platforms. -crossbuild: $(PROMU) +crossbuild: | $(PROMU) @echo ">> crossbuilding all binaries" $(PROMU) crossbuild -v