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:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- name: docker build and push
image: docker:20.10
privileged: true
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
- name: build and push
image: gcr.io/kaniko-project/executor:latest
commands:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- docker build -t khwezi/webapitest:latest -t khwezi/webapitest:${DRONE_BUILD_NUMBER} .
- docker push khwezi/webapitest:latest
- docker push khwezi/webapitest:${DRONE_BUILD_NUMBER}
- /kaniko/executor
--context=.
--dockerfile=Dockerfile
--destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}
--destination=index.docker.io/khwezi/webapitest:latest