43 lines
941 B
YAML
43 lines
941 B
YAML
kind: pipeline
|
|
name: nix build and push
|
|
|
|
steps:
|
|
- name: docker image
|
|
image: "monacoremo/nix:2020-04-05-05f09348-circleci"
|
|
commands:
|
|
- nix-build docker.nix
|
|
- cp $(readlink result) /result/docker.tgz
|
|
volumes:
|
|
- name: result
|
|
path: /result
|
|
- name: push image
|
|
image: docker:dind
|
|
volumes:
|
|
- name: result
|
|
path: /result
|
|
- name: dockersock
|
|
path: /var/run
|
|
commands:
|
|
- docker load -i /result/docker.tgz
|
|
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
|
- docker push xena/quickserv
|
|
environment:
|
|
DOCKER_USERNAME:
|
|
from_secret: DOCKER_USERNAME
|
|
DOCKER_PASSWORD:
|
|
from_secret: DOCKER_PASSWORD
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
|
|
volumes:
|
|
- name: result
|
|
temp: {}
|
|
- name: dockersock
|
|
temp: {}
|