From 266fcf1f24c7e2d183ab5c849101fc5a29600de9 Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Fri, 23 Oct 2020 08:47:20 +0100 Subject: [PATCH] . --- .drone/build.sh | 2 +- .drone/deploy.sh | 2 +- .drone/login.sh | 1 - .drone/logout.sh | 1 - .drone/pull.sh | 2 +- .drone/push.sh | 2 +- .drone/scripts/initialise-image.sh | 15 --------------- .drone/scripts/initialise-images.sh | 2 -- .drone/scripts/login.sh | 13 ------------- 9 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 .drone/login.sh delete mode 100644 .drone/logout.sh delete mode 100644 .drone/scripts/initialise-image.sh delete mode 100644 .drone/scripts/initialise-images.sh delete mode 100644 .drone/scripts/login.sh diff --git a/.drone/build.sh b/.drone/build.sh index ae99a81..0c2eed5 100644 --- a/.drone/build.sh +++ b/.drone/build.sh @@ -1,3 +1,3 @@ docker build gitea \ --build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ \ - -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/gitea + -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea diff --git a/.drone/deploy.sh b/.drone/deploy.sh index 76c3a7f..11bdc15 100644 --- a/.drone/deploy.sh +++ b/.drone/deploy.sh @@ -1,4 +1,4 @@ -export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ \ +export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \ && docker stack rm gitea \ && echo 'sleeping...zzz' \ && sleep 60 \ diff --git a/.drone/login.sh b/.drone/login.sh deleted file mode 100644 index 7b53806..0000000 --- a/.drone/login.sh +++ /dev/null @@ -1 +0,0 @@ - docker login ${REGISTRY_DOMAIN}:${REGISTRY_PORT} --username client --password "${REGISTRY_PASSWORD}" diff --git a/.drone/logout.sh b/.drone/logout.sh deleted file mode 100644 index fca56b8..0000000 --- a/.drone/logout.sh +++ /dev/null @@ -1 +0,0 @@ - docker logout ${REGISTRY_DOMAIN}:${REGISTRY_PORT} diff --git a/.drone/pull.sh b/.drone/pull.sh index 2ac969f..e52add2 100644 --- a/.drone/pull.sh +++ b/.drone/pull.sh @@ -1 +1 @@ -docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/gitea +docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea diff --git a/.drone/push.sh b/.drone/push.sh index 97cb137..7922e60 100644 --- a/.drone/push.sh +++ b/.drone/push.sh @@ -1 +1 @@ -docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/gitea +docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea diff --git a/.drone/scripts/initialise-image.sh b/.drone/scripts/initialise-image.sh deleted file mode 100644 index 5692e04..0000000 --- a/.drone/scripts/initialise-image.sh +++ /dev/null @@ -1,15 +0,0 @@ -n=0 -while : -do - docker pull $2 \ - && docker tag $2 $1$2 \ - && docker push $1$2 && break # substitute your command here - n=$((n+1)) - if [ $n -ge 10 ]; then - echo "initialise failed" - exit 1 - fi - echo "retrying..$n" - sleep 5 -done - diff --git a/.drone/scripts/initialise-images.sh b/.drone/scripts/initialise-images.sh deleted file mode 100644 index 9e04e6f..0000000 --- a/.drone/scripts/initialise-images.sh +++ /dev/null @@ -1,2 +0,0 @@ -sh $(dirname $0)/login.sh $1 "$2" \ -&& sh $(dirname $0)/initialise-image.sh $1 gitea/gitea:1.12.3-linux-amd64 \ No newline at end of file diff --git a/.drone/scripts/login.sh b/.drone/scripts/login.sh deleted file mode 100644 index cc1af90..0000000 --- a/.drone/scripts/login.sh +++ /dev/null @@ -1,13 +0,0 @@ -n=0 -while : -do - docker login $1 --username client --password "$2" \ - && break # substitute your command here - n=$((n+1)) - if [ $n -ge 10 ]; then - echo "login failed" - exit 1 - fi - echo "retrying login..$n" - sleep 5 -done