From fedd1e6a38d02d35c2340d20441c437488903aad Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 7 Sep 2018 13:40:47 -0500 Subject: [PATCH 1/4] [ci] use es snapshots on non pull requests --- src/dev/ci_setup/git_setup.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/dev/ci_setup/git_setup.sh b/src/dev/ci_setup/git_setup.sh index d0e2f3ffd87e4..6ac73138e0070 100755 --- a/src/dev/ci_setup/git_setup.sh +++ b/src/dev/ci_setup/git_setup.sh @@ -81,10 +81,14 @@ function checkout_sibling { function checkout_clone_target { pick_clone_target - - echo " -> checking out '${cloneBranch}' branch from ${cloneAuthor}/${project}..." - git clone -b "$cloneBranch" "git@github.com:${cloneAuthor}/${project}.git" "$targetDir" --depth=1 - echo " -> checked out ${project} revision: $(git -C ${targetDir} rev-parse HEAD)" + if [[ $cloneBranch = "master" && $cloneAuthor = "elastic" ]]; then + echo " -> using snapshot for ${cloneAuthor}/${cloneBranch}" + export TEST_ES_FROM=snapshot + else + echo " -> checking out '${cloneBranch}' branch from ${cloneAuthor}/${project}..." + git clone -b "$cloneBranch" "git@github.com:${cloneAuthor}/${project}.git" "$targetDir" --depth=1 + echo " -> checked out ${project} revision: $(git -C ${targetDir} rev-parse HEAD)" + fi echo } From c99b6d75f971ffb5fd597eda3f4b6a2ca75a2027 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 7 Sep 2018 14:06:23 -0500 Subject: [PATCH 2/4] remove extra export --- src/dev/ci_setup/git_setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dev/ci_setup/git_setup.sh b/src/dev/ci_setup/git_setup.sh index 6ac73138e0070..0e3d54c812fff 100755 --- a/src/dev/ci_setup/git_setup.sh +++ b/src/dev/ci_setup/git_setup.sh @@ -70,7 +70,6 @@ function checkout_sibling { cloneBranch="$PR_TARGET_BRANCH" if clone_target_is_valid ; then - export TEST_ES_FROM=snapshot return 0 fi From 5d414b1d11c59e83b1c7fb2bd7c7c0ecb94c1b45 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 7 Sep 2018 14:17:33 -0500 Subject: [PATCH 3/4] always clone --- src/dev/ci_setup/git_setup.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dev/ci_setup/git_setup.sh b/src/dev/ci_setup/git_setup.sh index 0e3d54c812fff..28992aaaadfcd 100755 --- a/src/dev/ci_setup/git_setup.sh +++ b/src/dev/ci_setup/git_setup.sh @@ -81,13 +81,12 @@ function checkout_sibling { function checkout_clone_target { pick_clone_target if [[ $cloneBranch = "master" && $cloneAuthor = "elastic" ]]; then - echo " -> using snapshot for ${cloneAuthor}/${cloneBranch}" export TEST_ES_FROM=snapshot - else - echo " -> checking out '${cloneBranch}' branch from ${cloneAuthor}/${project}..." - git clone -b "$cloneBranch" "git@github.com:${cloneAuthor}/${project}.git" "$targetDir" --depth=1 - echo " -> checked out ${project} revision: $(git -C ${targetDir} rev-parse HEAD)" fi + + echo " -> checking out '${cloneBranch}' branch from ${cloneAuthor}/${project}..." + git clone -b "$cloneBranch" "git@github.com:${cloneAuthor}/${project}.git" "$targetDir" --depth=1 + echo " -> checked out ${project} revision: $(git -C ${targetDir} rev-parse HEAD)" echo } From 42f745e057c84b5bc5e0467986d66e34969654de Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Mon, 10 Sep 2018 12:04:59 -0500 Subject: [PATCH 4/4] master -> 6.x --- src/dev/ci_setup/git_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/ci_setup/git_setup.sh b/src/dev/ci_setup/git_setup.sh index 28992aaaadfcd..ed9304a0cba90 100755 --- a/src/dev/ci_setup/git_setup.sh +++ b/src/dev/ci_setup/git_setup.sh @@ -80,7 +80,7 @@ function checkout_sibling { function checkout_clone_target { pick_clone_target - if [[ $cloneBranch = "master" && $cloneAuthor = "elastic" ]]; then + if [[ $cloneBranch = "6.x" && $cloneAuthor = "elastic" ]]; then export TEST_ES_FROM=snapshot fi