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

[backport 8.5] Fix installation of mage with go 1.18 #33619

Merged
merged 1 commit into from
Nov 9, 2022
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
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ pipeline {
steps {
withGithubNotify(context: "Checks") {
stageStatusCache(id: 'Checks'){
// test the ./dev-tools/run_with_go_ver used by the Unified Release process
dir("${BASE_DIR}") {
sh "HOME=${WORKSPACE} GO_VERSION=${GO_VERSION} ./dev-tools/run_with_go_ver make test-mage"
}
withBeatsEnv(archive: false, id: "checks") {
dumpVariables()
whenTrue(env.ONLY_DOCS == 'false') {
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,7 @@ beats-dashboards: mage update
build/distributions/dependencies.csv: $(PYTHON)
@mkdir -p build/distributions
$(PYTHON) dev-tools/dependencies-report --csv $@

## test-mage : Test the mage installation used by the Unified Release process
test-mage: mage
@mage dumpVariables
2 changes: 1 addition & 1 deletion dev-tools/make/mage-install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export MAGE_IMPORT_PATH
mage:
ifndef MAGE_PRESENT
@echo Installing mage $(MAGE_VERSION).
@go get -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH}@$(MAGE_VERSION)
@go install -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH}@$(MAGE_VERSION)
@-mage -clean
endif
@true