variables: PROJECT_NAME: glitchtip IMAGE_NAME: registry.gitlab.com/glitchtip/glitchtip-backend CONTAINER_TEST_IMAGE: registry.gitlab.com/glitchtip/glitchtip-backend:$CI_BUILD_REF_NAME PIP_DISABLE_PIP_VERSION_CHECK: "on" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" POETRY_VIRTUALENVS_CREATE: "false" POSTGRES_HOST_AUTH_METHOD: "trust" DEBUG: "true" include: - template: SAST.gitlab-ci.yml - template: Dependency-Scanning.gitlab-ci.yml - template: Secret-Detection.gitlab-ci.yml test: image: python:3.10 variables: SECRET_KEY: testing ENABLE_TEST_API: "true" ENABLE_OPEN_USER_REGISTRATION: "true" services: - postgres:13 cache: key: ${CI_COMMIT_REF_SLUG} paths: - .cache/pip script: - pip install poetry - poetry install --no-interaction --no-ansi - ./manage.py test lint: image: python:3.10 script: - pip install poetry - poetry install --no-interaction --no-ansi - isort --check glitchtip # - pylint --load-plugins=pylint_django --django-settings-module=glitchtip.settings --disable=R glitchtip build: image: docker:20 rules: - if: '$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_PROTECTED == "true"' services: - docker:20-dind script: - docker build -t $CONTAINER_TEST_IMAGE --build-arg IS_CI="True" . - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com - docker push $CONTAINER_TEST_IMAGE