arkisto/.drone.yml
Glenn Y. Rolland f75a672a12
Some checks failed
continuous-integration/drone/push Build is failing
ci: Rename service docker
2022-08-19 15:07:22 +02:00

96 lines
1.7 KiB
YAML

---
kind: pipeline
type: docker
name: "stage:build"
trigger:
event:
- push
- pull_request
services:
- name: service: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 add make
- make docker-load < _artifacts/docker-image.tar
# Build
- make docker-push
---
kind: pipeline
type: docker
name: "stage:deploy"
trigger:
event:
- promote
target:
- production
steps:
- name: "deploy:prepare"
image: busybox
commands:
# Debug
- echo "No op"
#