diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2265157..9badbc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file + - 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 \ No newline at end of file diff --git a/deployment/dev.yaml b/deployment/dev.yaml new file mode 100644 index 0000000..6738cdd --- /dev/null +++ b/deployment/dev.yaml @@ -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 \ No newline at end of file diff --git a/deployment/config.yaml b/deployment/test.yaml similarity index 100% rename from deployment/config.yaml rename to deployment/test.yaml