fix: gitlab-ci

This commit is contained in:
Sabda Yagra 2026-01-02 09:21:30 +07:00
parent 2a7ec6acb0
commit 9e497069a3
1 changed files with 6 additions and 9 deletions

View File

@ -1,26 +1,23 @@
stages: stages:
- build - build
- deploy - deploy
build-prod: build-dev:
stage: build stage: build
when: on_success when: on_success
only: only:
- main - main
- dev-landing-v2 - dev-landing-v2
- prod image:
image:
name: docker:25.0.3-cli name: docker:25.0.3-cli
services: services:
- name: docker:25.0.3-dind - name: docker:25.0.3-dind
command: ["--insecure-registry=38.47.185.86:8900"] command: ["--insecure-registry=38.47.185.86:8900"]
script: script:
- docker logout - docker logout
- echo "Username:$DEPLOY_USERNAME" - docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 38.47.185.86:8900
- echo "Token:$DEPLOY_TOKEN" - docker build -t 38.47.185.86:8900/mediahub/new-mediahub-fe:dev .
- echo "$DEPLOY_TOKEN" | docker login 38.47.185.86:8900 --username "$DEPLOY_USERNAME" --password-stdin - docker push 38.47.185.86:8900/mediahub/new-mediahub-fe:dev
- docker build --no-cache -t 38.47.185.86:8900/mediahub/new-mediahub-fe:prod .
- docker push 38.47.185.86:8900/mediahub/new-mediahub-fe:prod
auto-deploy: auto-deploy:
stage: deploy stage: deploy