Test Docker build & cleanup
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
e3d86ac26b
commit
7dc8a5a38f
21
.drone.yml
21
.drone.yml
@ -37,12 +37,9 @@ steps:
|
|||||||
|
|
||||||
# Build Containers for each architecture
|
# Build Containers for each architecture
|
||||||
- name: docker-build-image-amd64
|
- name: docker-build-image-amd64
|
||||||
image: thegeeklab/drone-docker-buildx
|
image: plugins/docker # Check Entrypoint volumes:
|
||||||
volumes:
|
|
||||||
- name: docker_socket
|
- name: docker_socket
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
- name: bin
|
|
||||||
path: /binaries
|
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
@ -59,12 +56,26 @@ steps:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- "go-build-bin-amd64"
|
- "go-build-bin-amd64"
|
||||||
|
|
||||||
|
# Run go tests
|
||||||
|
- name: binary-cleanup
|
||||||
|
image: alpine:latest
|
||||||
|
volumes:
|
||||||
|
- name: bin
|
||||||
|
path: /binaries
|
||||||
|
commands:
|
||||||
|
- rm -rf /binaries/*
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- success
|
||||||
|
|
||||||
# Volumes to mount between steps
|
# Volumes to mount between steps
|
||||||
volumes:
|
volumes:
|
||||||
- name: deps
|
- name: deps
|
||||||
temp: {}
|
temp: {}
|
||||||
- name: bin
|
- name: bin
|
||||||
temp: {}
|
host:
|
||||||
|
path: /tmp/bin
|
||||||
- name: docker_socket
|
- name: docker_socket
|
||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
# Copy Binary (Currently Just a file)
|
# Copy Binary (Currently Just a file)
|
||||||
COPY /binaries/app /app
|
COPY /tmp/bin/app /app
|
||||||
|
|
||||||
CMD ["/app"]
|
CMD ["/app"]
|
Loading…
Reference in New Issue
Block a user