builder/.drone.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2021-11-02 11:52:34 +00:00
kind: pipeline
type: docker
name: image building
steps:
- name: build&push
2021-11-02 14:40:21 +00:00
image: docker:20.10.10
2021-11-02 14:28:19 +00:00
environment:
2021-11-02 12:04:55 +00:00
username: robot$library+droneci
2021-11-02 11:52:34 +00:00
password:
from_secret: repo_password
repo: harbor.hq.rosti.cz/library/builder
2021-11-02 14:28:19 +00:00
tag: 35
2021-11-02 14:40:21 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /drone/src/data:/drone/src/data
2021-11-02 14:28:19 +00:00
commands:
2021-11-02 14:29:19 +00:00
- echo "$password" | docker login -u $username --password-stdin harbor.hq.rosti.cz
- docker build -t $repo:$tag .
- docker tag $repo:$tag $repo:latest
- docker push $repo:$tag
- docker push $repo:latest
2021-11-02 14:28:19 +00:00
# - name: build&push
# image: plugins/docker
# settings:
# username: robot$library+droneci
# password:
# from_secret: repo_password
# repo: harbor.hq.rosti.cz/library/builder
# registry: harbor.hq.rosti.cz
# tags:
# - 35
# - latest
2021-11-02 13:58:18 +00:00
# - name: build&push
# image: harbor.hq.rosti.cz/library/builder:35
# environment:
# username: robot$library+droneci
# password:
# from_secret: repo_password
# repo: harbor.hq.rosti.cz/library/builder
# tag: 35
# commands:
# - echo "$password" | podman login -u $username --password-stdin harbor.hq.rosti.cz
# - podman build -t $repo:$tag .
# - podman tag $repo:$tag $repo:latest
# - podman push $repo:$tag
# - podman push $repo:latest