kontenhumas-fe/.gitlab-ci.yml

34 lines
986 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

stages:
- build
- deploy
build-dev:
stage: build
when: on_success
only:
- main
image: docker:24.0.5
services:
- name: docker:24.0.5-dind
command: ["--tls=false", "--insecure-registry=103.82.242.92:8900"]
variables:
DOCKER_HOST: "tcp://docker:2375"
DOCKER_TLS_CERTDIR: "" # < wajib dimatikan untuk non-SSL registry
script:
- docker logout
- echo "$DEPLOY_TOKEN" | docker login -u "$DEPLOY_USERNAME" --password-stdin http://103.82.242.92:8900
- docker build -t http://103.82.242.92:8900/medols/new-netidhub:dev .
- docker tag medols/new-netidhub:dev 103.82.242.92:8900/medols/new-netidhub:dev
- docker push 103.82.242.92:8900/medols/new-netidhub:dev
auto-deploy:
stage: deploy
when: on_success
only:
- main
image: curlimages/curl:latest
services:
- docker:dind
script:
- curl --user admin:$JENKINS_PWD http://103.31.38.120:8080/job/auto-deploy-new-netidhub-public/build?token=autodeploynetidhub