Skip to content

Commit

Permalink
ci: Manually download promu in crossbuild stage (#2828)
Browse files Browse the repository at this point in the history
* Manually download promu in crossbuild stage

Signed-off-by: Kemal Akkoyun <[email protected]>

* Make sure all directories created in the path

Signed-off-by: Kemal Akkoyun <[email protected]>
  • Loading branch information
kakkoyun committed Jul 2, 2020
1 parent b3522fb commit 00e3c32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 00e3c32

Please sign in to comment.