Fix:drone
continuous-integration/drone Build is failing Details

This commit is contained in:
Rama Priyanto 2026-03-18 15:55:16 +07:00
parent 09b2cbae3b
commit 991e21d53b
2 changed files with 5 additions and 34 deletions

View File

@ -19,7 +19,7 @@ steps:
- rm -rf /opt/build/silancar - rm -rf /opt/build/silancar
- mkdir -p /opt/build - mkdir -p /opt/build
- cd /opt/build - cd /opt/build
- git clone http://38.47.180.165:3000/humas/silancar.git - git clone http://38.47.180.165:3000/korlantas/silancar.git
- name: build image - name: build image
when: when:
@ -28,15 +28,15 @@ steps:
commands: commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0 - docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
- cd /opt/build/silancar - cd /opt/build/silancar
- docker build -t 38.47.180.165:3000/humas/silancar:$DRONE_BRANCH . - docker build -t 38.47.180.165:3000/korlantas/silancar:$DRONE_BRANCH .
- docker push 38.47.180.165:3000/humas/silancar:$DRONE_BRANCH - docker push 38.47.180.165:3000/korlantas/silancar:$DRONE_BRANCH
- name: deploy - name: deploy
when: when:
branch: branch:
- main - main
commands: commands:
- docker pull 38.47.180.165:3000/humas/silancar:$DRONE_BRANCH - docker pull 38.47.180.165:3000/korlantas/silancar:$DRONE_BRANCH
- docker stop web-silancar|| true - docker stop web-silancar|| true
- docker rm web-silancar || true - docker rm web-silancar || true
- docker run -dt -p 4700:4000 --restart always --name web-silancar 38.47.180.165:3000/humas/silancar:$DRONE_BRANCH - docker run -dt -p 4700:4000 --restart always --name web-silancar 38.47.180.165:3000/korlantas/silancar:$DRONE_BRANCH

View File

@ -1,29 +0,0 @@
stages:
- build
- deploy
build-dev:
stage: build
when: on_success
only:
- main
image: docker:25.0.3-cli
services:
- name: docker:25.0.3-dind
command: ["--insecure-registry=38.47.180.165:3000"]
script:
- docker logout
- docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 38.47.180.165:3000
- docker build -t 38.47.180.165:3000/humas/silancar:main .
- docker push 38.47.180.165:3000/humas/silancar:main
auto-deploy:
stage: deploy
when: on_success
only:
- main
image: curlimages/curl:latest
services:
- docker:25.0.3-dind
script:
- curl --user admin:$JENKINS_PWD http://38.47.185.86:8080/job/auto-deploy-narasi-ahli/build?token=autodeploynewnarasiahli