Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Manually download promu in crossbuild stage #2828

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ 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: source .bingo/variables.env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't want to source those things BEFORE running curl? 🤔

- 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:
root: .
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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipe makes sure that dependency doesn't run if the file already exists.
https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think even without pipe that is happening. I guess it does not check mod file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested locally somehow, it still tries to execute bingo install task. Just to be sure.

@echo ">> crossbuilding all binaries"
$(PROMU) crossbuild -v

Expand Down