diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index bcafcff..b1503b0 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -4,9 +4,13 @@ local publicSecrets = import 'lib/public-secrets.libsonnet'; local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet'; local register = import 'node_modules/@sigyl/jsonnet-drone/register.libsonnet'; + +local config = { + registry: '', +}; [ register, - deploy( + deploy(config)( 'drone', '/stack/', [ diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 1d6b56b..3723e64 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -99,7 +99,7 @@ steps: target: /stack/drone - name: wait - image: alpine:3.12.0@sha256:90baa0922fe90624b05cb5766fa5da4e337921656c2f8e2b13bd3c052a0baac1 + image: "%(registry)salpine:3.12.0@sha256:90baa0922fe90624b05cb5766fa5da4e337921656c2f8e2b13bd3c052a0baac1" commands: - sleep 15 diff --git a/.drone/lib/initialise-image.sh b/.drone/lib/initialise-image.sh new file mode 100644 index 0000000..97498b9 --- /dev/null +++ b/.drone/lib/initialise-image.sh @@ -0,0 +1,3 @@ +docker pull $2 \ +&& docker tag $2 $1$2 \ +&& docker push $1$2 \ No newline at end of file diff --git a/.drone/lib/initialise-images.sh b/.drone/lib/initialise-images.sh new file mode 100644 index 0000000..85d44be --- /dev/null +++ b/.drone/lib/initialise-images.sh @@ -0,0 +1,2 @@ +sh $(dirname $0)/initialise-image.sh $1 drone/drone:1.9.0 \ +&& sh $(dirname $0)/initialise-image.sh $1 drone-runner-docker:1.5.0 \ No newline at end of file diff --git a/.drone/package.json b/.drone/package.json index 33bc5f1..54f4792 100644 --- a/.drone/package.json +++ b/.drone/package.json @@ -4,6 +4,6 @@ "build": "drone jsonnet --source drone-home.jsonnet --target drone-home.yml --stream" }, "dependencies": { - "@sigyl/jsonnet-drone": "^0.1.1" + "@sigyl/jsonnet-drone": "^0.2.0" } } diff --git a/docker-compose.yml b/docker-compose.yml index 8856834..3cb708e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: replicas: 1 restart_policy: condition: any - image: drone/drone:1.9.0 + image: ${LOCAL_DOCKER_REGISTRY}drone/drone:1.9.0 volumes: - drone:/var/lib/drone - drone-data:/data @@ -37,7 +37,7 @@ services: replicas: 1 restart_policy: condition: any - image: drone/drone-runner-docker:1.5.0 + image: ${LOCAL_DOCKER_REGISTRY}drone/drone-runner-docker:1.5.0 volumes: - /var/run/docker.sock:/var/run/docker.sock environment: