mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[CI] TeamCity updates (#85843)
This commit is contained in:
parent
5493e8eace
commit
8dc86c5f4b
23 changed files with 143 additions and 97 deletions
|
@ -7,7 +7,7 @@ source "$(dirname "${0}")/util.sh"
|
|||
tc_start_block "Bootstrap"
|
||||
|
||||
tc_start_block "yarn install and kbn bootstrap"
|
||||
verify_no_git_changes yarn kbn bootstrap --prefer-offline
|
||||
verify_no_git_changes yarn kbn bootstrap
|
||||
tc_end_block "yarn install and kbn bootstrap"
|
||||
|
||||
tc_start_block "build kbn-pm"
|
||||
|
|
|
@ -4,4 +4,5 @@ set -euo pipefail
|
|||
|
||||
source "$(dirname "${0}")/../util.sh"
|
||||
|
||||
node scripts/build_kibana_platform_plugins --validate-limits
|
||||
checks-reporter-with-killswitch "Check Bundle Limits" \
|
||||
node scripts/build_kibana_platform_plugins --validate-limits
|
||||
|
|
13
.ci/teamcity/checks/commit.sh
Executable file
13
.ci/teamcity/checks/commit.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source "$(dirname "${0}")/../util.sh"
|
||||
|
||||
# Runs pre-commit hook script for the files touched in the last commit.
|
||||
# That way we can ensure a set of quick commit checks earlier as we removed
|
||||
# the pre-commit hook installation by default.
|
||||
# If files are more than 200 we will skip it and just use
|
||||
# the further ci steps that already check linting and file casing for the entire repo.
|
||||
checks-reporter-with-killswitch "Quick commit checks" \
|
||||
"$(dirname "${0}")/commit_check_runner.sh"
|
9
.ci/teamcity/checks/commit_check_runner.sh
Executable file
9
.ci/teamcity/checks/commit_check_runner.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "!!!!!!!! ATTENTION !!!!!!!!
|
||||
That check is intended to provide earlier CI feedback after we remove the automatic install for the local pre-commit hook.
|
||||
If you want, you can still manually install the pre-commit hook locally by running 'node scripts/register_git_hook locally'
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
"
|
||||
|
||||
node scripts/precommit_hook.js --ref HEAD~1..HEAD --max-files 200 --verbose
|
8
.ci/teamcity/checks/jest_configs.sh
Executable file
8
.ci/teamcity/checks/jest_configs.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source "$(dirname "${0}")/../util.sh"
|
||||
|
||||
checks-reporter-with-killswitch "Check Jest Configs" \
|
||||
node scripts/check_jest_configs
|
8
.ci/teamcity/checks/plugins_with_circular_deps.sh
Executable file
8
.ci/teamcity/checks/plugins_with_circular_deps.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source "$(dirname "${0}")/../util.sh"
|
||||
|
||||
checks-reporter-with-killswitch "Check Plugins With Circular Dependencies" \
|
||||
node scripts/find_plugins_with_circular_deps
|
|
@ -13,6 +13,21 @@ if [[ ! -d "target" ]]; then
|
|||
fi
|
||||
cd -
|
||||
|
||||
./test/scripts/test/plugin_functional.sh
|
||||
./test/scripts/test/example_functional.sh
|
||||
./test/scripts/test/interpreter_functional.sh
|
||||
checks-reporter-with-killswitch "Plugin Functional Tests" \
|
||||
node scripts/functional_tests \
|
||||
--config test/plugin_functional/config.ts \
|
||||
--bail \
|
||||
--debug
|
||||
|
||||
checks-reporter-with-killswitch "Example Functional Tests" \
|
||||
node scripts/functional_tests \
|
||||
--config test/examples/config.js \
|
||||
--bail \
|
||||
--debug
|
||||
|
||||
checks-reporter-with-killswitch "Interpreter Functional Tests" \
|
||||
node scripts/functional_tests \
|
||||
--config test/interpreter_functional/config.ts \
|
||||
--bail \
|
||||
--debug \
|
||||
--kibana-install-dir "$KIBANA_INSTALL_DIR"
|
||||
|
|
|
@ -25,12 +25,14 @@ tc_set_env FORCE_COLOR 1
|
|||
tc_set_env TEST_BROWSER_HEADLESS 1
|
||||
|
||||
tc_set_env ELASTIC_APM_ENVIRONMENT ci
|
||||
tc_set_env ELASTIC_APM_TRANSACTION_SAMPLE_RATE 0.1
|
||||
|
||||
if [[ "${KIBANA_CI_REPORTER_KEY_BASE64-}" ]]; then
|
||||
tc_set_env KIBANA_CI_REPORTER_KEY "$(echo "$KIBANA_CI_REPORTER_KEY_BASE64" | base64 -d)"
|
||||
fi
|
||||
|
||||
if is_pr; then
|
||||
tc_set_env ELASTIC_APM_ACTIVE false
|
||||
tc_set_env CHECKS_REPORTER_ACTIVE true
|
||||
|
||||
# These can be removed once we're not supporting Jenkins and TeamCity at the same time
|
||||
|
@ -39,6 +41,7 @@ if is_pr; then
|
|||
tc_set_env ghprbActualCommit "$GITHUB_PR_TRIGGERED_SHA"
|
||||
tc_set_env BUILD_URL "$TEAMCITY_BUILD_URL"
|
||||
else
|
||||
tc_set_env ELASTIC_APM_ACTIVE true
|
||||
tc_set_env CHECKS_REPORTER_ACTIVE false
|
||||
fi
|
||||
|
||||
|
|
17
.teamcity/pom.xml
vendored
17
.teamcity/pom.xml
vendored
|
@ -46,6 +46,14 @@
|
|||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>teamcity</id>
|
||||
<url>https://artifactory.elstc.co/artifactory/teamcity</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
|
@ -53,6 +61,10 @@
|
|||
<id>JetBrains</id>
|
||||
<url>https://download.jetbrains.com/teamcity-repository</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>teamcity</id>
|
||||
<url>https://artifactory.elstc.co/artifactory/teamcity</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<build>
|
||||
|
@ -124,5 +136,10 @@
|
|||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>co.elastic.teamcity</groupId>
|
||||
<artifactId>teamcity-common</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
2
.teamcity/settings.kts
vendored
2
.teamcity/settings.kts
vendored
|
@ -2,7 +2,7 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
|||
import projects.Kibana
|
||||
import projects.KibanaConfiguration
|
||||
|
||||
version = "2020.1"
|
||||
version = "2020.2"
|
||||
|
||||
val config = KibanaConfiguration {
|
||||
agentNetwork = DslContext.getParameter("agentNetwork", "teamcity")
|
||||
|
|
28
.teamcity/src/Agents.kt
vendored
Normal file
28
.teamcity/src/Agents.kt
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
import co.elastic.teamcity.common.GoogleCloudAgent
|
||||
import co.elastic.teamcity.common.GoogleCloudAgentDiskType
|
||||
import co.elastic.teamcity.common.GoogleCloudProfile
|
||||
|
||||
private val sizes = listOf("2", "4", "8", "16")
|
||||
|
||||
val StandardAgents = sizes.map { size -> size to GoogleCloudAgent {
|
||||
sourceImageFamily = "elastic-kibana-ci-ubuntu-1804-lts"
|
||||
agentPrefix = "kibana-standard-$size-"
|
||||
machineType = "n2-standard-$size"
|
||||
diskSizeGb = 75
|
||||
diskType = GoogleCloudAgentDiskType.SSD
|
||||
} }.toMap()
|
||||
|
||||
val BuildAgent = GoogleCloudAgent {
|
||||
sourceImageFamily = "elastic-kibana-ci-ubuntu-1804-lts"
|
||||
agentPrefix = "kibana-c2-16-"
|
||||
machineType = "c2-standard-16"
|
||||
diskSizeGb = 250
|
||||
diskType = GoogleCloudAgentDiskType.SSD
|
||||
}
|
||||
|
||||
val CloudProfile = GoogleCloudProfile {
|
||||
accessKeyId = "447fdd4d-7129-46b7-9822-2e57658c7422"
|
||||
|
||||
agents(StandardAgents)
|
||||
agent(BuildAgent)
|
||||
}
|
38
.teamcity/src/Extensions.kt
vendored
38
.teamcity/src/Extensions.kt
vendored
|
@ -1,9 +1,7 @@
|
|||
import co.elastic.teamcity.common.requireAgent
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.notifications
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.ScriptBuildStep
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.insert
|
||||
import projects.kibanaConfiguration
|
||||
|
||||
fun BuildFeatures.junit(dirs: String = "target/**/TEST-*.xml") {
|
||||
feature {
|
||||
|
@ -13,40 +11,8 @@ fun BuildFeatures.junit(dirs: String = "target/**/TEST-*.xml") {
|
|||
}
|
||||
}
|
||||
|
||||
fun ProjectFeatures.kibanaAgent(init: ProjectFeature.() -> Unit) {
|
||||
feature {
|
||||
type = "CloudImage"
|
||||
param("network", kibanaConfiguration.agentNetwork)
|
||||
param("subnet", kibanaConfiguration.agentSubnet)
|
||||
param("growingId", "true")
|
||||
param("agent_pool_id", "-2")
|
||||
param("preemptible", "false")
|
||||
param("sourceProject", "elastic-images-prod")
|
||||
param("sourceImageFamily", "elastic-kibana-ci-ubuntu-1804-lts")
|
||||
param("zone", "us-central1-a")
|
||||
param("profileId", "kibana")
|
||||
param("diskType", "pd-ssd")
|
||||
param("machineCustom", "false")
|
||||
param("maxInstances", "200")
|
||||
param("imageType", "ImageFamily")
|
||||
param("diskSizeGb", "75") // TODO
|
||||
init()
|
||||
}
|
||||
}
|
||||
|
||||
fun ProjectFeatures.kibanaAgent(size: String, init: ProjectFeature.() -> Unit = {}) {
|
||||
kibanaAgent {
|
||||
id = "KIBANA_STANDARD_$size"
|
||||
param("source-id", "kibana-standard-$size-")
|
||||
param("machineType", "n2-standard-$size")
|
||||
init()
|
||||
}
|
||||
}
|
||||
|
||||
fun BuildType.kibanaAgent(size: String) {
|
||||
requirements {
|
||||
startsWith("teamcity.agent.name", "kibana-standard-$size-", "RQ_AGENT_NAME")
|
||||
}
|
||||
requireAgent(StandardAgents[size]!!)
|
||||
}
|
||||
|
||||
fun BuildType.kibanaAgent(size: Int) {
|
||||
|
|
6
.teamcity/src/builds/Checks.kt
vendored
6
.teamcity/src/builds/Checks.kt
vendored
|
@ -11,16 +11,18 @@ object Checks : BuildType({
|
|||
kibanaAgent(4)
|
||||
|
||||
val checkScripts = mapOf(
|
||||
"Quick Commit Checks" to ".ci/teamcity/checks/commit.sh",
|
||||
"Check Telemetry Schema" to ".ci/teamcity/checks/telemetry.sh",
|
||||
"Check TypeScript Projects" to ".ci/teamcity/checks/ts_projects.sh",
|
||||
"Check File Casing" to ".ci/teamcity/checks/file_casing.sh",
|
||||
"Check Licenses" to ".ci/teamcity/checks/licenses.sh",
|
||||
"Verify NOTICE" to ".ci/teamcity/checks/verify_notice.sh",
|
||||
"Test Hardening" to ".ci/teamcity/checks/test_hardening.sh",
|
||||
"Check Types" to ".ci/teamcity/checks/type_check.sh",
|
||||
"Check Jest Configs" to ".ci/teamcity/checks/jest_configs.sh",
|
||||
"Check Doc API Changes" to ".ci/teamcity/checks/doc_api_changes.sh",
|
||||
"Check Bundle Limits" to ".ci/teamcity/checks/bundle_limits.sh",
|
||||
"Check i18n" to ".ci/teamcity/checks/i18n.sh"
|
||||
"Check i18n" to ".ci/teamcity/checks/i18n.sh",
|
||||
"Check Plugins With Circular Dependencies" to ".ci/teamcity/checks/plugins_with_circular_deps.sh"
|
||||
)
|
||||
|
||||
steps {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package builds.default
|
||||
|
||||
import StandardAgents
|
||||
import co.elastic.teamcity.common.requireAgent
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import runbld
|
||||
|
||||
|
@ -11,5 +13,7 @@ class DefaultCiGroup(val ciGroup: Int = 0, init: BuildType.() -> Unit = {}) : De
|
|||
runbld("Default CI Group $ciGroup", "./.ci/teamcity/default/ci_group.sh $ciGroup")
|
||||
}
|
||||
|
||||
requireAgent(StandardAgents["4"]!!)
|
||||
|
||||
init()
|
||||
})
|
||||
|
|
|
@ -3,7 +3,7 @@ package builds.default
|
|||
import dependsOn
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
|
||||
const val DEFAULT_CI_GROUP_COUNT = 10
|
||||
const val DEFAULT_CI_GROUP_COUNT = 11
|
||||
val defaultCiGroups = (1..DEFAULT_CI_GROUP_COUNT).map { DefaultCiGroup(it) }
|
||||
|
||||
object DefaultCiGroups : BuildType({
|
||||
|
|
4
.teamcity/src/builds/es_snapshots/Verify.kt
vendored
4
.teamcity/src/builds/es_snapshots/Verify.kt
vendored
|
@ -6,7 +6,7 @@ import builds.default.defaultCiGroups
|
|||
import builds.oss.OssBuild
|
||||
import builds.oss.OssPluginFunctional
|
||||
import builds.oss.ossCiGroups
|
||||
import builds.test.ApiServerIntegration
|
||||
import builds.oss.OssApiServerIntegration
|
||||
import builds.test.JestIntegration
|
||||
import dependsOn
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
|
@ -49,7 +49,7 @@ val defaultBuildsToClone = listOf(
|
|||
val defaultCloned = defaultBuildsToClone.map { cloneForVerify(it) }
|
||||
|
||||
val integrationsBuildsToClone = listOf(
|
||||
ApiServerIntegration,
|
||||
OssApiServerIntegration,
|
||||
JestIntegration
|
||||
)
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package builds.test
|
||||
package builds.oss
|
||||
|
||||
import addTestSettings
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
import runbld
|
||||
|
||||
object ApiServerIntegration : BuildType({
|
||||
object OssApiServerIntegration : OssFunctionalBase({
|
||||
name = "API/Server Integration"
|
||||
description = "Executes API and Server Integration Tests"
|
||||
|
||||
|
@ -12,6 +10,4 @@ object ApiServerIntegration : BuildType({
|
|||
runbld("API Integration", "./.ci/teamcity/oss/api_integration.sh")
|
||||
runbld("Server Integration", "./.ci/teamcity/oss/server_integration.sh")
|
||||
}
|
||||
|
||||
addTestSettings()
|
||||
})
|
3
.teamcity/src/builds/test/AllTests.kt
vendored
3
.teamcity/src/builds/test/AllTests.kt
vendored
|
@ -1,5 +1,6 @@
|
|||
package builds.test
|
||||
|
||||
import builds.oss.OssApiServerIntegration
|
||||
import dependsOn
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
|
||||
|
||||
|
@ -8,5 +9,5 @@ object AllTests : BuildType({
|
|||
description = "All Non-Functional Tests"
|
||||
type = Type.COMPOSITE
|
||||
|
||||
dependsOn(QuickTests, Jest, XPackJest, JestIntegration, ApiServerIntegration)
|
||||
dependsOn(QuickTests, Jest, XPackJest, JestIntegration, OssApiServerIntegration)
|
||||
})
|
||||
|
|
2
.teamcity/src/builds/test/QuickTests.kt
vendored
2
.teamcity/src/builds/test/QuickTests.kt
vendored
|
@ -12,7 +12,7 @@ object QuickTests : BuildType({
|
|||
kibanaAgent(2)
|
||||
|
||||
val testScripts = mapOf(
|
||||
"Test Hardening" to ".ci/teamcity/checkes/test_hardening.sh",
|
||||
"Test Hardening" to ".ci/teamcity/checks/test_hardening.sh",
|
||||
"Test Projects" to ".ci/teamcity/tests/test_projects.sh",
|
||||
"Mocha Tests" to ".ci/teamcity/tests/mocha.sh"
|
||||
)
|
||||
|
|
38
.teamcity/src/projects/Kibana.kt
vendored
38
.teamcity/src/projects/Kibana.kt
vendored
|
@ -5,9 +5,10 @@ import builds.*
|
|||
import builds.default.*
|
||||
import builds.oss.*
|
||||
import builds.test.*
|
||||
import CloudProfile
|
||||
import co.elastic.teamcity.common.googleCloudProfile
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.slackConnection
|
||||
import kibanaAgent
|
||||
import templates.KibanaTemplate
|
||||
import templates.DefaultTemplate
|
||||
import vcs.Elasticsearch
|
||||
|
@ -31,7 +32,7 @@ fun Kibana(config: KibanaConfiguration = KibanaConfiguration()) : Project {
|
|||
param("teamcity.ui.settings.readOnly", "true")
|
||||
|
||||
// https://github.com/JetBrains/teamcity-webhooks
|
||||
param("teamcity.internal.webhooks.enable", "true")
|
||||
param("teamcity.internal.webhooks.enable", "false")
|
||||
param("teamcity.internal.webhooks.events", "BUILD_STARTED;BUILD_FINISHED;BUILD_INTERRUPTED;CHANGES_LOADED;BUILD_TYPE_ADDED_TO_QUEUE;BUILD_PROBLEMS_CHANGED")
|
||||
param("teamcity.internal.webhooks.url", "https://ci-stats.kibana.dev/_teamcity_webhook")
|
||||
param("teamcity.internal.webhooks.username", "automation")
|
||||
|
@ -46,36 +47,9 @@ fun Kibana(config: KibanaConfiguration = KibanaConfiguration()) : Project {
|
|||
|
||||
defaultTemplate = DefaultTemplate
|
||||
|
||||
googleCloudProfile(CloudProfile)
|
||||
|
||||
features {
|
||||
val sizes = listOf("2", "4", "8", "16")
|
||||
for (size in sizes) {
|
||||
kibanaAgent(size)
|
||||
}
|
||||
|
||||
kibanaAgent {
|
||||
id = "KIBANA_C2_16"
|
||||
param("source-id", "kibana-c2-16-")
|
||||
param("machineType", "c2-standard-16")
|
||||
}
|
||||
|
||||
feature {
|
||||
id = "kibana"
|
||||
type = "CloudProfile"
|
||||
param("agentPushPreset", "")
|
||||
param("profileId", "kibana")
|
||||
param("profileServerUrl", "")
|
||||
param("name", "kibana")
|
||||
param("total-work-time", "")
|
||||
param("credentialsType", "key")
|
||||
param("description", "")
|
||||
param("next-hour", "")
|
||||
param("cloud-code", "google")
|
||||
param("terminate-after-build", "true")
|
||||
param("terminate-idle-time", "30")
|
||||
param("enabled", "true")
|
||||
param("secure:accessKey", "credentialsJSON:447fdd4d-7129-46b7-9822-2e57658c7422")
|
||||
}
|
||||
|
||||
slackConnection {
|
||||
id = "KIBANA_SLACK"
|
||||
displayName = "Kibana Slack"
|
||||
|
@ -106,7 +80,6 @@ fun Kibana(config: KibanaConfiguration = KibanaConfiguration()) : Project {
|
|||
buildType(JestIntegration)
|
||||
}
|
||||
|
||||
buildType(ApiServerIntegration)
|
||||
buildType(QuickTests)
|
||||
buildType(AllTests)
|
||||
}
|
||||
|
@ -125,6 +98,7 @@ fun Kibana(config: KibanaConfiguration = KibanaConfiguration()) : Project {
|
|||
buildType(OssFirefox)
|
||||
buildType(OssAccessibility)
|
||||
buildType(OssPluginFunctional)
|
||||
buildType(OssApiServerIntegration)
|
||||
|
||||
subProject {
|
||||
id("CIGroups")
|
||||
|
|
7
.teamcity/src/templates/DefaultTemplate.kt
vendored
7
.teamcity/src/templates/DefaultTemplate.kt
vendored
|
@ -1,15 +1,14 @@
|
|||
package templates
|
||||
|
||||
import StandardAgents
|
||||
import co.elastic.teamcity.common.requireAgent
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.Template
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.perfmon
|
||||
|
||||
object DefaultTemplate : Template({
|
||||
name = "Default Template"
|
||||
|
||||
requirements {
|
||||
equals("system.cloud.profile_id", "kibana", "RQ_CLOUD_PROFILE_ID")
|
||||
startsWith("teamcity.agent.name", "kibana-standard-2-", "RQ_AGENT_NAME")
|
||||
}
|
||||
requireAgent(StandardAgents["2"]!!)
|
||||
|
||||
params {
|
||||
param("env.HOME", "/var/lib/jenkins") // TODO once the agent images are sorted out
|
||||
|
|
9
.teamcity/src/templates/KibanaTemplate.kt
vendored
9
.teamcity/src/templates/KibanaTemplate.kt
vendored
|
@ -1,5 +1,7 @@
|
|||
package templates
|
||||
|
||||
import StandardAgents
|
||||
import co.elastic.teamcity.common.requireAgent
|
||||
import vcs.Kibana
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildStep
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
|
||||
|
@ -21,10 +23,7 @@ object KibanaTemplate : Template({
|
|||
// checkoutDir = "/dev/shm/%system.teamcity.buildType.id%/%system.build.number%/kibana"
|
||||
}
|
||||
|
||||
requirements {
|
||||
equals("system.cloud.profile_id", "kibana", "RQ_CLOUD_PROFILE_ID")
|
||||
startsWith("teamcity.agent.name", "kibana-standard-2-", "RQ_AGENT_NAME")
|
||||
}
|
||||
requireAgent(StandardAgents["2"]!!)
|
||||
|
||||
features {
|
||||
perfmon { }
|
||||
|
@ -41,7 +40,7 @@ object KibanaTemplate : Template({
|
|||
}
|
||||
|
||||
failureConditions {
|
||||
executionTimeoutMin = 120
|
||||
executionTimeoutMin = 160
|
||||
testFailure = false
|
||||
}
|
||||
|
||||
|
|
5
.teamcity/tests/projects/KibanaTest.kt
vendored
5
.teamcity/tests/projects/KibanaTest.kt
vendored
|
@ -1,5 +1,7 @@
|
|||
package projects
|
||||
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.AbsoluteId
|
||||
import jetbrains.buildServer.configs.kotlin.v2019_2.DslContext
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
|
@ -18,10 +20,11 @@ class KibanaTest {
|
|||
|
||||
@Test
|
||||
fun test_CloudImages_Exist() {
|
||||
DslContext.projectId = AbsoluteId("My Project")
|
||||
val project = Kibana(TestConfig)
|
||||
|
||||
assertTrue(project.features.items.any {
|
||||
it.type == "CloudImage" && it.params.any { param -> param.name == "network" && param.value == "network"}
|
||||
it.type == "CloudImage" && it.params.any { param -> param.name == "network" && param.value == "teamcity" }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue