Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit fad1b164 authored by Daya Adianto's avatar Daya Adianto
Browse files

Fix CI rule for deploying to production environment

parent 595da226
No related branches found
No related tags found
1 merge request!7Fix CI rule for deploying to production environment
......@@ -19,7 +19,6 @@ variables:
--show-version
-DinstallAtEnd=true
-DdeployAtEnd=true
SAST_JAVA_VERSION: 17
# TODO: Add Code Quality and SAST job templates into the CI/CD pipeline configuration
# Check the list of available templates at https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates
......@@ -37,7 +36,7 @@ stages:
.upstream-deploy-production-rules:
rules:
- if: $CI_PROJECT_NAMESPACE != "pmpl/examples/sitodo-pmpl"
- if: $CI_PROJECT_NAMESPACE != "pmpl/examples"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
......@@ -106,8 +105,7 @@ deploy:
image: docker.io/flyio/flyctl:v0.1.103
variables:
FLY_API_TOKEN: $PRODUCTION_FLY_API_TOKEN
rules:
- !reference [.upstream-deploy-production-rules, rules]
rules: !reference [.upstream-deploy-production-rules, rules]
script:
- flyctl deploy --remote-only
environment:
......@@ -129,10 +127,13 @@ bdd-test:
POSTGRES_PASSWORD: sitodo_cicd
rules:
- !reference [.upstream-deploy-production-rules, rules]
- allow_failure: true
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
allow_failure: true
needs:
- build
- deploy
- job: build
- job: deploy
optional: true
before_script:
- apt-get update && apt-get install -y firefox
- sed -i "s#headless.mode = false#headless.mode = true#" src/test/resources/serenity.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment