Compare commits

..

3 Commits

Author SHA1 Message Date
Giles Bradshaw f7d6a7c16f .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
2020-09-25 09:49:19 +01:00
Giles Bradshaw dc65bfb7c7 .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
2020-09-25 09:32:40 +01:00
Giles Bradshaw d059da156d .
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
2020-09-22 15:32:45 +01:00
17 changed files with 130 additions and 281 deletions

View File

@ -1,3 +1,3 @@
docker build guacamole-postgresql \ docker build guacamole-postgresql \
-t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/guacamole-postgresql \ -t ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/guacamole-postgresql \
--build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ --build-arg REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/

View File

@ -1,5 +1,5 @@
export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \ export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/ \
&& docker stack rm guacamole \ && docker stack rm guacamole \
&& echo 'sleeping...zzz' \ && echo 'sleeping...zzz' \
&& sleep 60 \ && sleep 60 \
&& docker stack deploy -c docker-compose.yml guacamole --with-registry-auth && docker stack deploy -c docker-compose.yml guacamole \

View File

@ -4,54 +4,31 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet'; local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet';
local register = import 'node_modules/@sigyl/jsonnet-drone/register.libsonnet'; local register = import 'node_modules/@sigyl/jsonnet-drone/register.libsonnet';
local registry = import 'node_modules/@sigyl/jsonnet-drone/registry.libsonnet'; local registry = import 'node_modules/@sigyl/jsonnet-drone/registry.libsonnet';
local save = import 'node_modules/@sigyl/jsonnet-drone/save.libsonnet';
local build = import 'node_modules/@sigyl/jsonnet-drone/build.libsonnet';
local print = import 'node_modules/@sigyl/jsonnet-drone/print.libsonnet';
local config = { local config = {
registry: '', registry: '',
root: 'stack',
name: 'guacamole',
}; };
local defs = [
{
load: 'postgres:12.4@sha256:c713cbd0e39ee3450bec6fa44e0f6236879b3dac79adc2d0417582785b8776b2',
save: 'postgres:12.4'
},
{
load: 'guacamole/guacd:1.2.0@sha256:6ba0abac865bd7efd55dd52085ba8eb4f57910e33cea5ae6c4135a84f6a8bcdf',
save: 'guacamole/guacd:1.2.0',
},
{
load: 'guacamole/guacamole:1.2.0@sha256:6eb0b854e8e145df8f9220b92e51d52e9ff18c4262de20d56ccc62a4dad835b9',
save: 'guacamole/guacamole:1.2.0',
},
];
[ [
register, register,
registry( registry(
config { config {
// script: 'sh .drone/scripts/initialise-images.sh', script: 'sh .drone/scripts/initialise-images.sh',
secrets: [], secrets: [],
images: defs,
}, },
), ) {
save(config)( trigger +: {
defs, event +: [
[ 'promote',
'guacamole-postgresql', ],
], target +: [
), 'registry',
print(config)( ],
[], },
publicSecrets, },
secretSecrets,
),
build(config)(
[],
),
deploy(config)( deploy(config)(
'guacamole',
'/stack/',
[], [],
publicSecrets, publicSecrets,
secretSecrets, secretSecrets,
@ -60,5 +37,14 @@ local defs = [
'REGISTRY_PORT', 'REGISTRY_PORT',
'REGISTRY_PASSWORD', 'REGISTRY_PASSWORD',
], ],
), ) {
trigger +: {
event +: [
'promote',
],
target +: [
'production',
],
},
},
] ]

View File

