versioned build
This commit is contained in:
parent
87ed972d98
commit
cd12ee1ace
|
@ -2,4 +2,4 @@ sleep 10
|
|||
|
||||
docker build gitea \
|
||||
--build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \
|
||||
-t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea
|
||||
-t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea:$1
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \
|
||||
&& export TAG=$1 \
|
||||
&& docker stack rm gitea \
|
||||
&& echo 'sleeping...zzz' \
|
||||
&& sleep 60 \
|
||||
|
|
|
@ -228,8 +228,8 @@ steps:
|
|||
- export NAME=gitea
|
||||
- export ROOT=stack
|
||||
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
|
||||
- sh .drone/build.sh
|
||||
- sh .drone/push.sh
|
||||
- sh .drone/build.sh $${DRONE_COMMIT_SHA}
|
||||
- sh .drone/push.sh $${DRONE_COMMIT_SHA}
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
@ -330,8 +330,8 @@ steps:
|
|||
- export ROOT=stack
|
||||
- cd /stack/gitea
|
||||
- "n=0\nwhile :\ndo\n docker login $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/ --username client --password \"$${REGISTRY_PASSWORD}\" \\\\\n && break # substitute your command here\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"login failed\"\n exit 1\n fi\n echo \"retrying login..$n\"\n sleep 5\ndone\n"
|
||||
- sh .drone/pull.sh
|
||||
- sh .drone/deploy.sh
|
||||
- sh .drone/pull.sh $${DRONE_COMMIT_SHA}
|
||||
- sh .drone/deploy.sh $${DRONE_COMMIT_SHA}
|
||||
environment:
|
||||
GITEA_APP_NAME:
|
||||
from_secret: gitea-app-name
|
||||
|
|
|
@ -1 +1 @@
|
|||
docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea
|
||||
docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea:$1
|
||||
|
|
|
@ -1 +1 @@
|
|||
docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea
|
||||
docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/gitea:$1
|
||||
|
|
|
@ -7,7 +7,7 @@ services:
|
|||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
image: ${LOCAL_DOCKER_REGISTRY}gitea
|
||||
image: ${LOCAL_DOCKER_REGISTRY}gitea:${TAG}
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
|
|
Loading…
Reference in New Issue