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 workflow: rules: - when: always test: image: python:3.10 variables: SECRET_KEY: testing ENABLE_TEST_API: "true" ENABLE_OPEN_USER_REGISTRATION: "true" services: - postgres:14 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 buildx: image: docker:20-git artifacts: paths: - buildx expire_in: 1 hour services: - docker:20-dind script: - export DOCKER_BUILDKIT=1 - git clone https://github.com/docker/buildx.git ./docker-buildx - docker build --platform=local -o . ./docker-buildx build: image: docker:20 needs: - buildx services: - docker:20-dind before_script: - mkdir -p ~/.docker/cli-plugins - mv buildx ~/.docker/cli-plugins/docker-buildx - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes script: - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com - docker buildx create --use - docker buildx build --platform linux/arm64/v8 -t $CONTAINER_TEST_IMAGE --build-arg IS_CI="True" .