-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into scottybollinger/es-ts-refs
- Loading branch information
Showing
906 changed files
with
16,647 additions
and
7,723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,90 +25,92 @@ def PROMOTE_WITHOUT_VERIFY = !!params.PROMOTE_WITHOUT_VERIFICATION | |
timeout(time: 120, unit: 'MINUTES') { | ||
timestamps { | ||
ansiColor('xterm') { | ||
node(workers.label('l')) { | ||
catchErrors { | ||
def VERSION | ||
def SNAPSHOT_ID | ||
def DESTINATION | ||
|
||
def scmVars = checkoutEs(ES_BRANCH) | ||
def GIT_COMMIT = scmVars.GIT_COMMIT | ||
def GIT_COMMIT_SHORT = sh(script: "git rev-parse --short ${GIT_COMMIT}", returnStdout: true).trim() | ||
|
||
buildArchives('to-archive') | ||
|
||
dir('to-archive') { | ||
def now = new Date() | ||
def date = now.format("yyyyMMdd-HHmmss") | ||
|
||
def filesRaw = sh(script: "ls -1", returnStdout: true).trim() | ||
def files = filesRaw | ||
.split("\n") | ||
.collect { filename -> | ||
// Filename examples | ||
// elasticsearch-oss-8.0.0-SNAPSHOT-linux-x86_64.tar.gz | ||
// elasticsearch-8.0.0-SNAPSHOT-linux-x86_64.tar.gz | ||
def parts = filename.replace("elasticsearch-oss", "oss").split("-") | ||
|
||
VERSION = VERSION ?: parts[1] | ||
SNAPSHOT_ID = SNAPSHOT_ID ?: "${date}_${GIT_COMMIT_SHORT}" | ||
DESTINATION = DESTINATION ?: "${VERSION}/archives/${SNAPSHOT_ID}" | ||
|
||
return [ | ||
filename: filename, | ||
checksum: filename + '.sha512', | ||
url: "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${DESTINATION}/${filename}".toString(), | ||
version: parts[1], | ||
platform: parts[3], | ||
architecture: parts[4].split('\\.')[0], | ||
license: parts[0] == 'oss' ? 'oss' : 'default', | ||
slackNotifications.onFailure { | ||
node(workers.label('l')) { | ||
catchErrors { | ||
def VERSION | ||
def SNAPSHOT_ID | ||
def DESTINATION | ||
|
||
def scmVars = checkoutEs(ES_BRANCH) | ||
def GIT_COMMIT = scmVars.GIT_COMMIT | ||
def GIT_COMMIT_SHORT = sh(script: "git rev-parse --short ${GIT_COMMIT}", returnStdout: true).trim() | ||
|
||
buildArchives('to-archive') | ||
|
||
dir('to-archive') { | ||
def now = new Date() | ||
def date = now.format("yyyyMMdd-HHmmss") | ||
|
||
def filesRaw = sh(script: "ls -1", returnStdout: true).trim() | ||
def files = filesRaw | ||
.split("\n") | ||
.collect { filename -> | ||
// Filename examples | ||
// elasticsearch-oss-8.0.0-SNAPSHOT-linux-x86_64.tar.gz | ||
// elasticsearch-8.0.0-SNAPSHOT-linux-x86_64.tar.gz | ||
def parts = filename.replace("elasticsearch-oss", "oss").split("-") | ||
|
||
VERSION = VERSION ?: parts[1] | ||
SNAPSHOT_ID = SNAPSHOT_ID ?: "${date}_${GIT_COMMIT_SHORT}" | ||
DESTINATION = DESTINATION ?: "${VERSION}/archives/${SNAPSHOT_ID}" | ||
|
||
return [ | ||
filename: filename, | ||
checksum: filename + '.sha512', | ||
url: "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${DESTINATION}/${filename}".toString(), | ||
version: parts[1], | ||
platform: parts[3], | ||
architecture: parts[4].split('\\.')[0], | ||
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') | ||
} | ||
|
||
if (PROMOTE_WITHOUT_VERIFY) { | ||
esSnapshots.promote(VERSION, SNAPSHOT_ID) | ||
|
||
emailext( | ||
to: '[email protected]', | ||
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), | ||
] | ||
} | ||
|
||
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') | ||
) | ||
} | ||
} | ||
|
||
if (PROMOTE_WITHOUT_VERIFY) { | ||
esSnapshots.promote(VERSION, SNAPSHOT_ID) | ||
|
||
emailext( | ||
to: '[email protected]', | ||
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() | ||
} | ||
|
||
kibanaPipeline.sendMail() | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
name: Bug report | ||
about: Things break. Help us identify those things so we can fix them! | ||
labels: bug | ||
|
||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
puppeteer_skip_chromium_download=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext | ||
|
||
// If set to true, github check/commit status will be reported, failed-test-reporter will run, etc. | ||
const val ENABLE_REPORTING = false | ||
|
||
// If set to false, jobs with triggers (scheduled, on commit, etc) will be paused | ||
const val ENABLE_TRIGGERS = false | ||
|
||
fun getProjectBranch(): String { | ||
return DslContext.projectName | ||
} | ||
|
||
fun getCorrespondingESBranch(): String { | ||
return getProjectBranch().replace("_teamcity", "") | ||
} | ||
|
||
fun areTriggersEnabled(): Boolean { | ||
return ENABLE_TRIGGERS; | ||
} | ||
|
||
fun isReportingEnabled(): Boolean { | ||
return ENABLE_REPORTING; | ||
} | ||
|
||
fun makeSafeId(id: String): String { | ||
return id.replace(Regex("[^a-zA-Z0-9_]"), "_") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.