-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
97 lines (88 loc) · 2.49 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
kind: pipeline
type: kubernetes
name: transmission custom
platform:
os: linux
arch: amd64
node:
type: kubernetes-amd64
services:
- name: docker service
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run/
steps:
- name: wait for docker service
image: docker:dind
volumes:
- name: dockersock
path: /var/run/
commands:
- while true; do docker info > /dev/null 2>&1 && echo "Docker server up" && break || (echo "Docker server down. Retrying..." && sleep 1); done
# - name: build dev image
# image: docker:dind
# environment:
# REGISTRY_USER:
# from_secret: registry_user
# REGISTRY_PASSWORD:
# from_secret: registry_password
# volumes:
# - name: dockersock
# path: /var/run/
# commands:
# - docker login -u $REGISTRY_USER -p $REGISTRY_PASSWORD registry.adamkoro.com
# - docker buildx create --use --name mybuilder
# - docker buildx build --platform linux/amd64 -t registry.adamkoro.com/docker-volume-backup/${DRONE_BRANCH}/docker-volume-backup:${DRONE_COMMIT_SHA:0:7} -t registry.adamkoro.com/docker-volume-backup/${DRONE_BRANCH}/docker-volume-backup:latest . --push -f Dockerfile
# when:
# branch:
# exclude:
# - "main"
- name: prod image build
image: docker:dind
environment:
REGISTRY_USER:
from_secret: HARBOR_HOME_USERNAME
REGISTRY_PASSWORD:
from_secret: HARBOR_HOME_PASSWORD
volumes:
- name: dockersock
path: /var/run/
commands:
- "docker login -u $REGISTRY_USER -p $REGISTRY_PASSWORD harbor.adamkoro.com"
- "docker buildx create --use --name mybuilder"
- "docker buildx build --platform linux/amd64 -t harbor.adamkoro.com/transmission/transmission-custom:combustion-latest -t harbor.adamkoro.com/transmission/transmission-custom:combustion-${DRONE_TAG} . --push -f Dockerfile.combustion --build-arg TRANSMISSION_VERSION=$(cat ./VERSION)"
when:
branch:
include:
- "main"
event:
- tag
- push
- name: combustion release
image: plugins/github-release
pull: always
settings:
api_key:
from_secret: github_token
files:
- Dockerfile.combustion
title: VERSION
checksum:
- sha512
note: CHANGELOG.md
overwrite: true
when:
branch:
include:
- "main"
event:
- tag
trigger:
event:
- push
- tag
volumes:
- name: dockersock
temp: {}