diff --git a/.gitlab-ci_template.yml b/.gitlab-ci_template.yml index 1118540e66243883b8f7c9f2fea6bbec023f29d7..0c975356801727023412fff60a6c8dff2fe687e8 100644 --- a/.gitlab-ci_template.yml +++ b/.gitlab-ci_template.yml @@ -1,38 +1,10 @@ - image: docker.io/labrobotica/labrobotica:latest + image: docker.io/labrobotica/labrobotica:18.04 variables: GIT_SUBMODULE_STRATEGY: recursive - - stages: - - build - - test - - deploy - - build-package: - stage: build - script: - #- git submodule sync --recursive - #- git submodule update --init --recursive - - apt update || apt -y install ca-certificates && apt update - ##Install dependencies - #- apt -y install iri-dep1-dev iri-dep2-dev - - mkdir -pv build - - cd build - - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG .. - - make package -j $(nproc) - - artifacts: - paths: - - build/*.deb - expire_in: 2 weeks - only: - - tags - - update_repo: - stage: deploy - script: - - cd build - - "scp -i /root/.ssh/iriLabKeyNopwd -r *library-name*.deb irilabo@labrepo.iri.upc.edu:packages/" - - "ssh irilabo@labrepo.iri.upc.edu -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh library-name $(lsb_release -cs)" - only: - - tags \ No newline at end of file + FROM_RDEPENDS_CI: "false" + TAG_VERSION: $CI_COMMIT_TAG + PACKAGE_NAME: "library-name" + + include: + remote: 'https://gitlab.iri.upc.edu/labrobotica/packaging_ci/-/raw/master/packaging-ci.yml' diff --git a/CMakeLists_template.txt b/CMakeLists_template.txt index bd8284c6cda491973a493722e8e3de7188d82570..e33cb99f6b930238e92b56455e629571cfc13f13 100755 --- a/CMakeLists_template.txt +++ b/CMakeLists_template.txt @@ -75,6 +75,7 @@ IF (UNIX) SET(CPACK_PACKAGING_INSTALL_PREFIX /usr) SET(CPACK_GENERATOR "DEB") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "labrobotica - labrobotica@iri.upc.edu") + SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://gitlab.iri.upc.edu/<package_repo_url>") #Uncomment to add the necessary mantainer scripts SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm") diff --git a/new_project.sh b/new_project.sh index e78c24ec9e00751308ffafa47f4f4f7cfea65181..cc9ee79213eb56bf092f0a0327354e8ad8936b0a 100755 --- a/new_project.sh +++ b/new_project.sh @@ -379,20 +379,20 @@ fi sed 's/library-name/'$NAME_WITH_DASHES'/g' <.gitlab-ci_template.yml >./.gitlab-ci.yml -#Add to .gitlab-ci.yml apt install dependencies like - apt -y install iri-dep1-dev iri-dep2-dev -if [ -n "$arr" ] -then - apt_deps="" - for x in $arr - do - dep_line="iri-$x-dev" - apt_deps="$apt_deps$dep_line " - done - line_to_add="\ \ \ \ \ \ - apt -y install $apt_deps" - file=./.gitlab-ci.yml - comment="##Install dependencies" - sed -i "/${comment}/ a ${line_to_add}" ${file} -fi +# #Add to .gitlab-ci.yml apt install dependencies like - apt -y install iri-dep1-dev iri-dep2-dev +# if [ -n "$arr" ] +# then +# apt_deps="" +# for x in $arr +# do +# dep_line="iri-$x-dev" +# apt_deps="$apt_deps$dep_line " +# done +# line_to_add="\ \ \ \ \ \ - apt -y install $apt_deps" +# file=./.gitlab-ci.yml +# comment="##Install dependencies" +# sed -i "/${comment}/ a ${line_to_add}" ${file} +# fi sed 's/project_name/'$NAME'/g' <postinst_template >./scripts/debian/postinst sed 's/project_name/'$NAME'/g' <prerm_template >./scripts/debian/prerm