-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
57 lines (52 loc) · 1.33 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
default:
image: node:18.12.0
variables:
IMAGE_NAME: registry.gitlab.com/ultra-x/ultrax-web-app
IMAGE_TAG: $CI_COMMIT_SHORT_SHA
# IMAGE_NAME: registry.gitlab.u2sec.io/u2u-ultrax/docker-image/web-app
# IMAGE_TAG: main
stages:
- build
# - deploy
#deploy_preview:
# stage: deploy
# only:
# - main
# script:
# - npm install --global vercel
# - vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
# - vercel build --token=$VERCEL_TOKEN
# - vercel deploy --prebuilt --token=$VERCEL_TOKEN
#
#deploy_production:
# stage: deploy
# only:
# - tags
# script:
# - npm install --global vercel
# - vercel pull --yes --environment=production --token=$VERCEL_TOKEN
# - vercel build --prod --token=$VERCEL_TOKEN
# - vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
docker build:
stage: build
image: docker:git
services:
- docker:dind
only:
refs:
- main
before_script:
- mkdir -p $HOME/.docker
- echo $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json
script:
- docker build -t $IMAGE_NAME:$IMAGE_TAG .
- docker push $IMAGE_NAME:$IMAGE_TAG
#deploy to development:
# stage: deploy
# image: registry.digitalocean.com/ultra-x/k8s-deployer:latest
# only:
# - main
# variables:
# HOST: utx.bestsoft.dev
# NAMESPACE: development
# script: cd k8s && bash deploy.sh