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 12:08:48 +00:00
|
|
|
- USER=root cachix use xe
|
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-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
|