Merge pull request 'test' (#40) from test into main
Some checks failed
continuous-integration/drone Build encountered an error
Some checks failed
continuous-integration/drone Build encountered an error
Reviewed-on: #40
This commit was merged in pull request #40.
This commit is contained in:
38
.drone.yml
38
.drone.yml
@@ -1,11 +1,17 @@
|
|||||||
---
|
x-docker-auth: &docker-auth
|
||||||
|
DOCKER_AUTH_CONFIG: |
|
||||||
|
{
|
||||||
|
"auths": {
|
||||||
|
"https://index.docker.io/v1/": {
|
||||||
|
"auth": "a2h3ZXppOlBHM0FRM0VPMFg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: package
|
name: package
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
@@ -13,31 +19,21 @@ steps:
|
|||||||
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
|
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
|
||||||
- git checkout ${DRONE_COMMIT}
|
- git checkout ${DRONE_COMMIT}
|
||||||
|
|
||||||
- name: dotnet publish
|
- name: dotnet-publish
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
commands:
|
commands:
|
||||||
- dotnet publish --configuration Release
|
- dotnet publish --configuration Release
|
||||||
- ls ./SampleApi/bin/Release/net8.0/publish/
|
|
||||||
|
|
||||||
- name: docker login
|
- name: build-and-push
|
||||||
image: docker:20.10
|
|
||||||
environment:
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
from_secret: docker_username
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: docker_password
|
|
||||||
commands:
|
|
||||||
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
|
||||||
|
|
||||||
- name: build and push
|
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
environment:
|
environment:
|
||||||
DOCKER_CONFIG: /kaniko/.docker
|
<<: *docker-auth
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p /kaniko/.docker
|
- mkdir -p /kaniko/.docker
|
||||||
- echo "$DOCKER_CONFIG_SECRET" > /kaniko/.docker/config.json
|
- echo "$DOCKER_AUTH_CONFIG" > /kaniko/.docker/config.json
|
||||||
- /kaniko/executor
|
- /kaniko/executor
|
||||||
|
--verbosity=debug
|
||||||
--context=.
|
--context=.
|
||||||
--dockerfile=Dockerfile
|
--dockerfile=Dockerfile
|
||||||
--destination=khwezi/webapitest:latest
|
--destination=index.docker.io/khwezi/webapitest:latest
|
||||||
--destination=khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
--destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
||||||
Reference in New Issue
Block a user