Skip to content

Commit

Permalink
drone: update drone to always pull in build step (#5)
Browse files Browse the repository at this point in the history
- always pull the build image
- drop dind and use host docker socket
- drone fmt --save
  • Loading branch information
dweomer authored Sep 24, 2020
1 parent fe6f5e9 commit 4acf4dd
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
---
kind: pipeline
name: linux-amd64

platform:
os: linux
arch: amd64

steps:
- name: build
pull: always
image: rancher/hardened-build-base:v1.13.15b4
volumes:
- name: dockersock
path: /var/run
commands:
- sleep 20
- make DRONE_TAG=${DRONE_TAG}
volumes:
- name: docker
path: /var/run/docker.sock

- name: publish
image: rancher/hardened-build-base:v1.13.15b4
volumes:
- name: dockersock
path: /var/run
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- make DRONE_TAG=${DRONE_TAG} image-push image-manifest
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag

- name: scan
image: rancher/hardened-build-base:v1.13.15b4
volumes:
- name: dockersock
path: /var/run
commands:
- make DRONE_TAG=${DRONE_TAG} image-scan

services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: docker
path: /var/run/docker.sock

volumes:
- name: dockersock
temp: {}
- name: docker
host:
path: /var/run/docker.sock

...

0 comments on commit 4acf4dd

Please sign in to comment.