diff --git a/.ci/bitbucket_api_get.bash b/.ci/bitbucket_api_get.bash deleted file mode 100644 index 3ca93cad19def545edb12591223ec1c5daabc46e..0000000000000000000000000000000000000000 --- a/.ci/bitbucket_api_get.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -REPOSITORY=$1 -FILENAME_XSD=$2 -TOPIC_BRANCH=$3 - -wget https://api.bitbucket.org/2.0/repositories/hbpneurorobotics/${REPOSITORY}/src/${TOPIC_BRANCH}/${FILENAME_XSD} -O ${FILENAME_XSD} \ - && echo ${FILENAME_XSD}:${TOPIC_BRANCH} diff --git a/.ci/build.bash b/.ci/build.bash index 7d412740c689d598589c23232c508f9126aadbc7..a3601e55554da4d358f41ca776e3186e0fe0c9c4 100644 --- a/.ci/build.bash +++ b/.ci/build.bash @@ -40,42 +40,16 @@ export export PYTHONPATH=$VIRTUAL_ENV_PATH/lib/python${PYTHON_VERSION_MAJOR_MINO cp ${HBP}/${USER_SCRIPTS_DIR}/config_files/CLE/config.ini.sample ${HBP}/${CLE_DIR}/hbp_nrp_cle/hbp_nrp_cle/config.ini # Obtain schemas -REPOSITORY=experiments -[ -z "$(git ls-remote --heads https://bitbucket.org/hbpneurorobotics/${REPOSITORY}.git ${TOPIC_BRANCH})" ] \ - && CO_BRANCH="${DEFAULT_BRANCH}" \ - || CO_BRANCH="${TOPIC_BRANCH}" -bash ./.ci/bitbucket_api_get.bash "${REPOSITORY}" bibi_configuration.xsd "${CO_BRANCH}" -bash ./.ci/bitbucket_api_get.bash "${REPOSITORY}" ExDConfFile.xsd "${CO_BRANCH}" - -REPOSITORY=models -[ -z "$(git ls-remote --heads https://bitbucket.org/hbpneurorobotics/${REPOSITORY}.git ${TOPIC_BRANCH})" ] \ - && CO_BRANCH="${DEFAULT_BRANCH}" \ - || CO_BRANCH="${TOPIC_BRANCH}" -bash ./.ci/bitbucket_api_get.bash "${REPOSITORY}" robot_model_configuration.xsd "${CO_BRANCH}" -bash ./.ci/bitbucket_api_get.bash "${REPOSITORY}" environment_model_configuration.xsd "${CO_BRANCH}" - -# Generate schemas -pushd $VIRTUAL_ENV_PATH/lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages && rm -f hbp-nrp-distributed-nest.egg-link && popd -make devinstall # Otherwise it can't find pyxbgen -export pyxb_version=`grep "pyxb" ${HBP}/${EXDBACKEND_DIR}/hbp_nrp_commons/requirements.txt` -. $VIRTUAL_ENV_PATH/bin/activate \ - && pyxbgen -u bibi_configuration.xsd -m bibi_api_gen \ - && pyxbgen -u ExDConfFile.xsd -m exp_conf_api_gen \ - && pyxbgen -u robot_model_configuration.xsd -m robot_conf_api_gen \ - && pyxbgen -u environment_model_configuration.xsd -m environment_conf_api_gen -mv bibi_api_gen.py exp_conf_api_gen.py robot_conf_api_gen.py environment_conf_api_gen.py ${HBP}/${EXDBACKEND_DIR}/hbp_nrp_commons/hbp_nrp_commons/generated -touch ${HBP}/${EXDBACKEND_DIR}/hbp_nrp_commons/hbp_nrp_commons/generated/__init__.py -deactivate - +cd ${HBP}/${EXDBACKEND_DIR} +make schemas-install +cd ${HBP}/${BRAIN_SIMULATION_DIR} # Run tests export IGNORE_LINT='platform_venv|migrations|nest|ci_download_directory' -# Egg-links have to be removed because make devinstall set them up wrongly -pushd $VIRTUAL_ENV_PATH/lib/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages \ - && rm -f hbp-nrp-distributed-nest.egg-link && popd +# verify_base-ci fails on dependencies mismach, but ignores linter errors, that are cought by Jenkins afterwards . $VIRTUAL_ENV_PATH/bin/activate \ && source /opt/ros/noetic/setup.bash \ && source $HBP/GazeboRosPackages/devel/setup.bash \ && echo "PYTHONPATH $PYTHONPATH" \ - && make verify_base -i + && make verify_base-ci \ No newline at end of file diff --git a/.gitignore b/.gitignore index 42b783f9b878f388e3bbcdef1c7c921d5f702f74..0cd44f18e79bbd74e97694a304b0ae9afd121484 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ build/ ci_dep.txt pep8.txt pylint.txt +pycodestyle.txt test-reports/ coverage.xml .project diff --git a/Jenkinsfile b/Jenkinsfile index 37bb8085dbc95e87d93430ea30c272de890393aa..6de8fbcc59077be1a979eac2e4da1f10bdbbc457 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -70,8 +70,6 @@ pipeline { // 3 - name of topic branch // 4 - default branch if topic unavailable // 5 - username for chown - - // TODO: fix default branch to master when admin-scripts CI is merged cloneRepoTopic(env.ADMIN_SCRIPTS_DIR, 'git@bitbucket.org:hbpneurorobotics/admin-scripts.git', env.TOPIC_BRANCH, 'master', '${USER}') cloneRepoTopic(env.USER_SCRIPTS_DIR, 'git@bitbucket.org:hbpneurorobotics/user-scripts.git', env.TOPIC_BRANCH, env.DEFAULT_BRANCH, '${USER}') cloneRepoTopic(env.GAZEBO_ROS_DIR, 'git@bitbucket.org:hbpneurorobotics/gazeborospackages.git', env.TOPIC_BRANCH, env.DEFAULT_BRANCH, '${USER}')