Skip to content
Snippets Groups Projects
Commit 1cf9e6ff authored by alexandr.kravchenko's avatar alexandr.kravchenko
Browse files

Working on deployment to debian.pub.demlabs.net

parent 5b2ae9ed
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ HOST_DISTR_VERSIONS="buster"
HOST_ARCH_VERSIONS="amd64"
PACKAGE_PATH=builds/deb/
REPO_DIR_SRC=/var/tmp/repository
DISTR_CODENAME=$HOST_DISTR_VERSIONS
DISTR_CODENAME="stretch"
REPO_ADDR=debian.pub.demlabs.net
REPO_DIR=/var/www/html/$REPO_ADDR
REPO_DIR=/var/www/html/debian.pub.demlabs.net
DISTR_COMPONENT=main
......@@ -3,21 +3,26 @@
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."
cd build
PKGFILES=($(ls *.deb))
cd ..
mv build/*.deb $wd/$PACKAGE_PATH/ || echo "[ERR] Something went wrong in publishing the package. Now aborting."
if [ ! -z $UPDVER ]; then
NOTONBUILDSERVER=0
gitlab-runner -v 2&>> /dev/null || NOTONBUILDSERVER=$?
if [[ $NOTONBUILDSERVER == 0 ]]; then
mkdir -p $REPO_DIR_SRC
for pkgfile in $PKGFILES; do
ln -sf $wd/$PACKAGE_PATH/$pkgfile $wd/$PACKAGE_PATH/$pkgfile-latest
cp $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC
cp -v $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC
done
sudo reprepro -c "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb
cd $REPO_DIR
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
export -n "UPDVER"
rm -r $REPO_DIR_SRC
cd $wd
#symlink name-actual to the latest version.
#build/deb/versions - for all files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment