Add Drone CI configuration
This commit is contained in:
parent
25883a5362
commit
2b3e225981
30
.drone.yml
Normal file
30
.drone.yml
Normal file
@ -0,0 +1,30 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
steps:
|
||||
- name: container-build
|
||||
image: 'docker:dind'
|
||||
environment:
|
||||
USERNAME:
|
||||
from_secret: docker_username
|
||||
PASSWORD:
|
||||
from_secret: docker_password
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- >-
|
||||
if [ "${DRONE_BRANCH}" = "main" ]; then export
|
||||
BUILD_TAG="latest"; else export BUILD_TAG="${DRONE_BRANCH}"; fi;
|
||||
- docker login -u $USERNAME -p $PASSWORD git.argideli.com
|
||||
- >-
|
||||
docker build -t
|
||||
git.argideli.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}:$BUILD_TAG
|
||||
.
|
||||
- >-
|
||||
docker push
|
||||
git.argideli.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}:$BUILD_TAG
|
||||
volumes:
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
Loading…
x
Reference in New Issue
Block a user