From 2c56a7e6de4adb77b0b10eb43dd2179174f2bcee Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Wed, 6 Mar 2024 21:23:00 +0700 Subject: [PATCH] feat: update gitlab-ci --- .gitlab-ci.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82f28cc..7f0c7e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,9 @@ stages: - - build + - build-app + - build-image - deploy -build: +build-app: stage: build image: golang:alpine script: @@ -11,7 +12,7 @@ build: paths: - main -deploy: +build-image: stage: deploy image: docker:stable services: @@ -20,3 +21,12 @@ deploy: - docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN registry.gitlab.com - docker build -t registry.gitlab.com/hanifsalafi/web-humas-be:dev . - docker push registry.gitlab.com/hanifsalafi/web-humas-be:dev + +deploy: + stage: deploy + when: on_success + image: curlimages/curl:latest + services: + - docker:dind + script: + - curl --user $JENKINS_USER:$JENKINS_PWD http://103.37.125.216:8080/job/deploy-humas-be/build?token=autodeployhumas \ No newline at end of file