Using kanino to build and push

This commit is contained in:
2026-03-08 11:51:46 +02:00
parent 1cb55e2eb9
commit 95faa86e6b

View File

@@ -29,16 +29,11 @@ steps:
commands: commands:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin - echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- name: docker build and push - name: build and push
image: docker:20.10 image: gcr.io/kaniko-project/executor:latest
privileged: true
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands: commands:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin - /kaniko/executor
- docker build -t khwezi/webapitest:latest -t khwezi/webapitest:${DRONE_BUILD_NUMBER} . --context=.
- docker push khwezi/webapitest:latest --dockerfile=Dockerfile
- docker push khwezi/webapitest:${DRONE_BUILD_NUMBER} --destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}
--destination=index.docker.io/khwezi/webapitest:latest