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 - cd book && nix-build - cp $(readlink result) /lewa/result/docker.tgz volumes: - name: book path: /lewa/result - 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 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