|
| 1 | +#image: pypy:latest |
| 2 | +image: registry.gitlab.com/kolanich-subgroups/docker-images/fixed_python:latest |
| 3 | +stages: |
| 4 | + - dependencies |
| 5 | + - build |
| 6 | + - trigger |
| 7 | + - test |
| 8 | + |
| 9 | +variables: |
| 10 | + DOCKER_DRIVER: overlay2 |
| 11 | + SAST_ANALYZER_IMAGE_TAG: latest |
| 12 | + SAST_DISABLE_DIND: "true" |
| 13 | + |
| 14 | +include: |
| 15 | + - template: SAST.gitlab-ci.yml |
| 16 | + #- template: DAST.gitlab-ci.yml |
| 17 | + #- template: License-Management.gitlab-ci.yml |
| 18 | + #- template: Container-Scanning.gitlab-ci.yml |
| 19 | + #- template: Dependency-Scanning.gitlab-ci.yml |
| 20 | + - template: Code-Quality.gitlab-ci.yml |
| 21 | + |
| 22 | + |
| 23 | +build: |
| 24 | + tags: |
| 25 | + - shared |
| 26 | + - linux |
| 27 | + stage: build |
| 28 | + variables: |
| 29 | + GIT_DEPTH: "1" |
| 30 | + PYTHONUSERBASE: ${CI_PROJECT_DIR}/python_user_packages |
| 31 | + |
| 32 | + before_script: |
| 33 | + - export PYTHON_MODULES_DIR=${PYTHONUSERBASE}/lib/python3.8 |
| 34 | + - export EXECUTABLE_DEPENDENCIES_DIR=${PYTHONUSERBASE}/bin |
| 35 | + - export PATH="$PATH:$EXECUTABLE_DEPENDENCIES_DIR" # don't move into `variables` any of them, it is unordered |
| 36 | + - apt-get update |
| 37 | + - apt-get install -y python3-apt python3-psutil |
| 38 | + - python3 ./fix_python_modules_paths.py |
| 39 | + - pip install --user --upgrade --pre git+https://gitlab.com/File2Package.py/File2Package.py.git git+https://github.com/amoffat/sh.git git+https://github.com/KOLANICH/python-debparse.git@fixes |
| 40 | + - mkdir ./wheels |
| 41 | + |
| 42 | + script: |
| 43 | + - python3 ./setup.py bdist_wheel |
| 44 | + - mv ./dist/*.whl ./wheels/File2Package.backend.dpkg-0.CI_python-py3-none-any.whl |
| 45 | + - pip3 install --upgrade --pre --user ./wheels/File2Package.backend.dpkg-0.CI_python-py3-none-any.whl |
| 46 | + - coverage run --source=File2Package.backend.dpkg --branch -m pytest --junitxml=./rspec.xml ./tests/tests.py |
| 47 | + - coverage report -m |
| 48 | + - coverage xml |
| 49 | + |
| 50 | + coverage: /^TOTAL\\s+.+?(\\d{1,3}%)$/ |
| 51 | + |
| 52 | + cache: |
| 53 | + paths: |
| 54 | + - $PYTHONUSERBASE |
| 55 | + |
| 56 | + artifacts: |
| 57 | + paths: |
| 58 | + - wheels |
| 59 | + reports: |
| 60 | + junit: ./rspec.xml |
| 61 | + cobertura: ./coverage.xml |
| 62 | + |
| 63 | +update_prebuilder_dependencies_image: |
| 64 | + only: |
| 65 | + - master |
| 66 | + stage: trigger |
| 67 | + allow_failure: true |
| 68 | + trigger: |
| 69 | + project: KOLANICH-subgroups/docker-images/prebuilder_dependencies |
| 70 | + strategy: depend |
0 commit comments