Allow to change bwc refspec in xpack (elastic/x-pack-elasticsearch#2311)

Today it's impossible to run xpack bwc tests against any other branch
or remote than upstream. This allows to pass `-Dtests.bwc.refspec` to
change the refspec to use for the bwc tests.

Original commit: elastic/x-pack-elasticsearch@4d365f5a6e
This commit is contained in:
Simon Willnauer 2017-08-21 09:59:45 +02:00 committed by GitHub
parent 846f40ba15
commit 44c3d5b3d9
1 changed files with 6 additions and 4 deletions

View File

@ -117,25 +117,27 @@ subprojects {
task fetchElasticsearchLatest(type: LoggedExec) {
dependsOn addElasticsearchUpstream
workingDir = esCheckoutDir
commandLine = ['git', 'fetch', 'upstream']
commandLine = ['git', 'fetch', '--all']
}
task fetchXPackLatest(type: LoggedExec) {
dependsOn addXPackUpstream
workingDir = xpackCheckoutDir
commandLine = ['git', 'fetch', 'upstream']
commandLine = ['git', 'fetch', '--all']
}
task checkoutElasticsearchBwcBranch(type: LoggedExec) {
dependsOn fetchElasticsearchLatest
def String refspec = System.getProperty("tests.bwc.refspec", "upstream/${bwcBranch}")
workingDir = esCheckoutDir
commandLine = ['git', 'checkout', "upstream/${bwcBranch}"]
commandLine = ['git', 'checkout', refspec]
}
task checkoutXPackBwcBranch(type: LoggedExec) {
dependsOn fetchXPackLatest
def String refspec = System.getProperty("tests.bwc.refspec", "upstream/${bwcBranch}")
workingDir = xpackCheckoutDir
commandLine = ['git', 'checkout', "upstream/${bwcBranch}"]
commandLine = ['git', 'checkout', refspec]
}
File bwcZip = file("${xpackCheckoutDir}/plugin/build/distributions/x-pack-${bwcVersion}.zip")