72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
kind: pipeline
|
|
name: book
|
|
workspace:
|
|
base: /lewa
|
|
|
|
steps:
|
|
- name: build book docker image
|
|
image: "monacoremo/nix:2020-04-05-05f09348-circleci"
|
|
commands:
|
|
- mkdir -p ~/.config/nixpkgs
|
|
- echo '{ allowUnfree = true; }' > ~/.config/nixpkgs/config.nix
|
|
- cachix use xe
|
|
- cd book && nix-build
|
|
- cp $(readlink result) /lewa/result/docker.tgz
|
|
volumes:
|
|
- name: book
|
|
path: /lewa/result
|
|
environment:
|
|
USER: root
|
|
- name: push image
|
|
image: docker:dind
|
|
volumes:
|
|
- name: book
|
|
path: /lewa/result
|
|
- name: dockersock
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- docker load -i /lewa/result/docker.tgz
|
|
- "docker tag within/lewa-book:devel within/lewa-book:$DRONE_COMMIT"
|
|
- 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
|
|
|
|
volumes:
|
|
- name: book
|
|
temp: {}
|
|
- name: dockersock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
name: tools
|
|
workspace:
|
|
base: /lewa
|
|
|
|
steps:
|
|
- name: rust tests
|
|
image: "rust:1"
|
|
pull: always
|
|
commands:
|
|
- cd tools && cargo test
|
|
|
|
---
|
|
|
|
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-build ./words
|