variables: REGISTRY_PROJECT: cthulhoo IMAGE_TAR_DICT: image-dict.tar IMAGE_TAR_FPM: image-fpm.tar IMAGE_TAR_WEB: image-web.tar stages: - lint - build - image - push - publish include: - project: 'ci/ci-templates' ref: master file: .ci-build-docker-kaniko.yml - project: 'ci/ci-templates' ref: master file: .ci-registry-push.yml - project: 'ci/ci-templates' ref: master file: .ci-lint-common.yml - project: 'ci/ci-templates' ref: master file: .ci-update-helm-imagetag.yml - project: 'ci/ci-templates' ref: master file: .ci-build-npm.yml - project: 'ci/ci-templates' ref: master file: .ci-mr-review.yml phpunit: extends: .phpunit variables: PHPUNIT_ARGS: --coverage-filter classes --coverage-filter include phpunit:integration: extends: .phpunit variables: PHPUNIT_ARGS: --coverage-filter classes --coverage-filter include --do-not-cache-result --log-junit phpunit-report.xml --coverage-cobertura phpunit-coverage.xml --coverage-text --colors=never script: - chown -R user tests_integration - chmod +x tests_integration/pg_helper.sh tests_integration/run.sh - su user -c "./tests_integration/run.sh ${PHPUNIT_ARGS}" # can't run initdb as root tsc: extends: .tsc after_script: - sh ./utils/show-codequality.sh phpstan: extends: .phpstan build: extends: .build artifacts: when: always paths: - dist/ - worker.js the-epube-dict:build: extends: .build-docker-kaniko-no-push variables: DOCKERFILE: ${CI_PROJECT_DIR}/.docker/dict/Dockerfile IMAGE_TAR: ${IMAGE_TAR_DICT} the-epube-dict:push-master: extends: .crane-image-registry-push-master variables: IMAGE_TAR: ${IMAGE_TAR_DICT} needs: - job: the-epube-dict:build the-epube-dict:push-master-gitlab: extends: .crane-image-registry-push-master-gitlab variables: IMAGE_TAR: ${IMAGE_TAR_DICT} needs: - job: the-epube-dict:build the-epube-dict:push-master-docker-hub: extends: .crane-image-registry-push-master-docker-hub variables: IMAGE_TAR: ${IMAGE_TAR_DICT} needs: - job: the-epube-dict:build the-epube-fpm-static:build: extends: .build-docker-kaniko-no-push variables: DOCKERFILE: ${CI_PROJECT_DIR}/.docker/app/Dockerfile IMAGE_TAR: ${IMAGE_TAR_FPM} the-epube-fpm-static:push-master: extends: .crane-image-registry-push-master variables: IMAGE_TAR: ${IMAGE_TAR_FPM} needs: - job: the-epube-fpm-static:build the-epube-fpm-static:push-master-gitlab: extends: .crane-image-registry-push-master-gitlab variables: IMAGE_TAR: ${IMAGE_TAR_FPM} needs: - job: the-epube-fpm-static:build the-epube-fpm-static:push-master-docker-hub: extends: .crane-image-registry-push-master-docker-hub variables: IMAGE_TAR: ${IMAGE_TAR_FPM} needs: - job: the-epube-fpm-static:build the-epube-web-nginx:build: extends: .build-docker-kaniko-no-push variables: DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile IMAGE_TAR: ${IMAGE_TAR_WEB} the-epube-web-nginx:push-master: extends: .crane-image-registry-push-master variables: IMAGE_TAR: ${IMAGE_TAR_WEB} needs: - job: the-epube-web-nginx:build the-epube-web-nginx:push-master-gitlab: extends: .crane-image-registry-push-master-gitlab variables: IMAGE_TAR: ${IMAGE_TAR_WEB} needs: - job: the-epube-web-nginx:build the-epube-web-nginx:push-master-docker-hub: extends: .crane-image-registry-push-master-docker-hub variables: IMAGE_TAR: ${IMAGE_TAR_WEB} needs: - job: the-epube-web-nginx:build update-demo: extends: .update-helm-imagetag variables: CHART_REPO: gitlab.fakecake.org/git/helm-charts/the-epube.git CHART_VALUES: values-demo.yaml ACCESS_TOKEN: ${DEMO_HELM_TOKEN} rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $DEMO_HELM_TOKEN != null stage: publish update-prod: extends: .update-helm-imagetag variables: CHART_REPO: gitlab.fakecake.org/git/helm-charts/the-epube-prod.git CHART_VALUES: values-prod.yaml ACCESS_TOKEN: ${PROD_HELM_TOKEN} rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PROD_HELM_TOKEN != null stage: publish update-ru-prod: extends: .update-helm-imagetag variables: CHART_REPO: gitlab.fakecake.org/git/helm-charts/the-epube-prod.git CHART_VALUES: values-ru-prod.yaml ACCESS_TOKEN: ${PROD_HELM_TOKEN} needs: - job: update-prod rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PROD_HELM_TOKEN != null stage: publish