From e40e79ca663889768bd90a66b7fc942daa8df061 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 7 Sep 2018 13:40:47 -0500 Subject: [PATCH 1/3] [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 23f23891a82355c0b05d29e9d5ae85e7d019e3bd Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 7 Sep 2018 14:06:23 -0500 Subject: [PATCH 2/3] 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 f3633f5bc833ea06e8dc4b7b8501f8f2d64437f7 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 7 Sep 2018 14:17:33 -0500 Subject: [PATCH 3/3] 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 }