MOD Drone deployment
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-08-31 15:00:28 +02:00
parent 7834952385
commit 3c71b91340

View File

@@ -6,6 +6,13 @@ steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- apt-get update
- apt-get install --yes openjdk-11-jre
- dotnet tool install --global dotnet-sonarscanner
- export PATH="$PATH:$HOME/.dotnet/tools"
- dotnet sonarscanner begin /k:"My-Weather-API" /d:sonar.login="$SONAR_TOKEN" /d:"sonar.host.url=$SONAR_HOST_URL"
- dotnet build
- dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
- dotnet publish -c Release -o ./publish
- name: image
@@ -19,6 +26,18 @@ steps:
password:
from_secret: registry_password
- name: deploy
image: appleboy/drone-ssh
settings:
host: devops.cargostart.tech
port: 2222
username: swarm
key:
from_secret: swarm_ssh_key
script:
- docker service update --image registry.devops.cargostart.tech/my-weather-api:latest weather_app --with-registry-auth
trigger:
event:
- push