feat: drone-images
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

This commit is contained in:
Giles Bradshaw 2020-10-23 20:22:53 +01:00
parent 80f11d1968
commit e369cbb235
3 changed files with 86 additions and 2 deletions

View File

@ -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',

View File

@ -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 docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
- docker save docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f -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-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47
- docker save appleboy/drone-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47 -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

View File

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