[6.8] [CI] Fix ES Snapshot build Jenkinsfile (#88539)

This commit is contained in:
Brian Seeders 2021-01-15 16:49:13 -05:00 committed by GitHub
parent 7a44b5830f
commit 87097a679c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,12 +64,52 @@ timeout(time: 120, unit: 'MINUTES') {
architecture: '',
license: parts[0] == 'oss' ? 'oss' : 'default',
]
)
}
}
sh 'find * -exec bash -c "shasum -a 512 {} > {}.sha512" \\;'
def manifest = [
bucket: "kibana-ci-es-snapshots-daily/${DESTINATION}".toString(),
branch: ES_BRANCH,
sha: GIT_COMMIT,
sha_short: GIT_COMMIT_SHORT,
version: VERSION,
generated: now.format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC")),
archives: files,
]
def manifestJson = toJSON(manifest).toString()
writeFile file: 'manifest.json', text: manifestJson
upload(DESTINATION, '*.*')
sh "cp manifest.json manifest-latest.json"
upload(VERSION, 'manifest-latest.json')
}
kibanaPipeline.sendMail()
if (PROMOTE_WITHOUT_VERIFY) {
esSnapshots.promote(VERSION, SNAPSHOT_ID)
emailext(
to: 'build-kibana@elastic.co',
subject: "ES snapshot promoted without verification: ${params.ES_BRANCH}",
body: '${SCRIPT,template="groovy-html.template"}',
mimeType: 'text/html',
)
} else {
build(
propagate: false,
wait: false,
job: 'elasticsearch+snapshots+verify',
parameters: [
string(name: 'branch_specifier', value: branch_specifier),
string(name: 'SNAPSHOT_VERSION', value: VERSION),
string(name: 'SNAPSHOT_ID', value: SNAPSHOT_ID),
]
)
}
}
kibanaPipeline.sendMail()
}
}
}