diff --git a/Jenkinsfile b/Jenkinsfile index 745b34fbc3e..cf3ccb3993d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -87,6 +87,10 @@ pipeline { steps { withGithubNotify(context: "Lint") { stageStatusCache(id: 'Lint'){ + // 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: "lint") { dumpVariables() whenTrue(env.ONLY_DOCS == 'false') { diff --git a/Makefile b/Makefile index 0426d0ca3bb..974647a32e4 100644 --- a/Makefile +++ b/Makefile @@ -237,3 +237,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 diff --git a/dev-tools/make/mage-install.mk b/dev-tools/make/mage-install.mk index 7a151ea2e62..f7e63eba7ee 100644 --- a/dev-tools/make/mage-install.mk +++ b/dev-tools/make/mage-install.mk @@ -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