only generate the necessary branch in CI environments
This commit is contained in:
@ -43,7 +43,7 @@ fi
|
|||||||
|
|
||||||
if [[ "$NODE_INTEGRATION" != "0" ]]; then
|
if [[ "$NODE_INTEGRATION" != "0" ]]; then
|
||||||
group "generating tests"
|
group "generating tests"
|
||||||
call node scripts/generate --no-api
|
call node scripts/generate --no-api --branch $TESTING_BRANCH
|
||||||
|
|
||||||
group "running integration tests"
|
group "running integration tests"
|
||||||
if [[ -n "$JENKINS" ]]; then
|
if [[ -n "$JENKINS" ]]; then
|
||||||
|
|||||||
@ -19,6 +19,10 @@ var argv = require('optimist')
|
|||||||
update: {
|
update: {
|
||||||
default: true,
|
default: true,
|
||||||
boolean: true
|
boolean: true
|
||||||
|
},
|
||||||
|
branch: {
|
||||||
|
default: null,
|
||||||
|
string: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -29,12 +33,6 @@ var utils = require(fromRoot('grunt/utils'));
|
|||||||
var esUrl = 'https://github.com/elasticsearch/elasticsearch.git';
|
var esUrl = 'https://github.com/elasticsearch/elasticsearch.git';
|
||||||
var branches;
|
var branches;
|
||||||
|
|
||||||
if (process.env.ES_GIT_BRANCH) {
|
|
||||||
branches = [process.env.ES_GIT_BRANCH.split('/').slice(1).join('/')];
|
|
||||||
} else {
|
|
||||||
branches = utils.branches;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.npm_config_argv) {
|
if (process.env.npm_config_argv) {
|
||||||
// when called by NPM
|
// when called by NPM
|
||||||
argv = argv.parse(JSON.parse(process.env.npm_config_argv).original);
|
argv = argv.parse(JSON.parse(process.env.npm_config_argv).original);
|
||||||
@ -43,6 +41,13 @@ if (process.env.npm_config_argv) {
|
|||||||
argv = argv.argv;
|
argv = argv.argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argv.branch) {
|
||||||
|
branches = [argv.branch];
|
||||||
|
} else {
|
||||||
|
branches = utils.branches;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function isDirectory(dir) {
|
function isDirectory(dir) {
|
||||||
var stat;
|
var stat;
|
||||||
try { stat = fs.statSync(dir); } catch (e) {}
|
try { stat = fs.statSync(dir); } catch (e) {}
|
||||||
|
|||||||
@ -17,11 +17,11 @@ re_10='^1\.0\..*$';
|
|||||||
if [[ "$ES_V" =~ $re_nightly ]]; then
|
if [[ "$ES_V" =~ $re_nightly ]]; then
|
||||||
export ES_BRANCH=${BASH_REMATCH[1]}
|
export ES_BRANCH=${BASH_REMATCH[1]}
|
||||||
elif [[ "$ES_V" =~ $re_090 ]]; then
|
elif [[ "$ES_V" =~ $re_090 ]]; then
|
||||||
ES_BRANCH='0.90'
|
export ES_BRANCH='0.90'
|
||||||
ES_RELEASE=$ES_V
|
export ES_RELEASE=$ES_V
|
||||||
elif [[ "$ES_V" =~ $re_10 ]]; then
|
elif [[ "$ES_V" =~ $re_10 ]]; then
|
||||||
ES_BRANCH='1.0'
|
export ES_BRANCH='1.0'
|
||||||
ES_RELEASE=$ES_V
|
export ES_RELEASE=$ES_V
|
||||||
else
|
else
|
||||||
echo "unable to parse ES_V $ES_V"
|
echo "unable to parse ES_V $ES_V"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user