lewa/.drone.yml

71 lines
1.5 KiB
YAML
Raw Normal View History

2020-05-06 11:22:27 +00:00
kind: pipeline
2020-05-06 12:07:36 +00:00
name: book
2020-05-06 11:22:27 +00:00
workspace:
base: /lewa
steps:
2020-05-06 11:55:37 +00:00
- name: build book docker image
image: "monacoremo/nix:2020-04-05-05f09348-circleci"
2020-05-06 11:22:27 +00:00
commands:
2020-05-06 11:57:22 +00:00
- mkdir -p ~/.config/nixpkgs
2020-05-06 11:56:50 +00:00
- echo '{ allowUnfree = true; }' > ~/.config/nixpkgs/config.nix
2020-05-06 11:55:37 +00:00
- cd book && nix-build
- cp $(readlink result) /lewa/result/docker.tgz
2020-05-06 11:22:27 +00:00
volumes:
- name: book
2020-05-06 11:55:37 +00:00
path: /lewa/result
- name: push image
2020-05-06 11:22:27 +00:00
image: docker:dind
volumes:
- name: book
2020-05-06 11:55:37 +00:00
path: /lewa/result
2020-05-06 11:22:27 +00:00
- name: dockersock
path: /var/run/docker.sock
commands:
2020-05-06 12:12:29 +00:00
- docker load -i /lewa/result/docker.tgz
2020-05-15 20:27:21 +00:00
- "docker tag within/lewa-book:devel within/lewa-book:$DRONE_COMMIT"
2020-05-15 20:21:36 +00:00
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- docker push within/lewa-book:$DRONE_COMMIT
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
2020-05-06 11:22:27 +00:00
volumes:
- name: book
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock
2020-05-06 13:26:05 +00:00
---
kind: pipeline
name: tools
workspace:
base: /lewa
steps:
- name: rust tests
image: "rust:1"
pull: always
commands:
- cd tools && cargo test
2020-05-17 21:23:39 +00:00
---
kind: pipeline
name: dictionary verification
workspace:
base: /lewa
steps:
- name: build dictionary files
image: "monacoremo/nix:2020-04-05-05f09348-circleci"
pull: always
commands:
- nix-env -if ./nix/dhall.nix
- cd words
- dhall ./dictionary.dhall