arkisto/.drone.yml
Glenn Y. Rolland 8411d10d8d
Some checks reported errors
continuous-integration/drone/push Build is running
continuous-integration/drone Build was killed
ci: Merge pipelines
2022-08-19 14:09:31 +02:00

72 lines
1.4 KiB
YAML

---
kind: pipeline
type: docker
name: "stage:build"
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: crystal_cache
temp: {}
- name: docker_cache
temp: {}
- name: dockersock
temp: {}
steps:
- name: "build:prepare"
image: busybox
commands:
# Debug
- pwd
- mkdir -p _artifacts _cache
- name: "build:executable"
image: crystallang/crystal:1.5.0
volumes:
- name: crystal_cache
path: /drone/src/_cache
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: docker_cache
path: /drone/src/_cache
commands:
# Prepare
- apk add make
- test -f _cache/docker-image.tar && docker load < _cache/docker-image.tar
# Build
- make docker-build
- make docker-save > _artifacts/docker-image.tar
- make docker-save > _cache/docker-image.tar
- name: "publish:docker-image"
image: docker:20.10.16-dind
volumes:
- name: dockersock
path: /var/run
commands:
# Prepare
- test -f _artifacts/docker-image.tar
- apk install make
- make docker-load < _artifacts/docker-image.tar
# Build
- make docker-push