Skip to content

Commit

Permalink
[debian] Packaging and testing for debian pkgs
Browse files Browse the repository at this point in the history
Initial start of building and testing the deb package

This will improve the overall testing of sos over the
Ubuntu releases, and also helps with the basis of then
adding further stagetwo testing in the future. This will
help to pick up issues automatically rather than the
manual testing.

Co-authored-by: Nikhil Kshirsagar <[email protected]>
Signed-off-by: Nikhil Kshirsagar <[email protected]>
Signed-off-by: Arif Ali <[email protected]>
  • Loading branch information
arif-ali and nkshirsagar committed Nov 7, 2023
1 parent b7a0aff commit 9a1d1b2
Show file tree
Hide file tree
Showing 14 changed files with 1,378 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,25 @@ rpm_build_task:
path: ./sos_${BUILD_NAME}.rpm
type: application/octet-stream

# Make sure a user can manually build a snap from the checkout
deb_build_task:
alias: "deb_build"
name: "deb Build From Checkout"
gce_instance:
image_project: "${UBUNTU_PROJECT}"
image_name: "${UBUNTU_IMAGE_NAME}"
type: e2-medium
setup_script: |
apt update
apt -y install devscripts dh-python python3-nose python3-pip
pip3 install avocado-framework==94.0
main_script: |
[email protected] dch -v "$(git describe --tags --always)" "Cirrus Testing"
dpkg-buildpackage -b -us -uc -rfakeroot -m --build-by="[email protected]"
prep_artifacts_script: mv ../*.deb ./sos_cirrus.deb
packages_artifacts:
path: ./sos_cirrus.deb

# Make sure a user can manually build a snap from the checkout
snap_build_task:
alias: "snap_build"
Expand Down Expand Up @@ -146,6 +165,7 @@ report_stageone_task:
depends_on:
- rpm_build
- snap_build
- deb_build
gce_instance: *standardvm
matrix:
- env: *centos9
Expand All @@ -156,24 +176,36 @@ report_stageone_task:
PROJECT: ${UBUNTU_PROJECT}
BUILD_NAME: ${UBUNTU_NAME}
VM_IMAGE_NAME: ${UBUNTU_IMAGE_NAME}
PKG: "snap"
- env: &ubuntuprior
PROJECT: ${UBUNTU_PROJECT}
BUILD_NAME: ${UBUNTU_PRIOR_NAME}
VM_IMAGE_NAME: ${UBUNTU_PRIOR_IMAGE_NAME}
PKG: "snap"
- env: &ubuntuprior2
PROJECT: ${UBUNTU_PROJECT}
BUILD_NAME: ${UBUNTU_PRIOR2_NAME}
VM_IMAGE_NAME: ${UBUNTU_PRIOR2_IMAGE_NAME}
PKG: "snap"
- env: &ubuntu-deb
<<: *ubuntu
PKG: "deb"
setup_script: &setup |
if [ $(command -v apt) ]; then
echo "$ARTCURL/snap%20Build%20From%20Checkout/packages/sosreport_test_amd64.snap"
$ARTCURL/snap%20Build%20From%20Checkout/packages/sosreport_test_amd64.snap
apt -y purge sosreport
apt update --allow-releaseinfo-change
apt -y install python3-pip snapd
systemctl start snapd
snap install ./sosreport_test_amd64.snap --classic --dangerous
snap alias sosreport.sos sos
if [ ${PKG} == "snap" ] ; then
echo "$ARTCURL/snap%20Build%20From%20Checkout/packages/sosreport_test_amd64.snap"
$ARTCURL/snap%20Build%20From%20Checkout/packages/sosreport_test_amd64.snap
systemctl start snapd
snap install ./sosreport_test_amd64.snap --classic --dangerous
snap alias sosreport.sos sos
elif [ ${PKG} == "deb" ]; then
echo "$ARTCURL/deb%20Build%20From%20Checkout/packages/sos_cirrus.deb"
$ARTCURL/deb%20Build%20From%20Checkout/packages/sos_cirrus.deb
apt -y install ./sos_cirrus.deb
fi
fi
if [ $(command -v dnf) ]; then
echo "$ARTCURL/rpm%20Build%20From%20Checkout%20-%20${BUILD_NAME}/packages/sos_${BUILD_NAME}.rpm"
Expand Down Expand Up @@ -205,6 +237,7 @@ report_stagetwo_task:
- env: *centos8
- env: *fedora
- env: *ubuntu
- env: *ubuntu-deb
setup_script: *setup
install_pexpect_script: |
if [ $(command -v apt) ]; then
Expand Down
Loading

0 comments on commit 9a1d1b2

Please sign in to comment.