mediahub-fe/.gitlab-ci.yml

33 lines
852 B
YAML

stages:
- build
- deploy
build-prod:
stage: build
when: on_success
only:
- prod
image: docker:stable
services:
- name: docker:dind
command: ["--insecure-registry=103.82.242.92:8900"]
script:
- docker logout
- echo "Username:$DEPLOY_USERNAME"
- echo "Token:$DEPLOY_TOKEN"
- echo "$DEPLOY_TOKEN" | docker login 103.82.242.92:8900 --username "$DEPLOY_USERNAME" --password-stdin
- docker build -t 103.82.242.92:8900/mediahub/new-mediahub-fe:prod .
- docker push 103.82.242.92:8900/mediahub/new-mediahub-fe:prod
auto-deploy:
stage: deploy
when: on_success
only:
- main
- dev-landing-v2
image: curlimages/curl:latest
services:
- docker:dind
script:
- curl --user admin:$JENKINS_PWD http://38.47.180.165:8080/job/auto-deploy-new-mediahub-fe/build?token=autodeploynewmediahub