arkisto/.drone.yml
Glenn Y. Rolland d0dc43dd3b
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Split into two pipelines
2022-08-19 11:15:39 +02:00

76 lines
1.3 KiB
YAML

---
kind: pipeline
type: docker
name: "stage:build"
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
steps:
- name: "build:prepare"
commands:
# Debug
- pwd
- mkdir -p _artifacts
- name: "build:executable"
image: crystallang/crystal:1.5.0
volumes:
- name: cache
path: /stupid
commands:
# Debug
- pwd
- crystal version
- shards version
# Build
- make build
- name: "build:docker-image"
image: docker:20.10.16-dind
volumes:
- name: dockersock
path: /var/run
- name: cache
path: /stupid
commands:
- apk add make
- make docker-build
- make docker-save > _artifacts/docker-image.tar
volumes:
- name: cache
temp: {}
- name: dockersock
temp: {}
#
---
kind: pipeline
type: docker
name: "stage:publish"
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