diff --git a/Jenkinsfile b/Jenkinsfile index 4c40ebdba841..b677654b3911 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,9 +86,19 @@ pipeline { GOFLAGS = '-mod=readonly' } steps { +<<<<<<< HEAD withGithubNotify(context: "Checks") { stageStatusCache(id: 'Checks'){ withBeatsEnv(archive: false, id: "checks") { +======= + 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") { +>>>>>>> 5385fd2387 (fix: mage installation with go1.18 (#33083)) dumpVariables() whenTrue(env.ONLY_DOCS == 'false') { runChecks() diff --git a/Makefile b/Makefile index a859eff1f2a0..de3f72d15ffa 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/dev-tools/make/mage-install.mk b/dev-tools/make/mage-install.mk index 309e3fa585a6..db6beb37c629 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