bitbucket-pipelines.yml
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 15 Jun 2018 16:12:50 +0300
changeset 2184 bbd2364fbf71
parent 1880 e5ddbaf756cb
child 2295 dda34e671700
permissions -rw-r--r--
Add argument to set list of source files to check

This is necessary, in case you want to use docker run in pretxncommit
Mercurial hook. Unfortunately for some reason if hg running in
container can't find just created commit defined by $HG_NODE. And it
throws error 'unknown revision'.

Here is example for hgrc.

[hooks]
pretxncommit.linter = hg status -m -n -a -n -I '**.py' --change $HG_NODE > files.lst && docker run --volume=$PWD:/beremiz --workdir="/beremiz" --volume=$PWD/../CanFestival-3:/CanFestival-3 --memory=1g --entrypoint=/beremiz/tests/tools/check_source.sh skvorl/beremiz-requirements --files-to-check files.lst
image: skvorl/beremiz-requirements

pipelines:
  custom: # Pipelines that are triggered manually
    checks: # The name that is displayed in the list in the Bitbucket Cloud GUI
        - step:
            script: # Modify the commands below to build your repository.
              - ln -s /CanFestival-3 $BITBUCKET_CLONE_DIR/../CanFestival-3
              - /usr/bin/python --version
              - ./tests/tools/check_source.sh
              - ./tests/tools/run_python_tests.sh


  default:
    - step:
        script: # Modify the commands below to build your repository.
          - ln -s /CanFestival-3 $BITBUCKET_CLONE_DIR/../CanFestival-3
          - /usr/bin/python --version
          - ./tests/tools/check_source.sh
          - ./tests/tools/run_python_tests.sh