-
Notifications
You must be signed in to change notification settings - Fork 4
/
.drone.yml
38 lines (33 loc) · 816 Bytes
/
.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
kind: pipeline
name: default
steps:
- name: Docker Build And Upload
image: docker
environment:
PASSWORD:
from_secret: docker_hub_password
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker build . -t chrizzo84/azpipeline:${DRONE_BUILD_NUMBER} -t chrizzo84/azpipeline:latest
- docker login -u chrizzo84 -p $PASSWORD
- docker image push chrizzo84/azpipeline:latest
- docker image push chrizzo84/azpipeline:${DRONE_BUILD_NUMBER}
- name: Docker Prune Older 24h
image: docker
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker image list
- docker image prune -a --force --filter "until=24h"
- docker image list
trigger:
branch:
- main
- feature/*
volumes:
- name: dockersock
host:
path: /var/run/docker.sock