mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
# Conflicts: # test/scripts/jenkins_xpack_build_kibana.sh
This commit is contained in:
parent
3fdc2b903c
commit
a82e2cbc59
9 changed files with 69 additions and 8 deletions
|
@ -44,6 +44,7 @@ kibanaPipeline(timeoutMinutes: 210) {
|
|||
task {
|
||||
kibanaPipeline.buildXpack(10)
|
||||
tasks.xpackCiGroups()
|
||||
tasks.xpackCiGroupDocker()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ JOB:
|
|||
- x-pack-ciGroup11
|
||||
- x-pack-ciGroup12
|
||||
- x-pack-ciGroup13
|
||||
- x-pack-ciGroupDocker
|
||||
- x-pack-accessibility
|
||||
- x-pack-visualRegression
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ node scripts/functional_tests --assert-none-excluded \
|
|||
--include-tag ciGroup10 \
|
||||
--include-tag ciGroup11 \
|
||||
--include-tag ciGroup12 \
|
||||
--include-tag ciGroup13
|
||||
--include-tag ciGroup13 \
|
||||
--include-tag ciGroupDocker
|
||||
|
||||
echo " -> building and extracting default Kibana distributable for use in functional tests"
|
||||
cd "$KIBANA_DIR"
|
||||
|
@ -43,3 +44,18 @@ tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
|||
|
||||
mkdir -p "$WORKSPACE/kibana-build-xpack"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
|
||||
cp "$linuxBuild" "$WORKSPACE/kibana-default.tar.gz"
|
||||
|
||||
mkdir -p "$WORKSPACE/kibana-build-xpack"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
|
||||
|
||||
echo " -> Archive built plugins"
|
||||
shopt -s globstar
|
||||
tar -zcf \
|
||||
"$WORKSPACE/kibana-default-plugins.tar.gz" \
|
||||
x-pack/plugins/**/target/public \
|
||||
x-pack/test/**/target/public \
|
||||
examples/**/target/public \
|
||||
x-pack/examples/**/target/public \
|
||||
test/**/target/public
|
||||
shopt -u globstar
|
||||
|
|
|
@ -130,7 +130,7 @@ def functionalTestProcess(String name, String script) {
|
|||
|
||||
def ossCiGroupProcess(ciGroup, withDelay = false) {
|
||||
return functionalTestProcess("ciGroup" + ciGroup) {
|
||||
if (withDelay) {
|
||||
if (withDelay && !(ciGroup instanceof String) && !(ciGroup instanceof GString)) {
|
||||
sleep((ciGroup-1)*30) // smooth out CPU spikes from ES startup
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ def ossCiGroupProcess(ciGroup, withDelay = false) {
|
|||
|
||||
def xpackCiGroupProcess(ciGroup, withDelay = false) {
|
||||
return functionalTestProcess("xpack-ciGroup" + ciGroup) {
|
||||
if (withDelay) {
|
||||
if (withDelay && !(ciGroup instanceof String) && !(ciGroup instanceof GString)) {
|
||||
sleep((ciGroup-1)*30) // smooth out CPU spikes from ES startup
|
||||
}
|
||||
withEnv([
|
||||
|
@ -294,11 +294,36 @@ def buildOss(maxWorkers = '') {
|
|||
}
|
||||
}
|
||||
|
||||
def buildXpack(maxWorkers = '') {
|
||||
def getBuildArtifactBucket() {
|
||||
def dir = env.ghprbPullId ? "pr-${env.ghprbPullId}" : buildState.get('checkoutInfo').branch.replace("/", "__")
|
||||
return "gs://ci-artifacts.kibana.dev/default-build/${dir}/${buildState.get('checkoutInfo').commit}"
|
||||
}
|
||||
|
||||
def buildXpack(maxWorkers = '', uploadArtifacts = false) {
|
||||
notifyOnError {
|
||||
withEnv(["KBN_OPTIMIZER_MAX_WORKERS=${maxWorkers}"]) {
|
||||
runbld("./test/scripts/jenkins_xpack_build_kibana.sh", "Build X-Pack Kibana")
|
||||
}
|
||||
|
||||
if (uploadArtifacts) {
|
||||
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
|
||||
bash("""
|
||||
cd "${env.WORKSPACE}"
|
||||
gsutil -q -m cp 'kibana-default.tar.gz' '${getBuildArtifactBucket()}/'
|
||||
gsutil -q -m cp 'kibana-default-plugins.tar.gz' '${getBuildArtifactBucket()}/'
|
||||
""", "Upload Default Build artifacts to GCS")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def downloadDefaultBuildArtifacts() {
|
||||
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
|
||||
bash("""
|
||||
cd "${env.WORKSPACE}"
|
||||
gsutil -q -m cp '${getBuildArtifactBucket()}/kibana-default.tar.gz' ./
|
||||
gsutil -q -m cp '${getBuildArtifactBucket()}/kibana-default-plugins.tar.gz' ./
|
||||
""", "Download Default Build artifacts from GCS")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,21 @@ def xpackCiGroups() {
|
|||
tasks(ciGroups.collect { kibanaPipeline.xpackCiGroupProcess(it, true) })
|
||||
}
|
||||
|
||||
def xpackCiGroupDocker() {
|
||||
task {
|
||||
workers.ci(name: 'xpack-cigroups-docker', size: 'm', ramDisk: true) {
|
||||
kibanaPipeline.downloadDefaultBuildArtifacts()
|
||||
kibanaPipeline.bash("""
|
||||
cd '${env.WORKSPACE}'
|
||||
mkdir -p kibana-build-xpack
|
||||
tar -xzf kibana-default.tar.gz -C kibana-build-xpack --strip=1
|
||||
tar -xzf kibana-default-plugins.tar.gz -C kibana
|
||||
""", "Extract Default Build artifacts")
|
||||
kibanaPipeline.xpackCiGroupProcess('Docker', true)()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def functionalOss(Map params = [:]) {
|
||||
def config = params ?: [
|
||||
serverIntegration: true,
|
||||
|
@ -100,10 +115,11 @@ def functionalXpack(Map params = [:]) {
|
|||
]
|
||||
|
||||
task {
|
||||
kibanaPipeline.buildXpack(10)
|
||||
kibanaPipeline.buildXpack(10, true)
|
||||
|
||||
if (config.ciGroups) {
|
||||
xpackCiGroups()
|
||||
xpackCiGroupDocker()
|
||||
}
|
||||
|
||||
if (config.firefox) {
|
||||
|
|
|
@ -9,6 +9,8 @@ def label(size) {
|
|||
return 'docker && linux && immutable'
|
||||
case 's-highmem':
|
||||
return 'docker && tests-s'
|
||||
case 'm':
|
||||
return 'docker && linux && immutable && gobld/machineType:n2-standard-8'
|
||||
case 'm-highmem':
|
||||
return 'docker && linux && immutable && gobld/machineType:n1-highmem-8'
|
||||
case 'l':
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
export default function ({ loadTestFile }) {
|
||||
describe('Fleet Endpoints', function () {
|
||||
this.tags('ciGroup10');
|
||||
this.tags('ciGroupDocker');
|
||||
// EPM
|
||||
loadTestFile(require.resolve('./epm/index'));
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export default function (providerContext: FtrProviderContext) {
|
|||
const { loadTestFile, getService } = providerContext;
|
||||
|
||||
describe('endpoint', function () {
|
||||
this.tags('ciGroup7');
|
||||
this.tags('ciGroupDocker');
|
||||
const ingestManager = getService('ingestManager');
|
||||
const log = getService('log');
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ export default function endpointAPIIntegrationTests(providerContext: FtrProvider
|
|||
describe('Endpoint plugin', function () {
|
||||
const ingestManager = getService('ingestManager');
|
||||
|
||||
this.tags('ciGroup7');
|
||||
this.tags('ciGroupDocker');
|
||||
const log = getService('log');
|
||||
|
||||
if (!isRegistryEnabled()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue