From fd0e320d46dfa2e1ed82884afb3f85a843f45a8c Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Fri, 7 Oct 2022 12:38:50 +0200 Subject: [PATCH] [DRONE] Rewrite build and publish CI --- .drone.yml | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5156f3e..bd6e0ce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,31 +6,18 @@ type: 'kubernetes' steps: # build and publish -- image: 'plugins/docker' +- image: 'docker.io/library/docker:dind' name: 'publish' pull: 'always' privileged: true - - settings: - - # registery and repos - registry: 'docker.io' - cache_from: 'rakepanorama/ansible-deployment' - repo: 'rakepanorama/ansible-deployment' - - build_args: '--network host' - - # build stuff - dockerfile: 'Dockerfile.linux.amd64' - daemon_off: 'false' - - # authentication - username: + environment: + DOCKER_USERNAME: from_secret: 'docker_username' - password: + DOCKER_PASSWORD: from_secret: 'docker_password' - # tags - tags: - - 'v0.9' - - 'latest' + commands: + - 'sleep 1' + - 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD' + - 'docker build --network host -t rakepanorama/ansible-deployment-container:v0.9 -t rakepanorama/ansible-deployment-container:latest .' + - 'docker push -a rakepanorama/ansible-deployment-container'