2022-06-26 23:53:26 +05:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "lint"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: lint
|
2022-06-26 23:56:24 +05:00
|
|
|
image: koalaman/shellcheck-alpine:v0.8.0
|
2022-06-26 23:53:26 +05:00
|
|
|
pull: if-not-exists
|
|
|
|
commands:
|
2022-06-26 23:54:52 +05:00
|
|
|
- /bin/shellcheck mirror.sh
|
2022-06-26 23:53:26 +05:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: "mirror"
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- "lint"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch: ["main"]
|
|
|
|
|
|
|
|
steps:
|
2022-06-27 01:22:17 +05:00
|
|
|
- name: "docker"
|
|
|
|
image: "docker:20.10.17-dind"
|
|
|
|
pull: if-not-exists
|
|
|
|
detach: true
|
2022-06-27 01:26:14 +05:00
|
|
|
privileged: true
|
2022-06-27 01:45:39 +05:00
|
|
|
environment:
|
2022-06-27 01:51:24 +05:00
|
|
|
DOCKER_HOST: tcp://0.0.0.0:2375
|
2022-06-27 01:45:39 +05:00
|
|
|
DOCKER_TLS_CERTDIR: ""
|
2022-06-27 01:22:17 +05:00
|
|
|
commands:
|
2022-06-27 01:51:24 +05:00
|
|
|
- /usr/local/bin/dockerd-entrypoint.sh dockerd
|
2022-06-27 01:22:17 +05:00
|
|
|
|
2022-06-26 23:53:26 +05:00
|
|
|
- name: "mirror"
|
2022-06-27 01:22:17 +05:00
|
|
|
image: "docker:20.10.17-dind"
|
2022-06-26 23:53:26 +05:00
|
|
|
pull: if-not-exists
|
2022-06-27 00:08:44 +05:00
|
|
|
environment:
|
2022-06-27 01:22:17 +05:00
|
|
|
DOCKER_HOST: tcp://docker:2375
|
2022-06-27 00:10:08 +05:00
|
|
|
REGISTRY_USER: drone
|
2022-06-27 00:10:40 +05:00
|
|
|
REGISTRY_PASSWORD:
|
2022-06-27 00:08:44 +05:00
|
|
|
from_secret: drone_secret
|
2022-06-26 23:53:26 +05:00
|
|
|
commands:
|
2022-06-27 00:03:18 +05:00
|
|
|
- apk add --no-cache bash
|
2022-06-27 00:10:08 +05:00
|
|
|
- ./mirror.sh
|