forked from open-mmlab/mmdetection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
103 lines (91 loc) · 3.87 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
98
99
100
101
102
103
---
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
####################### Jobs below are used to build only #########################################
####################### master branches for all containers #########################################
####################### #########################################
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
# This pipeline would be used after each merge request to build mmdetection:latest docker image
kind: pipeline
type: docker
name: mmdetecion LS_mmdet_latest
platform:
arch: amd64
os: linux
trigger:
branch:
- master
event:
- push
clone:
depth: 1
steps:
- name: Build latest mmdetecion LS_mmdet_latest docker image
image: plugins/docker:20.14
environment:
DOCKER_BUILDKIT: 1
settings:
dockerfile: docker/Dockerfile
context: docker/
registry: quay.io
repo: quay.io/logivations/ml_all
privileged: true
build_args:
- BUILDKIT_INLINE_CACHE=1
no_cache: true
tags:
- LS_mmdet_latest
- LS_mmdet_latest_${DRONE_COMMIT_SHA}
username:
from_secret: DOCKER_QUAY_USERNAME
password:
from_secret: DOCKER_QUAY_PASSWORD
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
####################### Jobs below are used to run #########################################
####################### pull request validation only #########################################
####################### #########################################
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
# 2. Build docker image for mmdetection
---
kind: pipeline
type: docker
name: PR validation build mmdetecion images
platform:
arch: amd64
os: linux
trigger:
event:
include:
- pull_request
clone:
depth: 50
steps:
- name: Build LS_mmdet docker image for pull request
image: plugins/docker:20.14
environment:
DOCKER_BUILDKIT: 1
settings:
dockerfile: docker/Dockerfile
context: docker/
registry: quay.io
repo: quay.io/logivations/ml_all
privileged: true
build_args:
- BUILDKIT_INLINE_CACHE=1
cache_from:
- quay.io/logivations/ml_all:LS_mmdet_latest
- quay.io/logivations/ml_all:LS_mmdet_pr${DRONE_PULL_REQUEST}
tags:
- LS_mmdet_pr${DRONE_PULL_REQUEST}
- LS_mmdet_pr${DRONE_PULL_REQUEST}_${DRONE_COMMIT_SHA}
username:
from_secret: DOCKER_QUAY_USERNAME
password:
from_secret: DOCKER_QUAY_PASSWORD