From bd3cba05cb3fb4a39e9832498fb74ec863f2f97f Mon Sep 17 00:00:00 2001 From: khwezi Date: Sat, 4 Apr 2026 15:24:06 +0200 Subject: [PATCH] Fixed docker steps to use local nexus properly --- .drone.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2e1e28a..7d697e7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,7 +21,7 @@ steps: image: plugins/docker settings: registry: nexus.khongisa.co.za - repo: nexus.khongisa.co.za/mngomalab/webapitest + repo: nexus.khongisa.co.za/webapitest tags: [ "${DRONE_BUILD_NUMBER}", "latest" ] username: from_secret: docker_username @@ -40,13 +40,13 @@ steps: TRIVY_PASSWORD: from_secret: docker_password commands: - - trivy image --exit-code 1 --severity CRITICAL nexus.khongisa.co.za/mngomalab/webapitest:${DRONE_BUILD_NUMBER} + - trivy image --exit-code 1 --severity CRITICAL nexus.khongisa.co.za/webapitest:${DRONE_BUILD_NUMBER} - name: docker-push image: plugins/docker settings: registry: nexus.khongisa.co.za - repo: nexus.khongisa.co.za/mngomalab/webapitest + repo: nexus.khongisa.co.za/webapitest tags: [ "${DRONE_BUILD_NUMBER}", "latest" ] username: from_secret: docker_username @@ -66,11 +66,11 @@ steps: script: # Login to Nexus on the remote server - echo $DOCKER_PASSWORD | docker login nexus.khongisa.co.za -u $DOCKER_USERNAME --password-stdin - - docker pull nexus.khongisa.co.za/mngomalab/webapitest:latest + - docker pull nexus.khongisa.co.za/webapitest:latest # Standard Linux cleanup - docker stop webapi 2>/dev/null || true - docker rm webapi 2>/dev/null || true - - docker run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Development -p 4000:8081 nexus.khongisa.co.za/mngomalab/webapitest:latest + - docker run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Development -p 4000:8081 nexus.khongisa.co.za/webapitest:latest environment: DOCKER_USERNAME: from_secret: docker_username