feat: ci
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-02-16 23:06:19 +03:00
parent 9b80ac1541
commit fc22457470

38
.drone.yml Normal file
View File

@ -0,0 +1,38 @@
---
kind: pipeline
type: docker
name: default
clone:
depth: 0
volumes:
- name: docker.sock
host:
path: /var/run/docker.sock
steps:
- name: release
image: cr.grachevko.ru/docker.io/library/docker:23.0.1-git
volumes:
- name: docker.sock
path: /var/run/docker.sock
commands:
- docker build -t drone/helm:${DRONE_BUILD_NUMBER} --progress=plain .
- echo "$PASSWORD" | docker login -u "$USERNAME" --password-stdin "$REGISTRY"
- echo RELEASE.$$(date +'%Y-%m-%dT%H-%M-%SZ' -d @$$(git --no-pager log -1 --format="%ct")) > .release_tag
- docker tag drone/helm:${DRONE_BUILD_NUMBER} $REGISTRY/drone/helm:$$(cat .release_tag)
- docker push $REGISTRY/drone/helm:$$(cat .release_tag)
- docker tag drone/helm:${DRONE_BUILD_NUMBER} drone/helm:latest
- docker rmi drone/helm:${DRONE_BUILD_NUMBER}
environment:
USERNAME:
from_secret: registry_username
PASSWORD:
from_secret: registry_password
REGISTRY:
from_secret: registry
when:
branch:
- master
- rc