Skip to content
Snippets Groups Projects
bitbucket-pipelines.yml 1.71 KiB
Newer Older
# This is a sample build configuration for Python.
# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: qgis/qgis

pipelines:
  default:
    - step:
        services:
          - docker
        caches:
          - docker
          - pip
          - qgisresourcecache
        script: # Modify the commands below to build your repository.
          - apt-get update
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - apt-get -y install git-lfs
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - mkdir test-reports
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - git lfs install
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - git lfs fetch
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - git lfs pull
          - git lfs checkout
          - QT_QPA_PLATFORM=offscreen
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - CI=True
          - export QT_QPA_PLATFORM
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - export CI
          - export PYTHONPATH="${PYTHONPATH}:$(pwd)"
          - python3 -m pip install -r requirements_dev.txt
          - python3 scripts/setup_repository.py
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          #- python3 -m coverage run -m unittest discover -s tests
          #- python3 -m coverage report
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          - chmod +x scripts/runtests.sh
          - ./scripts/runtests.sh
          # build and upload plugin to download section
          - python3 scripts/create_plugin.py -z timeseriesviewerplugin.$(BITBUCKET_BRANCH).lastbuild.zip
          #- find deploy -name "timeseriesviewerplugin*zip" -exec cp -t deploy2 {} +
Benjamin Jakimow's avatar
Benjamin Jakimow committed
          #- find deploy -name "timeseriesviewerplugin*zip" -exec curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"target/output.zip"
definitions:
  caches:
    qgisresourcecache: /opt/atlassian/pipelines/agent/build/qgisresources