Files
webapitest/.drone.yml
2026-03-08 12:12:03 +02:00

39 lines
1013 B
YAML

x-docker-auth: &docker-auth
DOCKER_AUTH_CONFIG: |
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "a2h3ZXppOlBHM0FRM0VPMFg="
}
}
}
kind: pipeline
type: docker
name: package
steps:
- name: clone
image: alpine/git
commands:
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
- git checkout ${DRONE_COMMIT}
- name: dotnet-publish
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet publish --configuration Release
- name: build-and-push
image: gcr.io/kaniko-project/executor:debug
environment:
<<: *docker-auth
commands:
- mkdir -p /kaniko/.docker
- echo "$DOCKER_AUTH_CONFIG" > /kaniko/.docker/config.json
- /kaniko/executor
--verbosity=debug
--context=.
--dockerfile=Dockerfile
--destination=index.docker.io/khwezi/webapitest:latest
--destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}