diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 0000000000000000000000000000000000000000..33a8df501537ad2f714c131c4aae01cd5f2f1f5e --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,36 @@ +# This is a sample build configuration for Docker. +# Check our guides at https://confluence.atlassian.com/x/O1toN 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: hbpneurorobotics/nrp:dev + +pipelines: + default: + - step: + name: Build + script: + # Branch dependencies (ex-gerrit topic) + - git archive --remote=ssh://git@bitbucket.org/hbpneurorobotics/admin-scripts.git refs/heads/master nrp_branch_topic_checkout | tar xf - + - . ./nrp_branch_topic_checkout admin-scripts user-scripts + - cd $BITBUCKET_CLONE_DIR + + # Configure build + - ln -s $HBP/admin-scripts/ContinuousIntegration + - export VIRTUAL_ENV_PATH=$VIRTUAL_ENV + - export NRP_INSTALL_MODE=dev + - export PYTHONPATH=hbp_nrp_virtual_coach:$VIRTUAL_ENV_PATH/lib/python2.7/site-packages:$PYTHONPATH + + # Checkout config.json from user-scripts + - mv $HBP/user-scripts/config_files/VirtualCoach/config.json hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/ + - echo "config.json created "$(ls -l hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/config.json) + + # Copy bbp-client from user-scripts (before make devinstall) + - cp -af $HBP/user-scripts/config_files/platform_venv/* $VIRTUAL_ENV_PATH/lib/python2.7/site-packages/ + + # Build + - export IGNORE_LINT='platform_venv|config_files' + - make verify_base || { if [ -f pylint.txt ]; then echo "----------"; echo "PYLINT.TXT"; echo "----------";cat pylint.txt; fi; if [ -f pep8.txt ]; then echo "----------"; echo "PEP8.TXT"; echo "----------";cat pep8.txt; fi; exit 1; } + + # Coverage check + - $HBP/admin-scripts/nrp_cobertura_check coverage.xml