Merge pull request #108 from centreon/normalize_version

Normalize VERSION variable to Debian format
This commit is contained in:
Luiz Costa 2022-05-17 12:47:27 +01:00 committed by GitHub
commit ededb07c70
2 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,7 @@ try {
dir('centreon-vmware') {
checkout scm
}
sh 'docker run -i --entrypoint "/src/centreon-vmware/ci/scripts/vmware-deb-package.sh" -w "/src" -v "$PWD:/src" -e "DISTRIB=Debian11" -e "VERSION=$VERSION" -e "RELEASE=$RELEASE" registry.centreon.com/centreon-debian11-dependencies:22.04'
sh 'docker run -i --entrypoint "/src/centreon-vmware/ci/scripts/vmware-deb-package.sh" -w "/src" -v "$PWD:/src" -e "DISTRIB=bullseye" -e "VERSION=$VERSION" -e "RELEASE=$RELEASE" registry.centreon.com/centreon-debian11-dependencies:22.04'
stash name: 'Debian11', includes: '*.deb'
archiveArtifacts artifacts: "*"
}

View File

@ -16,6 +16,10 @@ if [ -d /build ]; then
fi
mkdir -p /build
cd /build
# fix version to debian format accept
VERSION="$(echo $VERSION | sed 's/-/./g')"
cp -rv /src/centreon-vmware /build/
mv -v /build/centreon-vmware /build/centreon-plugin-virtualization-vmware-daemon
(cd /build && tar czvpf - centreon-plugin-virtualization-vmware-daemon) | dd of=centreon-plugin-virtualization-vmware-daemon-$VERSION.tar.gz
@ -23,7 +27,7 @@ cp -rv /src/centreon-vmware/ci/debian /build/centreon-plugin-virtualization-vmwa
ls -lart
cd /build/centreon-plugin-virtualization-vmware-daemon
debmake -f "${AUTHOR}" -e "${AUTHOR_EMAIL}" -u "$VERSION" -y -r "$RELEASE"
debmake -f "${AUTHOR}" -e "${AUTHOR_EMAIL}" -u "$VERSION" -y -r "$DISTRIB"
debuild-pbuilder
cd /build