-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drone: update drone to always pull in build step (#5)
- always pull the build image - drop dind and use host docker socket - drone fmt --save
- Loading branch information
Showing
1 changed file
with
17 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
... |