From 5b2ae9edfb13297920d8e8c8013509609f1918ee Mon Sep 17 00:00:00 2001 From: "alexandr.kravchenko" <alexander.kravchenko@demlabs.net> Date: Thu, 13 Feb 2020 15:05:15 +0500 Subject: [PATCH] Added reprepro integration stub. Now onto testing --- .gitlab-ci.yml | 2 +- prod_build/linux/debian/conf/publish | 7 ++++++- prod_build/linux/debian/scripts/deploy.sh | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a51c33f70..1d1e93039 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,4 +10,4 @@ kelvin-node-schedule: stage: build tags: - kelvin-node - script: ~/production/integration/gitlab-CI/build_all_handler.sh cellframe-node && ~/production/integration/reprepro/publish.sh debian.pub.demlabs.net stretch main && ~/production/integration/gitlab-CI/travis_test.sh + script: ~/production/integration/gitlab-CI/build_all_handler.sh cellframe-node diff --git a/prod_build/linux/debian/conf/publish b/prod_build/linux/debian/conf/publish index 61b38fc19..7e43efe9e 100644 --- a/prod_build/linux/debian/conf/publish +++ b/prod_build/linux/debian/conf/publish @@ -1,3 +1,8 @@ -HOST_DISTR_VERSIONS="stretch buster" +HOST_DISTR_VERSIONS="buster" HOST_ARCH_VERSIONS="amd64" PACKAGE_PATH=builds/deb/ +REPO_DIR_SRC=/var/tmp/repository +DISTR_CODENAME=$HOST_DISTR_VERSIONS +REPO_ADDR=debian.pub.demlabs.net +REPO_DIR=/var/www/html/$REPO_ADDR + diff --git a/prod_build/linux/debian/scripts/deploy.sh b/prod_build/linux/debian/scripts/deploy.sh index b3b3caac6..41eae02f7 100755 --- a/prod_build/linux/debian/scripts/deploy.sh +++ b/prod_build/linux/debian/scripts/deploy.sh @@ -2,17 +2,23 @@ echo "Deploying to $PACKAGE_PATH" echo $wd +cd $REPO_DIR PKGFILES=($(ls build/*.deb)) mv build/*.deb $wd/$PACKAGE_PATH || echo "[ERR] Something went wrong in publishing the package. Now aborting." if [ ! -z $UPDVER ]; then for pkgfile in $PKGFILES; do ln -sf $wd/$PACKAGE_PATH/$pkgfile $wd/$PACKAGE_PATH/$pkgfile-latest + cp $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC done + sudo reprepro -c "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb + #Update into reprepro: + export -n "UPDVER" #Need to create latest symlink to the project. fi +cd $wd #symlink name-actual to the latest version. #build/deb/versions - for all files #build/deb/${PROJECT}-latest - for symlinks. -- GitLab