Commit 6818f083 authored by Zakaria GUENNOUNE's avatar Zakaria GUENNOUNE
Browse files

fix debian

parent d0ac9bb9
......@@ -8,10 +8,12 @@ env.REF_BRANCH = stableBranch
if (env.BRANCH_NAME.startsWith('release-')) {
env.BUILD = 'RELEASE'
env.REPO = 'testing'
} else if (env.BRANCH_NAME == stableBranch) {
env.BUILD = 'REFERENCE'
} else if (env.BRANCH_NAME == devBranch) {
env.BUILD = 'QA'
env.REPO = 'unstable'
} else {
env.BUILD = 'CI'
}
......@@ -141,6 +143,16 @@ try {
stash name: "rpms-alma8", includes: 'output/noarch/*.rpm'
sh 'rm -rf output'
}
},
'Debian bullseye packaging and signing': {
node {
dir('centreon-widget-tactical-overview') {
checkout scm
}
sh 'docker run -i --entrypoint "/src/centreon-widget-tactical-overview/ci/scripts/widget-deb-package.sh" -w "/src" -v "$PWD:/src" -e "DISTRIB=bullseye" -e "VERSION=$VERSION" -e "RELEASE=$RELEASE" registry.centreon.com/centreon-debian11-dependencies:22.10'
stash name: 'Debian11', includes: '*.deb'
archiveArtifacts artifacts: "*.deb"
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
error('Unit tests stage failure.');
......@@ -154,6 +166,15 @@ try {
unstash 'rpms-alma8'
unstash 'rpms-centos7'
sh "./centreon-build/jobs/widgets/${serie}/widget-delivery.sh"
withCredentials([usernamePassword(credentialsId: 'nexus-credentials', passwordVariable: 'NEXUS_PASSWORD', usernameVariable: 'NEXUS_USERNAME')]) {
checkout scm
unstash "Debian11"
sh '''for i in $(echo *.deb)
do
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD -H "Content-Type: multipart/form-data" --data-binary "@./$i" https://apt.centreon.com/repository/22.04-$REPO/
done
'''
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
error('Delivery stage failure.');
......
Source: centreon-widget-tactical-overview
Section: net
Priority: optional
Maintainer: Luiz Costa <me@luizgustavo.pro.br>
Build-Depends: debhelper-compat (= 12)
Standards-Version: 4.5.0
Homepage: https://www.centreon.com
Package: centreon-widget-tactical-overview
Architecture: all
Depends: ${misc:Depends},
${shlibs:Depends},
centreon-web
Description: Add homepage with Centreon Widgets
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: centreon-widget-tactical-overview
Upstream-Contact: Luiz Costa <me@luizgustavo.pro.br>
Source: https://www.centreon.com
Files: *
Copyright: 2022 Centreon
License: Apache-2.0
Files: debian/*
Copyright: 2022 Centreon
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
tactical-overview usr/share/centreon/www/widgets
\ No newline at end of file
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
#!/bin/sh
set -ex
PROJECT="centreon-widget-tactical-overview"
if [ -z "$VERSION" -o -z "$RELEASE" -o -z "$DISTRIB" ] ; then
echo "You need to specify VERSION / RELEASE / DISTRIB variables"
exit 1
fi
echo "################################################## PACKAGING LIVE NTOPNG LISTING ##################################################"
AUTHOR="Luiz Costa"
AUTHOR_EMAIL="me@luizgustavo.pro.br"
if [ -d /build ]; then
rm -rf /build
fi
mkdir -p /build
cd /build
mkdir -p /build/$PROJECT
(cd /src && tar czvpf - $PROJECT) | dd of=$PROJECT-$VERSION.tar.gz
cp -rv /src/$PROJECT /build/
cp -rv /src/$PROJECT/ci/debian /build/$PROJECT/
ls -lart
cd /build/$PROJECT
debmake -f "${AUTHOR}" -e "${AUTHOR_EMAIL}" -u "$VERSION" -y -r "$DISTRIB"
debuild-pbuilder
cd /build
if [ -d "$DISTRIB" ] ; then
rm -rf "$DISTRIB"
fi
mkdir $DISTRIB
mv /build/*.deb $DISTRIB/
mv /build/$DISTRIB/*.deb /src
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment