From 00e3c32f382f6d07c9be16cb9a7bcc36b73bc0be Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Thu, 2 Jul 2020 11:53:17 +0200 Subject: [PATCH] ci: Manually download promu in crossbuild stage (#2828) * Manually download promu in crossbuild stage Signed-off-by: Kemal Akkoyun * Make sure all directories created in the path Signed-off-by: Kemal Akkoyun --- .circleci/config.yml | 6 +++++- Makefile | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68eed3adcf..9c4fc414b6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,9 +40,13 @@ 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: make crossbuild + - 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: mv -f ${GOBIN}/promu "${GOBIN}/promu-v${PROMU_VERSION}" + - run: make crossbuild -W ${GOBIN}/promu-v${PROMU_VERSION} # Ignore make dependency, it needs to be enforced somehow. - persist_to_workspace: root: . paths: diff --git a/Makefile b/Makefile index b1008ebc6d..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: deps $(PROMU) +crossbuild: | $(PROMU) @echo ">> crossbuilding all binaries" $(PROMU) crossbuild -v