From 38bc80e4a03f77b21931f6e5db006467fe82927a Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Jan 2023 16:59:38 +0200 Subject: [PATCH 1/9] CR-3258 --- service.yaml | 2 +- start.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/service.yaml b/service.yaml index e177dcf..f147b01 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 10.1.14 +version: 10.1.15 diff --git a/start.sh b/start.sh index 3a65ba1..06c3af7 100644 --- a/start.sh +++ b/start.sh @@ -150,6 +150,7 @@ else # Clone a fresh copy git_retry git clone $REPO $CLONE_DIR + echo 'eti test' cd $CLONE_DIR if [ -n "$REVISION" ]; then From d0af45d4de598ea1b3c29943d0cdabbf3f7889be Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Jan 2023 17:06:58 +0200 Subject: [PATCH 2/9] WIP --- start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/start.sh b/start.sh index 06c3af7..66d82e7 100644 --- a/start.sh +++ b/start.sh @@ -154,7 +154,12 @@ else cd $CLONE_DIR if [ -n "$REVISION" ]; then + echo 'eti test2' git checkout $REVISION fi + if [ -n "$DEPTH" ]; then + echo 'eti test3' + fi + fi From 929d781b3bb2c72e05e64c2b179c694dbcb79783 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Jan 2023 17:10:42 +0200 Subject: [PATCH 3/9] WIP --- service.yaml | 2 +- start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service.yaml b/service.yaml index f147b01..9017de6 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 10.1.15 +version: 10.1.16 diff --git a/start.sh b/start.sh index 66d82e7..8f154db 100644 --- a/start.sh +++ b/start.sh @@ -150,7 +150,7 @@ else # Clone a fresh copy git_retry git clone $REPO $CLONE_DIR - echo 'eti test' + echo 'eti testmnmkk' cd $CLONE_DIR if [ -n "$REVISION" ]; then From fe013d6419c11569cc3988f7c5faea778c31217d Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Jan 2023 18:09:55 +0200 Subject: [PATCH 4/9] WIP --- service.yaml | 2 +- start.sh | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/service.yaml b/service.yaml index 9017de6..f147b01 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 10.1.16 +version: 10.1.15 diff --git a/start.sh b/start.sh index 8f154db..01e4be3 100644 --- a/start.sh +++ b/start.sh @@ -139,7 +139,11 @@ if [ -d "$CLONE_DIR" ]; then # Clean folder and clone a fresh copy on current directory cd .. rm -rf $CLONE_DIR - git_retry git clone $REPO $CLONE_DIR + if [ -n "$DEPTH" ]; then + git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH + else + git_retry git clone $REPO $CLONE_DIR + fi cd $CLONE_DIR if [ -n "$REVISION" ]; then @@ -149,17 +153,15 @@ if [ -d "$CLONE_DIR" ]; then else # Clone a fresh copy - git_retry git clone $REPO $CLONE_DIR - echo 'eti testmnmkk' - cd $CLONE_DIR + if [ -n "$DEPTH" ]; then + git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH + else + git_retry git clone $REPO $CLONE_DIR + fi + cd $CLONE_DIR if [ -n "$REVISION" ]; then - echo 'eti test2' git checkout $REVISION fi - if [ -n "$DEPTH" ]; then - echo 'eti test3' - fi - fi From 7ba7d65887ffa2db64d94e0f41ef7571c20a1c9d Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Jan 2023 18:25:26 +0200 Subject: [PATCH 5/9] WIP --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 01e4be3..374ae75 100644 --- a/start.sh +++ b/start.sh @@ -154,7 +154,7 @@ else # Clone a fresh copy if [ -n "$DEPTH" ]; then - git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH + git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH else git_retry git clone $REPO $CLONE_DIR fi From 7c6ea59ee006567b22b9653ea45439d81545dfbb Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Wed, 4 Jan 2023 15:32:43 +0200 Subject: [PATCH 6/9] WIP --- start.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/start.sh b/start.sh index 374ae75..16f8421 100644 --- a/start.sh +++ b/start.sh @@ -98,6 +98,12 @@ if [ -n "$SPARE_CHECKOUT" ]; then exit 0 fi +if [ -n "$DEPTH" ]; then + GIT_COMMAND=git clone $REPO $CLONE_DIR --depth=$DEPTH +else + GIT_COMMAND=git clone $REPO $CLONE_DIR +fi + # Check if the cloned dir already exists from previous builds if [ -d "$CLONE_DIR" ]; then @@ -139,11 +145,7 @@ if [ -d "$CLONE_DIR" ]; then # Clean folder and clone a fresh copy on current directory cd .. rm -rf $CLONE_DIR - if [ -n "$DEPTH" ]; then - git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH - else - git_retry git clone $REPO $CLONE_DIR - fi + git_retry $GIT_COMMAND cd $CLONE_DIR if [ -n "$REVISION" ]; then @@ -153,12 +155,7 @@ if [ -d "$CLONE_DIR" ]; then else # Clone a fresh copy - if [ -n "$DEPTH" ]; then - git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH - else - git_retry git clone $REPO $CLONE_DIR - fi - + git_retry $GIT_COMMAND cd $CLONE_DIR if [ -n "$REVISION" ]; then git checkout $REVISION From eeeead804fce44bc68466647f35e90dbe6be09c3 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 5 Jan 2023 10:02:42 +0200 Subject: [PATCH 7/9] WIP --- start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index 16f8421..90d75d2 100644 --- a/start.sh +++ b/start.sh @@ -99,9 +99,9 @@ if [ -n "$SPARE_CHECKOUT" ]; then fi if [ -n "$DEPTH" ]; then - GIT_COMMAND=git clone $REPO $CLONE_DIR --depth=$DEPTH + GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH" else - GIT_COMMAND=git clone $REPO $CLONE_DIR + GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR" fi # Check if the cloned dir already exists from previous builds @@ -145,7 +145,7 @@ if [ -d "$CLONE_DIR" ]; then # Clean folder and clone a fresh copy on current directory cd .. rm -rf $CLONE_DIR - git_retry $GIT_COMMAND + eval $GIT_COMMAND cd $CLONE_DIR if [ -n "$REVISION" ]; then @@ -155,7 +155,7 @@ if [ -d "$CLONE_DIR" ]; then else # Clone a fresh copy - git_retry $GIT_COMMAND + eval $GIT_COMMAND cd $CLONE_DIR if [ -n "$REVISION" ]; then git checkout $REVISION From d075cadcc2a85d37453458a24ef7ea28a002fe26 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Sun, 8 Jan 2023 15:02:13 +0200 Subject: [PATCH 8/9] WIP --- service.yaml | 2 +- start.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/service.yaml b/service.yaml index f147b01..60051f1 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 10.1.15 +version: 10.1.18 diff --git a/start.sh b/start.sh index 90d75d2..3f3d25c 100644 --- a/start.sh +++ b/start.sh @@ -99,8 +99,10 @@ if [ -n "$SPARE_CHECKOUT" ]; then fi if [ -n "$DEPTH" ]; then + echo "Using DEPTH $DEPTH" GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH" else + echo "no DEPTH" GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR" fi From a61f49032ae9a31b3524c1d8913505df8f0f0fc5 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Sun, 8 Jan 2023 15:04:05 +0200 Subject: [PATCH 9/9] WIP --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index a498f0a..8d3f148 100644 --- a/start.sh +++ b/start.sh @@ -135,7 +135,7 @@ if [ -n "$DEPTH" ]; then GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH" else echo "no DEPTH" - GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH" + GIT_COMMAND="git_retry git clone $REPO $CLONE_DIR" fi # Check if the cloned dir already exists from previous builds