Fix:drone
continuous-integration/drone Build is failing
Details
continuous-integration/drone Build is failing
Details
This commit is contained in:
parent
09b2cbae3b
commit
991e21d53b
10
.drone.yml
10
.drone.yml
|
|
@ -19,7 +19,7 @@ steps:
|
|||
- rm -rf /opt/build/silancar
|
||||
- mkdir -p /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
|
||||
when:
|
||||
|
|
@ -28,15 +28,15 @@ steps:
|
|||
commands:
|
||||
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
||||
- cd /opt/build/silancar
|
||||
- docker build -t 38.47.180.165:3000/humas/silancar:$DRONE_BRANCH .
|
||||
- docker push 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/korlantas/silancar:$DRONE_BRANCH
|
||||
|
||||
- name: deploy
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
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 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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue