gitlab ci configuration for dev and test
This commit is contained in:
parent
5879e60256
commit
04184c3b5a
|
|
@ -1,3 +1,7 @@
|
|||
cache:
|
||||
paths:
|
||||
- build/web
|
||||
|
||||
stages:
|
||||
- build
|
||||
- push
|
||||
|
|
@ -11,6 +15,7 @@ build:
|
|||
- flutter build web --web-renderer canvaskit
|
||||
only:
|
||||
- test
|
||||
- dev
|
||||
|
||||
push:
|
||||
stage: push
|
||||
|
|
@ -19,12 +24,13 @@ push:
|
|||
- docker:dind
|
||||
script:
|
||||
- docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
|
||||
- docker build --pull -t registry.gitlab.com/didvan/didvan-panel-server/api:latest .
|
||||
- docker push registry.gitlab.com/didvan/didvan-panel-server/api:latest
|
||||
- docker build --pull -t registry.gitlab.com/didvan/didvan-app/api:latest .
|
||||
- docker push registry.gitlab.com/didvan/didvan-app/api:latest
|
||||
only:
|
||||
- test
|
||||
- dev
|
||||
|
||||
deploy:
|
||||
deploy-test:
|
||||
stage: deploy
|
||||
image: python:3.10.2
|
||||
variables:
|
||||
|
|
@ -32,6 +38,18 @@ deploy:
|
|||
script:
|
||||
- pip install fandogh_cli --upgrade
|
||||
- fandogh login --username=$FAN_USR --password=$FAN_PASS
|
||||
- fandogh service apply -f ./deployment/config.yaml -p SEC_NAME
|
||||
- fandogh service apply -f ./deployment/test.yaml -p SEC_NAME
|
||||
only:
|
||||
- test
|
||||
- test
|
||||
|
||||
deploy-dev:
|
||||
stage: deploy
|
||||
image: python:3.10.2
|
||||
variables:
|
||||
COLLECT_ERROR: 1
|
||||
script:
|
||||
- pip install fandogh_cli --upgrade
|
||||
- fandogh login --username=$FAN_USR --password=$FAN_PASS
|
||||
- fandogh service apply -f ./deployment/dev.yaml -p SEC_NAME
|
||||
only:
|
||||
- dev
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
kind: ExternalService
|
||||
name: app-dev
|
||||
spec:
|
||||
allow_http: false
|
||||
disable_default_domains: true
|
||||
image: registry.gitlab.com/didvan/didvan-app/api:latest
|
||||
image_pull_policy: Always
|
||||
image_pull_secret: $SEC_NAME
|
||||
path: /
|
||||
replicas: 1
|
||||
resources:
|
||||
memory: 100Mi
|
||||
domains:
|
||||
- name: dev.didvan.app
|
||||
Loading…
Reference in New Issue