gitlab ci configuration

This commit is contained in:
MohammadTaha Basiri 2022-02-05 15:18:41 +03:30
parent a2e0a9a29f
commit e289de8de8
2 changed files with 36 additions and 0 deletions

33
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,33 @@
stages:
- build
- push
- deploy
build:
script:
- flutter clean
- flutter build web --webrenderer canvaskit
push:
stage: push
image: docker:latest
services:
- 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
only:
- test
deploy:
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/config.yaml -p SEC_NAME
only:
- test

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM nginx:latest
COPY ./build/web /usr/share/nginx/html/
ENTRYPOINT ["nginx", "-g", "daemon off;"]