Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cellframe/cellframe-node
  • evseev/cellframe-node
  • dmitry.puzyrkov/cellframe-node
  • MIKA83/cellframe-node
4 results
Show changes
Commits on Source (22)
......@@ -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
Subproject commit a831b434bc840cebb1cc6cf1a913bf606286c28d
Subproject commit dde4bb6403957dcbd2e0a983b36661ad303f5756
Subproject commit 1b96ebed0b0c747cad00b834b87e402abad9eaf8
Subproject commit b92ccafc47577e91f55073edf8b2eae1e94fc83c
Subproject commit 05cd2947d6e3547e3e111b53befeff4b043cb16a
Subproject commit c28d683b226c8d39cd898609eb15a4049e74cf4e
Subproject commit e0f74dbc745a65bb040a41e99460b21b14406a1d
Subproject commit db5a7df2164c4e5a09a15464b8446e8ccb0cb97f
Subproject commit 64ad6f9a7ceccdf4f3ddd9ffe0b9b8d6d4b1027a
Subproject commit 14ad232a6073aea30abcff53d69f91bcd0f5e1a5
Subproject commit 1688d69223b19de929eed4f8dc61332aaec8dd46
Subproject commit 1dfccbe81c132d06b8d54d76b65c3e25969f444d
Subproject commit 51c01481f87f3ffc1fdad3054292bf910d2c5f31
Subproject commit 001b68d44aa11bbeb28b473e1ba41364497a6d6a
#!/bin/bash
export_variables() {
IFS=$'\n'
for variable in $(cat prod_build/$platform/conf/*); do
[ -z $1 ] && export $(echo "$variable" | sed 's/\"//g') || export -n $(echo $variable | cut -d '=' -f1)
done
}
PLATFORM_CANDIDATES=$2
CHROOT_PREFIX="builder"
CHROOTS_PATH=$1
PLATFORMS=$2
PLATFORMS=""
PKG_FORMAT=$3
SRC_PATH=$4
JOB=$5
cd $SRC_PATH
echo "workdir is $(pwd)"
. prod_build/general/pre-build.sh
export_variables "./prod_build/general/conf/*"
IFS=' '
echo "$PLATFORM_CANDIDATES"
echo $IMPLEMENTED
for platform in $PLATFORM_CANDIDATES; do
[[ $(echo $IMPLEMENTED | grep $platform) != "" ]] && PLATFORMS="$PLATFORMS$platform " || echo "Platform $platform is not implemented in this project yet. Sorry"
done
echo "Platforms are $PLATFORMS"
for platform in $PLATFORMS; do
export_variables
echo "Working with $platform now"
export_variables "./prod_build/$platform/conf/*"
IFS=' '
PKG_TYPE=$(echo $PKG_FORMAT | cut -d ' ' -f1)
#Check if chroots are present
echo $HOST_DISTR_VERSIONS
echo $HOST_ARCH_VERSIONS
[ -e prod_build/$platform/scripts/pre-build.sh ] && prod_build/$platform/scripts/pre-build.sh $CHROOT_PREFIX #For actions not in chroot (version update)
[ -e prod_build/$platform/scripts/pre-build.sh ] && prod_build/$platform/scripts/pre-build.sh $CHROOT_PREFIX || exit $? #For actions before build not in chroot and in chroot (version update, install missing dependencies(under schroot))
for distr in $HOST_DISTR_VERSIONS; do
for arch in $HOST_ARCH_VERSIONS; do
if [ -e $CHROOTS_PATH/$CHROOT_PREFIX-$distr-$arch ]; then
schroot -c $CHROOT_PREFIX-$distr-$arch -- launcher.sh prod_build/$platform/scripts/$JOB.sh "$PKG_TYPE" || errcode=$?
schroot -c $CHROOT_PREFIX-$distr-$arch -- launcher.sh prod_build/$platform/scripts/$JOB.sh $PKG_TYPE || errcode=$?
# echo "schroot stub $PKG_TYPE"
else
echo "chroot $CHROOT_PREFIX-$distr-$arch not found. You should install it first"
fi
done
done
echo "workdir before postinstall is $(pwd)"
[ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh #For post-build actions not in chroot (global publish)
PKG_FORMAT=$(echo $PKG_FORMAT | cut -d ' ' -f2-)
# export_variables clean
unexport_variables "./prod_build/$platform/conf/*"
done
#[ $(mount | grep "/run/schroot/mount") ] && sudo umount -l /run/schroot/mount && sudo rm -r /run/schroot/mount/* #Removing mountpoint odds.
......
IMPLEMENTED="linux/debian"
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="buster"
REPO_ADDR=debian.pub.demlabs.net
REPO_DIR=/var/www/html/debian.pub.demlabs.net
DISTR_COMPONENT=main
#!/bin/bash
repack() {
DEBNAME=$1
echo "Renaming control on $DEBNAME"
mkdir tmp && cd tmp
ar p ../$DEBNAME control.tar.gz | tar -xz
VERSION=$(cat control | grep Version | cut -d ':' -f2)
echo "Version is $VERSION"
sed -i "s/$VERSION/${VERSION}-$DISTR_CODENAME/" control
tar czf control.tar.gz *[!z]
ar r ../$DEBNAME control.tar.gz
cd ..
rm -rf tmp
}
echo "Deploying to $PACKAGE_PATH"
echo $wd
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
cd build
PKGFILES=($(ls *.deb))
cd ..
mv build/*.deb $wd/$PACKAGE_PATH/ || echo "[ERR] Something went wrong in publishing the package. Now aborting."
NOTONBUILDSERVER=0
gitlab-runner -v 2&>> /dev/null || NOTONBUILDSERVER=$?
if [[ $NOTONBUILDSERVER == 0 ]]; then
mkdir -p $REPO_DIR_SRC
cd $REPO_DIR_SRC
for pkgfile in $PKGFILES; do
ln -sf $wd/$PACKAGE_PATH/$pkgfile $wd/$PACKAGE_PATH/$pkgfile-latest
cp -v $wd/$PACKAGE_PATH/$pkgfile $REPO_DIR_SRC
for variant in $HOST_DISTR_VERSIONS; do
ls $pkgfile | grep $variant && DISTR_CODENAME=$variant #Since we add a postfix into every debpackage done, we'll extract it that way.
done
repack $pkgfile
done
export -n "UPDVER"
cd $REPO_DIR
echo "Attempting to add packages into $DISTR_VARIANT section to $DISTR_CODENAME"
sudo reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" $REPO_DIR_SRC/*.deb
#Update into reprepro:
#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
#build/deb/${PROJECT}-latest - for symlinks.
......@@ -93,7 +93,9 @@ extract_version_number
### This is a solution. We modify the changelog only if there are updates and not on build servers. And of course if it's not cmake-based build project.
### let's keep those comments here for a while
if [ $( gitlab-runner -v 2> /dev/null ; echo $? ) == 0 ]; then
NOTONBUILDSERVER=0
gitlab-runner -v 2&>>/dev/null || NOTONBUILDSERVER=$?
if [ $NOTONBUILDSERVER == 0 ]; then
echo "[WRN] on build platform. Version won't be changed" # okay, so this echo wont be outputted as the condition is not true
elif [ ! -e debian/changelog ]; then ### I guess this what's supposed to be added in order to solve the issue with the changelog?+
......@@ -124,8 +126,10 @@ CHROOT_PREFIX=$1
for distr in $HOST_DISTR_VERSIONS; do #we need to install required dependencies under schroot.
for arch in $HOST_ARCH_VERSIONS; do
echo "$CHROOT_PREFIX-$distr-$arch"
schroot -c $CHROOT_PREFIX-$distr-$arch -- prod_build/linux/debian/scripts/chroot/pre-build.sh "$PKG_DEPS"
schroot -c $CHROOT_PREFIX-$distr-$arch -- prod_build/linux/debian/scripts/chroot/pre-build.sh "$PKG_DEPS" || errcode=$?
[[ $errcode != 0 ]] && echo "Problems with $CHROOT_PREFIX-$distr-$arch occured. You had installed it, right?"
done
done
exit 0
## Maybe we do have the version required? Then we don't need to build it again. CHECK IT THERE!