Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Hotfix #17358

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/scripts/travis_has_changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -exuo pipefail

# Changes on these files will trigger all builds.
COMMON_DIRLIST="vendor dev-tools .travis.yml"
COMMON_DIRLIST="vendor dev-tools .travis.yml testing"

# Commit range to check for. For example master...<PR branch>
RANGE=$TRAVIS_COMMIT_RANGE
Expand Down
89 changes: 41 additions & 48 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -545,17 +545,6 @@ pipeline {
k8sTest(["v1.16.2","v1.15.3","v1.14.6","v1.13.10","v1.12.10","v1.11.10"])
}
}
stage('Docs'){
agent { label 'ubuntu && immutable' }
options { skipDefaultCheckout() }
when {
beforeAgent true
expression { return env.BUILD_DOCS != "false" }
}
steps {
makeTarget("Docs", "docs")
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this. The elasticsearch-ci/docs test is much more complete.

}
}
}
Expand Down Expand Up @@ -797,69 +786,73 @@ def isChanged(patterns){
)
}

def isChangedOSSCode(patterns) {
def always = [
"Jenkinsfile",
"^vendor/*",
"^libbeat/*",
"^testing/*",
"^dev-tools/*",
]
return isChanged(always + patterns)
}

def isChangedXPackCode(patterns) {
def always = [
"Jenkinsfile",
"^vendor/*",
"^libbeat/*",
"^dev-tools/*",
"^testing/*",
"^x-pack/libbeat/.*",
]
return isChanged(always + patterns)
}

def loadConfigEnvVars(){
env.BUILD_AUDITBEAT = isChanged(["^auditbeat/.*"])
env.BUILD_AUDITBEAT_XPACK = isChanged([
env.BUILD_AUDITBEAT_XPACK = isChangedXPackCode([
"^auditbeat/.*",
"^x-pack/auditbeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_DOCKERLOGBEAT_XPACK = isChanged([
env.BUILD_DOCKERLOGBEAT_XPACK = isChangedXPackCode([
"^x-pack/dockerlogbeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_DOCS = isChanged(
patterns: ["^docs/.*"],
comparator: 'regexp'
)
env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"])
env.BUILD_FILEBEAT_XPACK = isChanged([
env.BUILD_FILEBEAT = isChangedOSSCode(["^filebeat/.*"])
env.BUILD_FILEBEAT_XPACK = isChangedXPackCode([
"^filebeat/.*",
"^x-pack/filebeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_FUNCTIONBEAT_XPACK = isChanged([
env.BUILD_FUNCTIONBEAT_XPACK = isChangedXPackCode([
"^x-pack/functionbeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_GENERATOR = isChanged(["^generator/.*"])
env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"])
env.BUILD_HEARTBEAT_XPACK = isChanged([
env.BUILD_GENERATOR = isChangedOSSCode(["^generator/.*"])
env.BUILD_HEARTBEAT = isChangedOSSCode(["^heartbeat/.*"])
env.BUILD_HEARTBEAT_XPACK = isChangedXPackCode([
"^heartbeat/.*",
"^x-pack/heartbeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_JOURNALBEAT = isChanged(["^journalbeat/.*"])
env.BUILD_JOURNALBEAT_XPACK = isChanged([
env.BUILD_JOURNALBEAT = isChangedOSSCode(["^journalbeat/.*"])
env.BUILD_JOURNALBEAT_XPACK = isChangedXPackCode([
"^journalbeat/.*",
"^x-pack/journalbeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"])
env.BUILD_LIBBEAT = isChanged(
patterns: ["^libbeat/.*"],
comparator: 'regexp'
)
env.BUILD_LIBBEAT_XPACK = isChanged([
"^libbeat/.*",
"^x-pack/libbeat/.*",
])
env.BUILD_METRICBEAT = isChanged(["^metricbeat/.*"])
env.BUILD_METRICBEAT_XPACK = isChanged([
env.BUILD_LIBBEAT = isChangedOSSCode([])
env.BUILD_LIBBEAT_XPACK = isChangedXPackCode([])
env.BUILD_METRICBEAT = isChangedOSSCode(["^metricbeat/.*"])
env.BUILD_METRICBEAT_XPACK = isChangedXPackCode([
"^metricbeat/.*",
"^x-pack/libbeat/.*",
"^x-pack/metricbeat/.*",
])
env.BUILD_PACKETBEAT = isChanged(["^packetbeat/.*"])
env.BUILD_PACKETBEAT_XPACK = isChanged([
env.BUILD_PACKETBEAT = isChangedOSSCode(["^packetbeat/.*"])
env.BUILD_PACKETBEAT_XPACK = isChangedXPackCode([
"^packetbeat/.*",
"^x-pack/libbeat/.*",
"^x-pack/packetbeat/.*",
])
env.BUILD_WINLOGBEAT = isChanged(["^winlogbeat/.*"])
env.BUILD_WINLOGBEAT_XPACK = isChanged([
env.BUILD_WINLOGBEAT = isChangedOSSCode(["^winlogbeat/.*"])
env.BUILD_WINLOGBEAT_XPACK = isChangedXPackCode([
"^winlogbeat/.*",
"^x-pack/libbeat/.*",
"^x-pack/winlogbeat/.*",
])
env.GO_VERSION = readFile(".go-version").trim()
Expand Down