From 6287a40649bd7e70b659cbff12f79bc3348feddc Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Fri, 7 Oct 2022 14:01:55 +0200 Subject: [PATCH] [DRONE] Rewrite build and publish CI --- .drone.yml | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.drone.yml b/.drone.yml index 32ca62a..2db6a3e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,30 +6,22 @@ type: 'kubernetes' steps: # build and publish -- image: 'plugins/docker' - name: 'publish' +- name: 'publish' + image: 'docker.io/library/docker' pull: 'always' - settings: - # registery and repos - registry: 'docker.io' - cache_from: 'rakepanorama/ansible-deployment' - repo: 'rakepanorama/ansible-deployment' - custom_dns: '8.8.8.8' - build_args: '--network host' - debug: true - - # build stuff - dockerfile: 'Dockerfile.linux.amd64' - daemon_off: 'false' - - # authentication - username: + environment: + IMG: 'rakepanorama/ansible-deployment-container' + DOCKER_USER: from_secret: 'docker_username' - password: + DOCKER_PASS: from_secret: 'docker_password' - # tags - tags: - - 'v0.9' - - 'latest' + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + + commands: + - 'echo building image ${IMG}' + - 'docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} docker.io' + - 'docker build -t ${IMG}:v0.9 -t ${IMG}:latest -f Dockerfile.linux.amd64 .' + - 'docker push -a'