@ -24,36 +24,13 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
clone:
disable: true
steps: steps:
- name: postgres:12.4 - name: "dockerpull and save docker images:"
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
commands: commands:
- set -e - set -e
- "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" - export REGISTRY=$${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/
- "n=0\nwhile :\ndo\n docker pull postgres:12.4@sha256:c713cbd0e39ee3450bec6fa44e0f6236879b3dac79adc2d0417582785b8776b2 \\\\\n && docker tag postgres:12.4@sha256:c713cbd0e39ee3450bec6fa44e0f6236879b3dac79adc2d0417582785b8776b2 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4 && break\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"initialise failed\"\n exit 1\n fi\n echo \"retrying..$n\"\n sleep 5\ndone\n" - sh .drone/scripts/initialise-images.sh $${REGISTRY} $${REGISTRY_PASSWORD}
volumes:
- name: dockersock
path: /var/run
- name: guacamole/guacd:1.2.0
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
commands:
- set -e
- "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"
- "n=0\nwhile :\ndo\n docker pull guacamole/guacd:1.2.0@sha256:6ba0abac865bd7efd55dd52085ba8eb4f57910e33cea5ae6c4135a84f6a8bcdf \\\\\n && docker tag guacamole/guacd:1.2.0@sha256:6ba0abac865bd7efd55dd52085ba8eb4f57910e33cea5ae6c4135a84f6a8bcdf $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0 && break\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"initialise failed\"\n exit 1\n fi\n echo \"retrying..$n\"\n sleep 5\ndone\n"
volumes:
- name: dockersock
path: /var/run
- name: guacamole/guacamole:1.2.0
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
commands:
- set -e
- "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"
- "n=0\nwhile :\ndo\n docker pull guacamole/guacamole:1.2.0@sha256:6eb0b854e8e145df8f9220b92e51d52e9ff18c4262de20d56ccc62a4dad835b9 \\\\\n && docker tag guacamole/guacamole:1.2.0@sha256:6eb0b854e8e145df8f9220b92e51d52e9ff18c4262de20d56ccc62a4dad835b9 $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0 \\\\\n && docker push $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0 && break\n n=$((n+1))\n if [ $n -ge 10 ]; then\n echo \"initialise failed\"\n exit 1\n fi\n echo \"retrying..$n\"\n sleep 5\ndone\n"
volumes: volumes:
- name: dockersock - name: dockersock
path: /var/run path: /var/run
@ -67,8 +44,6 @@ services:
path: /var/run path: /var/run
- name: ca - name: ca
path: /etc/docker/certs.d path: /etc/docker/certs.d
- name: daemonjson
path: /etc/docker/daemon.json
volumes: volumes:
- name: dockersock - name: dockersock
@ -76,9 +51,6 @@ volumes:
- name: ca - name: ca
host: host:
path: /etc/docker/certs.d path: /etc/docker/certs.d
- name: daemonjson
host:
path: /etc/docker/daemon.json
image_pull_secrets: image_pull_secrets:
- dockerconfigjson - dockerconfigjson
@ -92,120 +64,7 @@ trigger:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: save name: deploy
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: mkdir
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
script:
- mkdir -p /stack/.images/guacamole/built
- rm -f /stack/.images/guacamole/*.*
- rm -f /stack/.images/guacamole/built/*.*
- name: postgres:12.4
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4 -o /stack/.images/guacamole/postgres:12.4.tar
- echo "docker load < postgres:12.4.tar" >> /stack/.images/guacamole/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/postgres:12.4 $${DESTINATION_REGISTRY}/stack/guacamole/postgres:12.4" >> /stack/.images/guacamole/load.sh
- name: guacamole/guacd:1.2.0
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0 -o /stack/.images/guacamole/guacamole_guacd:1.2.0.tar
- echo "docker load < guacamole_guacd:1.2.0.tar" >> /stack/.images/guacamole/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacd:1.2.0 $${DESTINATION_REGISTRY}/stack/guacamole/guacamole/guacd:1.2.0" >> /stack/.images/guacamole/load.sh
- name: guacamole/guacamole:1.2.0
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0 -o /stack/.images/guacamole/guacamole_guacamole:1.2.0.tar
- echo "docker load < guacamole_guacamole:1.2.0.tar" >> /stack/.images/guacamole/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole/guacamole:1.2.0 $${DESTINATION_REGISTRY}/stack/guacamole/guacamole/guacamole:1.2.0" >> /stack/.images/guacamole/load.sh
- name: guacamole-postgresql
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- registry_domain
- registry_port
- registry_password
- destination_registry
script:
- "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"
- docker pull $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole-postgresql
- docker save $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole-postgresql -o /stack/.images/guacamole/built/guacamole-postgresql.tar
- echo "docker load guacamole-postgresql.tar" >> /stack/.images/guacamole/built/load.sh
- echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/stack/guacamole/guacamole-postgresql ${DESINATION_REGISTRY}/stack/guacamole/guacamole-postgresql" >> /stack/.images/guacamole/built/load.sh
trigger:
event:
- promote
target:
- save
---
kind: pipeline
type: docker
name: print
platform: platform:
os: linux os: linux
@ -221,81 +80,22 @@ steps:
- drone_build_number - drone_build_number
- drone_repo_name - drone_repo_name
- drone_repo_namespace - drone_repo_namespace
- postgres_db
- postgres_user
- postgres_password - postgres_password
script: script:
- rm -f env-guacamole - rm -f env-guacamole
- "echo \"export POSTGRES_DB='$${POSTGRES_DB}'\" >> env-guacamole # \"postgres-db\""
- "echo \"export POSTGRES_USER='$${POSTGRES_USER}'\" >> env-guacamole # \"postgres-user\""
- "echo \"export POSTGRES_PASSWORD='$${POSTGRES_PASSWORD}'\" >> env-guacamole # \"postgres-password\"" - "echo \"export POSTGRES_PASSWORD='$${POSTGRES_PASSWORD}'\" >> env-guacamole # \"postgres-password\""
environment: environment:
POSTGRES_DB:
from_secret: postgres-db
POSTGRES_PASSWORD: POSTGRES_PASSWORD:
from_secret: postgres-password from_secret: postgres-password
POSTGRES_USER:
from_secret: postgres-user
trigger:
event:
- promote
target:
- print
---
kind: pipeline
type: docker
name: build
platform:
os: linux
arch: amd64
steps:
- name: "dockerbuild:"
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
commands:
- set -e
- export NAME=guacamole
- 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
volumes:
- name: dockersock
path: /var/run
services:
- name: docker
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: ca
path: /etc/docker/certs.d
- name: daemonjson
path: /etc/docker/daemon.json
volumes:
- name: dockersock
temp: {}
- name: ca
host:
path: /etc/docker/certs.d
- name: daemonjson
host:
path: /etc/docker/daemon.json
trigger:
event:
- promote
target:
- build
---
kind: pipeline
type: docker
name: deploy
platform:
os: linux
arch: amd64
steps:
- name: scp - name: scp
image: appleboy/drone-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47 image: appleboy/drone-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47
settings: settings:
@ -304,6 +104,23 @@ steps:
- . - .
target: /stack/guacamole target: /stack/guacamole
- name: wait
image: alpine:3.12.0@sha256:90baa0922fe90624b05cb5766fa5da4e337921656c2f8e2b13bd3c052a0baac1
commands:
- sleep 15
- name: "dockerbuild:"
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
commands:
- set -e
- sh .drone/login.sh
- sh .drone/build.sh
- sh .drone/push.sh
- sh .drone/logout.sh
volumes:
- name: dockersock
path: /var/run
- name: deploy - name: deploy
image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea image: appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea
settings: settings:
@ -316,27 +133,50 @@ steps:
- registry_domain - registry_domain
- registry_port - registry_port
- registry_password - registry_password
- postgres_db
- postgres_user
- postgres_password - postgres_password
script: script:
- export POSTGRES_PASSWORD=$${POSTGRES_PASSWORD} - export POSTGRES_PASSWORD=$${POSTGRES_PASSWORD}
- export POSTGRES_DB=$${POSTGRES_DB}
- export POSTGRES_USER=$${POSTGRES_USER}
- export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN} - export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN}
- export REGISTRY_PORT=$${REGISTRY_PORT} - export REGISTRY_PORT=$${REGISTRY_PORT}
- export REGISTRY_PASSWORD=$${REGISTRY_PASSWORD} - export REGISTRY_PASSWORD=$${REGISTRY_PASSWORD}
- set -e - set -e
- export NAME=guacamole
- export ROOT=stack
- cd /stack/guacamole - cd /stack/guacamole
- "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/login.sh
- sh .drone/pull.sh - sh .drone/pull.sh
- sh .drone/deploy.sh - sh .drone/deploy.sh
environment: environment:
POSTGRES_DB:
from_secret: postgres-db
POSTGRES_PASSWORD: POSTGRES_PASSWORD:
from_secret: postgres-password from_secret: postgres-password
POSTGRES_USER:
from_secret: postgres-user
services:
- name: docker
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: ca
path: /etc/docker/certs.d
volumes:
- name: dockersock
temp: {}
- name: ca
host:
path: /etc/docker/certs.d
trigger: trigger:
event: event:
- promote - promote
target: target:
- deploy - production
... ...

View File

@ -1 +1,4 @@
[] [
'postgres-db',
'postgres-user',
]

1
.drone/login.sh Normal file
View File

@ -0,0 +1 @@
docker login ${REGISTRY_DOMAIN}:${REGISTRY_PORT} --username client --password "${REGISTRY_PASSWORD}"

1
.drone/logout.sh Normal file
View File

@ -0,0 +1 @@
docker logout ${REGISTRY_DOMAIN}:${REGISTRY_PORT}

View File

@ -4,6 +4,6 @@
"build": "drone jsonnet --source drone-home.jsonnet --target drone-home.yml --stream" "build": "drone jsonnet --source drone-home.jsonnet --target drone-home.yml --stream"
}, },
"dependencies": { "dependencies": {
"@sigyl/jsonnet-drone": "^1.0.0" "@sigyl/jsonnet-drone": "^0.3.1"
} }
} }

View File

@ -1 +1 @@
docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/guacamole-postgresql docker pull ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/guacamole-postgresql

View File

@ -1 +1 @@
docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/guacamole-postgresql docker push ${REGISTRY_DOMAIN}:${REGISTRY_PORT}/guacamole-postgresql

View File

@ -0,0 +1,15 @@
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

View File

@ -0,0 +1,4 @@
sh $(dirname $0)/login.sh $1 "$2" \
&& sh $(dirname $0)/initialise-image.sh $1 postgres:12.4 \
&& sh $(dirname $0)/initialise-image.sh $1 guacamole/guacd:1.2.0 \
&& sh $(dirname $0)/initialise-image.sh $1 guacamole/guacamole:1.2.0

13
.drone/scripts/login.sh Normal file
View File

@ -0,0 +1,13 @@
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

View File

@ -12,10 +12,10 @@
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff" resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff"
integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw== integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw==
"@sigyl/jsonnet-drone@^1.0.0": "@sigyl/jsonnet-drone@^0.3.1":
version "1.0.0" version "0.3.1"
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-1.0.0.tgz#943bd8a1abc8a916026944816709f5ed1d8e7ef8" resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.3.1.tgz#790a83f45556cc613f07fbc98ca760027fa936e7"
integrity sha512-ubyVC1/nAM584wTnnRBZTOP18z28Yy7SRApvSuo/3y2arngKlNI1FwOzKTFt/7L9+rNy19dRO/g0obEkyR3KmA== integrity sha512-FiSyunjR0Udc20I2gA6gkzX3sCB2dPq/ZODrXcm7ROQFKF2Wr4b+xhpovjEdnjKGy8G4d+rRcdN+Jyhp7WQLEg==
dependencies: dependencies:
"@sigyl/jsonnet-compose" "^0.0.2" "@sigyl/jsonnet-compose" "^0.0.2"
"@sigyl/jsonnet-drone-environment" "0.0.5" "@sigyl/jsonnet-drone-environment" "0.0.5"

View File

@ -2,20 +2,6 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.0.6](https://sigyl.com///compare/v0.0.5...v0.0.6) "chore(release): 0.0.6" (2020-10-23)
### Features
* print, build, save, registry, deploy ([50a035e](https://sigyl.com///commit/50a035eff200829d5cab9a79f4720bfebe21cf1e))
### [0.0.5](https://sigyl.com///compare/v0.0.3...v0.0.5) "chore(release): 0.0.5" (2020-09-25)
### Features
* registry promotion ([3b16cde](https://sigyl.com///commit/3b16cdebe5a7212bc5823927f5bfb8cf8b7a567f))
### [0.0.4](https://sigyl.com///compare/v0.0.3...v0.0.4) "chore(release): 0.0.4" (2020-08-19) ### [0.0.4](https://sigyl.com///compare/v0.0.3...v0.0.4) "chore(release): 0.0.4" (2020-08-19)

View File

@ -40,7 +40,7 @@ services:
environment: environment:
- POSTGRES_HOSTNAME=guacamole-postgresql - POSTGRES_HOSTNAME=guacamole-postgresql
- POSTGRES_PORT=5432 - POSTGRES_PORT=5432
- POSTGRES_USER=guacamole_user - POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DATABASE=guacamole_db - POSTGRES_DATABASE=guacamole_db
- GUACD_HOSTNAME=guacd - GUACD_HOSTNAME=guacd

View File

@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "guacamole", "name": "guacamole",
"version": "0.0.6", "version": "0.0.4",
"description": "remote access", "description": "remote access",
"scripts": { "scripts": {
"release": "standard-version", "release": "standard-version",