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:
|
stages:
|
||||||
- build
|
- build
|
||||||
- push
|
- push
|
||||||
|
|
@ -11,6 +15,7 @@ build:
|
||||||
- flutter build web --web-renderer canvaskit
|
- flutter build web --web-renderer canvaskit
|
||||||
only:
|
only:
|
||||||
- test
|
- test
|
||||||
|
- dev
|
||||||
|
|
||||||
push:
|
push:
|
||||||
stage: push
|
stage: push
|
||||||
|
|
@ -19,12 +24,13 @@ push:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
- docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
|
- 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 build --pull -t registry.gitlab.com/didvan/didvan-app/api:latest .
|
||||||
- docker push registry.gitlab.com/didvan/didvan-panel-server/api:latest
|
- docker push registry.gitlab.com/didvan/didvan-app/api:latest
|
||||||
only:
|
only:
|
||||||
- test
|
- test
|
||||||
|
- dev
|
||||||
|
|
||||||
deploy:
|
deploy-test:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: python:3.10.2
|
image: python:3.10.2
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -32,6 +38,18 @@ deploy:
|
||||||
script:
|
script:
|
||||||
- pip install fandogh_cli --upgrade
|
- pip install fandogh_cli --upgrade
|
||||||
- fandogh login --username=$FAN_USR --password=$FAN_PASS
|
- 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:
|
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