mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
This PR makes the necesary adaptations to the tests and adds a power shell script to invoke the OS tests on GCP instances connected as CI workers. Also noticed that logs were not being produced by the tests and that theses were not using log4j so fixed that too. One of the difficulties in working on theses tests was that the tests just stalled with no indication where the problem is. To ease with the debugging, after process explorer suggested that the tests are running some commands, we now have multiple timeouts: one for the tests ( which will generate a thread dump ) and one for individual commands ( that bails with the command being ran and output and error so far ) to make it easier to see what went wrong. The tests were blocking because apparently the pipes to the sub-process were not closing, thus the threads were blocking on them and we were blocking indefinitely on the join. I'm not sure why this doesn't happen in vagrant, but we now properly deal with it.
53 lines
2.1 KiB
Groovy
53 lines
2.1 KiB
Groovy
import nebula.plugin.info.scm.ScmInfoExtension
|
|
import org.elasticsearch.gradle.OS
|
|
|
|
buildScan {
|
|
def jenkinsUrl = System.getenv('JENKINS_URL') ? new URL(System.getenv('JENKINS_URL')) : null
|
|
|
|
tag OS.current().name()
|
|
|
|
// Accept Gradle ToS when project property org.elasticsearch.acceptScanTOS=true or this is an Elastic CI build
|
|
if (jenkinsUrl?.host?.endsWith('elastic.co') || Boolean.valueOf(project.findProperty('org.elasticsearch.acceptScanTOS') ?: "false")) {
|
|
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
|
|
termsOfServiceAgree = 'yes'
|
|
}
|
|
|
|
// Jenkins-specific build scan metadata
|
|
if (jenkinsUrl) {
|
|
tag 'CI'
|
|
tag System.getenv('JOB_NAME')
|
|
link 'Jenkins Build', System.getenv('BUILD_URL')
|
|
System.getenv('NODE_LABELS').split(' ').each {
|
|
value 'Jenkins Worker Label', it
|
|
}
|
|
|
|
def isPrBuild = System.getenv('ROOT_BUILD_CAUSE_GHPRBCAUSE') != null
|
|
|
|
// Capture changes included in this CI build except for pull request builds
|
|
if (System.getenv('GIT_COMMIT') && !isPrBuild) {
|
|
background {
|
|
def changes = "git diff --name-only ${System.getenv('GIT_PREVIOUS_COMMIT')}..${System.getenv('GIT_COMMIT')}".execute().text.trim()
|
|
value 'Git Changes', changes
|
|
}
|
|
}
|
|
|
|
// Add SCM information
|
|
if (isPrBuild) {
|
|
value 'Git Commit ID', System.getenv('ghprbActualCommit')
|
|
value 'Git Branch', System.getenv('ghprbTargetBranch')
|
|
tag System.getenv('ghprbTargetBranch')
|
|
tag "pr/${System.getenv('ghprbPullId')}"
|
|
link 'Source', "https://github.com/elastic/elasticsearch/tree/${System.getenv('ghprbActualCommit')}"
|
|
link 'Pull Request', System.getenv('ghprbPullLink')
|
|
} else {
|
|
def branch = System.getenv('GIT_BRANCH').split('/').last()
|
|
value 'Git Commit ID', System.getenv('GIT_COMMIT')
|
|
value 'Git Branch', branch
|
|
tag branch
|
|
link 'Source', "https://github.com/elastic/elasticsearch/tree/${System.getenv('GIT_COMMIT')}"
|
|
}
|
|
} else {
|
|
tag 'LOCAL'
|
|
}
|
|
}
|