diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 904db8f..3caa387 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,24 +2,21 @@ stages: - build-image - deploy -#build-1: -# stage: build-app -# image: golang:alpine -# script: -# - go build -o main . -# artifacts: -# paths: -# - main - build-2: stage: build-image - image: docker/compose:latest + image: docker:24 services: - - name: docker:dind + - name: docker:24-dind command: ["--insecure-registry=103.82.242.92:8900"] + + variables: + DOCKER_HOST: tcp://docker:2375 + DOCKER_TLS_CERTDIR: "" + script: + - docker version - docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 103.82.242.92:8900 - - docker-compose build + - docker build -t registry.gitlab.com/hanifsalafi/web-medols-be:dev . - docker tag registry.gitlab.com/hanifsalafi/web-medols-be:dev 103.82.242.92:8900/medols/web-medols-be:dev - docker push 103.82.242.92:8900/medols/web-medols-be:dev @@ -27,7 +24,5 @@ deploy: stage: deploy when: on_success image: curlimages/curl:latest - services: - - docker:dind script: - - curl --user $JENKINS_USER:$JENKINS_PWD http://103.31.38.120:8080/job/autodeploy-medols-be/build?token=autodeploymedols + - curl --user $JENKINS_USER:$JENKINS_PWD "http://103.31.38.120:8080/job/autodeploy-medols-be/build?token=autodeploymedols" diff --git a/go.mod b/go.mod index cc1fa6d..60bb72a 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/go-playground/validator/v10 v10.17.0 github.com/gofiber/fiber/v2 v2.52.4 github.com/golang-jwt/jwt/v5 v5.2.1 + github.com/google/uuid v1.6.0 github.com/minio/minio-go/v7 v7.0.68 github.com/pelletier/go-toml/v2 v2.1.1 github.com/rs/zerolog v1.31.0 @@ -34,7 +35,6 @@ require ( github.com/go-openapi/spec v0.20.15 // indirect github.com/go-openapi/swag v0.22.10 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgx/v5 v5.4.3 // indirect