From 1ecf5d0e8eaff87c749fbebd87b9a35c8153cb44 Mon Sep 17 00:00:00 2001 From: Mick Semb Wever Date: Thu, 8 Apr 2021 12:05:05 -0400 Subject: [PATCH] Fix dtest-jar building when switching branches in circleci patch by Brandon Williams and Mick Semb Wever; tested and reviewed by Ekaterina Dimitrova for CASSANDRA-16572 --- .circleci/config-2_1.yml | 3 +++ .circleci/config.yml | 3 +++ .circleci/config.yml.HIGHRES | 3 +++ .circleci/config.yml.LOWRES | 3 +++ 4 files changed, 12 insertions(+) diff --git a/.circleci/config-2_1.yml b/.circleci/config-2_1.yml index 88a9b7dca0..51e357aa8c 100644 --- a/.circleci/config-2_1.yml +++ b/.circleci/config-2_1.yml @@ -325,6 +325,7 @@ commands: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch git checkout $branch + git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar @@ -341,7 +342,9 @@ commands: fi done # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean git checkout origin/$CIRCLE_BRANCH + git clean -fd for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar RETURN="$?" diff --git a/.circleci/config.yml b/.circleci/config.yml index 451eb3bb5b..43e0f346bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -732,6 +732,7 @@ jobs: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch git checkout $branch + git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar @@ -748,7 +749,9 @@ jobs: fi done # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean git checkout origin/$CIRCLE_BRANCH + git clean -fd for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar RETURN="$?" diff --git a/.circleci/config.yml.HIGHRES b/.circleci/config.yml.HIGHRES index 6f571bea86..e60cb719ab 100644 --- a/.circleci/config.yml.HIGHRES +++ b/.circleci/config.yml.HIGHRES @@ -732,6 +732,7 @@ jobs: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch git checkout $branch + it clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar @@ -748,7 +749,9 @@ jobs: fi done # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean git checkout origin/$CIRCLE_BRANCH + it clean -fd for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar RETURN="$?" diff --git a/.circleci/config.yml.LOWRES b/.circleci/config.yml.LOWRES index 451eb3bb5b..43e0f346bb 100644 --- a/.circleci/config.yml.LOWRES +++ b/.circleci/config.yml.LOWRES @@ -732,6 +732,7 @@ jobs: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch git checkout $branch + git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar @@ -748,7 +749,9 @@ jobs: fi done # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean git checkout origin/$CIRCLE_BRANCH + git clean -fd for x in $(seq 1 3); do ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar RETURN="$?"