arkisto/.drone.yml

80 lines
1.4 KiB
YAML
Raw Normal View History

2022-08-18 19:47:02 +00:00
---
kind: pipeline
type: docker
2022-08-19 09:15:39 +00:00
name: "stage:build"
2022-08-18 19:47:02 +00:00
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
steps:
2022-08-19 09:14:48 +00:00
- name: "build:prepare"
commands:
# Debug
- pwd
- mkdir -p _artifacts
2022-08-18 19:47:02 +00:00
- name: "build:executable"
image: crystallang/crystal:1.5.0
volumes:
- name: cache
path: /stupid
commands:
# Debug
- pwd
- crystal version
- shards version
# Build
- make build
2022-08-19 09:14:48 +00:00
- name: "build:docker-image"
2022-08-18 19:47:02 +00:00
image: docker:20.10.16-dind
volumes:
- name: dockersock
path: /var/run
- name: cache
path: /stupid
commands:
- apk add make
2022-08-18 19:47:02 +00:00
- make docker-build
- make docker-save > _artifacts/docker-image.tar
2022-08-19 09:14:48 +00:00
volumes:
- name: cache
temp: {}
- name: dockersock
temp: {}
#
---
kind: pipeline
type: docker
2022-08-19 09:15:39 +00:00
name: "stage:publish"
2022-08-19 09:14:48 +00:00
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
steps:
2022-08-18 19:47:02 +00:00
- name: "publish:docker-image"
image: docker:20.10.16-dind
volumes:
- name: dockersock
path: /var/run
commands:
2022-08-19 09:14:48 +00:00
- test -f _artifacts/docker-image.tar
2022-08-18 19:47:02 +00:00
- apk install make
- make docker-load < _artifacts/docker-image.tar
- make docker-push
2022-08-19 09:16:53 +00:00
volumes:
- name: dockersock
temp: {}