.
This commit is contained in:
parent
80f11d1968
commit
75d8d41bd4
|
@ -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 save = import 'node_modules/@sigyl/jsonnet-drone/save.libsonnet';
|
||||||
local build = import 'node_modules/@sigyl/jsonnet-drone/build.libsonnet';
|
local build = import 'node_modules/@sigyl/jsonnet-drone/build.libsonnet';
|
||||||
local print = import 'node_modules/@sigyl/jsonnet-drone/print.libsonnet';
|
local print = import 'node_modules/@sigyl/jsonnet-drone/print.libsonnet';
|
||||||
|
local droneImages = import 'node_modules/@sigyl/jsonnet-drone/drone-images.libsonnet';
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
registry: '',
|
registry: '',
|
||||||
|
@ -50,7 +51,7 @@ local defs = [
|
||||||
build(config)(
|
build(config)(
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
|
droneImages(config),
|
||||||
deploy(config)(
|
deploy(config)(
|
||||||
[
|
[
|
||||||
'REGISTRY_DOMAIN',
|
'REGISTRY_DOMAIN',
|
||||||
|
|
|
@ -300,6 +300,89 @@ trigger:
|
||||||
target:
|
target:
|
||||||
- build
|
- 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
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
|
Loading…
Reference in New Issue