Merge pull request #101 from centreon/debian_jenkins
Add configuration to build DEB packages
This commit is contained in:
commit
1967989e08
|
@ -27,14 +27,24 @@ try {
|
|||
sh 'rm -rf output'
|
||||
}
|
||||
},
|
||||
'centos8': {
|
||||
'alma8': {
|
||||
node {
|
||||
sh 'setup_centreon_build.sh'
|
||||
sh './centreon-build/jobs/vmware/vmware-package.sh centos8'
|
||||
archiveArtifacts artifacts: 'rpms-centos8.tar.gz'
|
||||
stash name: "rpms-centos8", includes: 'output/noarch/*.rpm'
|
||||
sh './centreon-build/jobs/vmware/vmware-package.sh alma8'
|
||||
archiveArtifacts artifacts: 'rpms-alma8.tar.gz'
|
||||
stash name: "rpms-alma8", includes: 'output/noarch/*.rpm'
|
||||
sh 'rm -rf output'
|
||||
}
|
||||
},
|
||||
'Debian bullseye packaging and signing': {
|
||||
node {
|
||||
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'
|
||||
stash name: 'Debian11', includes: '*.deb'
|
||||
archiveArtifacts artifacts: "*"
|
||||
}
|
||||
}
|
||||
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
|
||||
error('Package stage failure.');
|
||||
|
@ -44,8 +54,17 @@ try {
|
|||
node {
|
||||
sh 'setup_centreon_build.sh'
|
||||
unstash "rpms-centos7"
|
||||
unstash "rpms-centos8"
|
||||
unstash "rpms-alma8"
|
||||
sh './centreon-build/jobs/vmware/vmware-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-unstable/
|
||||
done
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
centreon_vmware.pl usr/bin
|
||||
debian/contrib/centreon_vmware lib/systemd/system
|
||||
debian/contrib/centreon_vmware.pm etc/centreon
|
||||
centreon/* usr/share/perl5/centreon
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "configure" ] ; then
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable centreon_vmware.service
|
||||
systemctl restart centreon_vmware.service
|
||||
|
||||
fi
|
||||
exit 0
|
|
@ -0,0 +1 @@
|
|||
../../../contrib/debian/centreon_vmware-systemd
|
|
@ -0,0 +1 @@
|
|||
../../../contrib/config/centreon_vmware-conf.pm
|
|
@ -0,0 +1,18 @@
|
|||
Source: centreon-plugin-virtualization-vmware-daemon
|
||||
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-plugin-virtualization-vmware-daemon
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
libio-socket-inet6-perl,
|
||||
libjson-xs-perl,
|
||||
liblwp-protocol-https-perl,
|
||||
libzmq-constants-perl,
|
||||
zmq-libzmq4-perl
|
||||
Description: Perl daemon to monitor VSphere Infrastructure
|
|
@ -0,0 +1,29 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: centreon-plugin-virtualization-vmware-daemon
|
||||
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".
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh $@
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
if [ -z "$VERSION" -o -z "$RELEASE" -o -z "$DISTRIB" ] ; then
|
||||
echo "You need to specify VERSION / RELEASE / DISTRIB variables"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "################################################## PACKAGING COLLECT ##################################################"
|
||||
|
||||
AUTHOR="Luiz Costa"
|
||||
AUTHOR_EMAIL="me@luizgustavo.pro.br"
|
||||
|
||||
if [ -d /build ]; then
|
||||
rm -rf /build
|
||||
fi
|
||||
mkdir -p /build
|
||||
cd /build
|
||||
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
|
||||
cp -rv /src/centreon-vmware/ci/debian /build/centreon-plugin-virtualization-vmware-daemon/
|
||||
|
||||
ls -lart
|
||||
cd /build/centreon-plugin-virtualization-vmware-daemon
|
||||
debmake -f "${AUTHOR}" -e "${AUTHOR_EMAIL}" -u "$VERSION" -y -r "$RELEASE"
|
||||
debuild-pbuilder
|
||||
cd /build
|
||||
|
||||
if [ -d "$DISTRIB" ] ; then
|
||||
rm -rf "$DISTRIB"
|
||||
fi
|
||||
mkdir $DISTRIB
|
||||
mv /build/*.deb $DISTRIB/
|
||||
mv /build/$DISTRIB/*.deb /src
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
BULLSEYEPACKAGES=`echo *.deb`
|
||||
|
||||
for i in $BULLSEYEPACKAGES
|
||||
do
|
||||
echo "Sending $i"
|
||||
curl -u \'$1:$2\' -H "Content-Type: multipart/form-data" --data-binary \"@/$i\" "https://apt.centreon.com/repository/22.04"
|
||||
done
|
Loading…
Reference in New Issue