2023-06-10 16:29:48 +02:00
|
|
|
kind: pipeline
|
2023-06-10 16:39:30 +02:00
|
|
|
type: docker
|
2023-06-10 16:29:48 +02:00
|
|
|
name: bin
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
2023-06-10 18:13:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
2023-06-10 16:29:48 +02:00
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: rust:slim
|
|
|
|
commands:
|
|
|
|
- cargo build --release
|
2023-06-10 17:34:17 +02:00
|
|
|
|
2023-06-10 16:29:48 +02:00
|
|
|
- name: pack
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
2023-06-10 17:34:17 +02:00
|
|
|
image: docker:latest
|
2023-06-10 18:13:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: "/var/run/docker.sock"
|
2023-06-10 17:34:17 +02:00
|
|
|
environment:
|
|
|
|
REGISTRY: git2.zettoit.eu/zettoit/bin
|
|
|
|
REGISTRY_USER: droneci
|
|
|
|
REGISTRY_PASSWD:
|
2023-06-10 17:15:46 +02:00
|
|
|
from_secret: REGISTRY_PASSWD
|
2023-06-10 17:34:17 +02:00
|
|
|
commands:
|
|
|
|
- docker login -u $REGISTRY_USER -p $REGISTRY_PASSWD $REGISTRY
|
|
|
|
- docker build -t $REGISTRY:latest . -f Dockerfile
|
|
|
|
- docker push $REGISTRY:latest
|