From 75d8d41bd4afe87df6b2baed1a78189a27a94fbb Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Fri, 23 Oct 2020 17:58:06 +0100 Subject: [PATCH] . --- .drone/drone-home.jsonnet | 3 +- .drone/drone-home.yml | 83 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index 04393ac..530562c 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -8,6 +8,7 @@ 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 droneImages = import 'node_modules/@sigyl/jsonnet-drone/drone-images.libsonnet'; local config = { registry: '', @@ -50,7 +51,7 @@ local defs = [ build(config)( [], ), - + droneImages(config), deploy(config)( [ 'REGISTRY_DOMAIN', diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index a88a326..dbb9018 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -300,6 +300,89 @@ trigger: target: - build +--- +kind: pipeline +type: docker +name: drone-images + +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/drone/drone-images + - rm -f /stack/.images/drone/drone-images/*.* + +- name: docker + 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 + script: + - docker pull appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea + - docker save appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea -o /stack/.images/drone/drone-images/docker.tar + - echo "docker load docker.tar" >> /stack/.images/drone/drone-images/load.sh + +- name: scp + 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 + script: + - docker pull appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea + - docker save appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea -o /stack/.images/drone/drone-images/scp.tar + - echo "docker load scp.tar" >> /stack/.images/drone/drone-images/load.sh + +- name: ssh + 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 + script: + - docker pull appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea + - docker save appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea -o /stack/.images/drone/drone-images/ssh.tar + - echo "docker load ssh.tar" >> /stack/.images/drone/drone-images/load.sh + +trigger: + event: + - promote + target: + - drone-images + --- kind: pipeline type: docker