Split into two pipelines
This commit is contained in:
parent
45d451f5c9
commit
0697e7bf9a
1 changed files with 32 additions and 11 deletions
43
.drone.yml
43
.drone.yml
|
@ -12,6 +12,12 @@ services:
|
||||||
path: /var/run
|
path: /var/run
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: "build:prepare"
|
||||||
|
commands:
|
||||||
|
# Debug
|
||||||
|
- pwd
|
||||||
|
- mkdir -p _artifacts
|
||||||
|
|
||||||
- name: "build:executable"
|
- name: "build:executable"
|
||||||
image: crystallang/crystal:1.5.0
|
image: crystallang/crystal:1.5.0
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -25,7 +31,7 @@ steps:
|
||||||
# Build
|
# Build
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
- name: "build:docker-image:"
|
- name: "build:docker-image"
|
||||||
image: docker:20.10.16-dind
|
image: docker:20.10.16-dind
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
|
@ -37,19 +43,34 @@ steps:
|
||||||
- make docker-build
|
- make docker-build
|
||||||
- make docker-save > _artifacts/docker-image.tar
|
- make docker-save > _artifacts/docker-image.tar
|
||||||
|
|
||||||
- name: "publish:docker-image"
|
|
||||||
image: docker:20.10.16-dind
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
commands:
|
|
||||||
- apk install make
|
|
||||||
- make docker-load < _artifacts/docker-image.tar
|
|
||||||
- make docker-push
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: cache
|
||||||
temp: {}
|
temp: {}
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
temp: {}
|
temp: {}
|
||||||
#
|
#
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: docker
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "publish:docker-image"
|
||||||
|
image: docker:20.10.16-dind
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
commands:
|
||||||
|
- test -f _artifacts/docker-image.tar
|
||||||
|
- apk install make
|
||||||
|
- make docker-load < _artifacts/docker-image.tar
|
||||||
|
- make docker-push
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue