diff --git a/Jenkinsfile b/Jenkinsfile index b1064faaa321..7dcba58f47de 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -673,6 +673,9 @@ def withBeatsEnv(boolean archive, Closure body) { sh(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-go.sh") sh(label: "Install docker-compose ${DOCKER_COMPOSE_VERSION}", script: ".ci/scripts/install-docker-compose.sh") sh(label: "Install Mage", script: "make mage") + // TODO (2020-04-07): This is a work-around to fix the Beat generator tests. + // See https://github.com/elastic/beats/issues/17787. + setGitConfig() try { if(!params.dry_run){ body() @@ -955,3 +958,12 @@ def getVendorPatterns(beatName){ } return output?.split('\n').collect{ item -> item as String } } + +def setGitConfig(){ + sh(label: 'check git config', script: ''' + if [ -z "$(git config --get user.email)" ]; then + git config user.email "beatsmachine@users.noreply.github.com" + git config user.name "beatsmachine" + fi + ''') +}