Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mon 16454 add alma 8 to centreon collect nightly tests 2110 (#506) #521

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/actions/get-packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,24 @@ runs:
esac
FILES="centreon-broker centreon-broker-cbd centreon-broker-cbmod centreon-broker-core centreon-broker-storage centreon-clib centreon-collect centreon-collect-client centreon-connector centreon-connector-perl centreon-connector-ssh centreon-engine centreon-engine-daemon centreon-engine-extcommands"
FULL_VERSION="${{ inputs.version }}.${{ inputs.patch }}"
#RELEASE="1668587986.332470bb4948f05263630f26f7b507c9e388ed98"
RELEASE="${{ inputs.release }}"

echo "[DEBUG] - FULL_VERSION: $FULL_VERSION"
echo "[DEBUG] - RELEASE: $RELEASE"

# Obtain latest version.patch-release
PKG_DIR_VERSION=$(curl -s "https://yum.centreon.com/standard/23.04/el7/unstable/x86_64/centreon-collect/" | sed -En 's/.*([2-9][0-9]\.[0-9][0-9]\.[[:digit:]]+-[[:digit:]]+\.[[a-z0-9]{7}).*/\1/p')

echo "[DEBUG] - PKG_DIR_VERSION: $PKG_DIR_VERSION"

# Fetch files from repo
for FILE in $FILES ; do
if [[ "${{ env.extfile }}" == "deb" ]] ; then
echo "[DEBUG] - https://artifactory.apps.centreon.com/artifactory/debian-$VERSION-$REPO/pool/$FILE;deb.distribution=bullseye;deb.component=main;deb.architecture=amd64"
curl -v -u "${{ inputs.repos_username }}":"${{ inputs.repos_password }}" -X PUT "https://artifactory.apps.centreon.com/artifactory/debian-$VERSION-$REPO/pool/$FILE;deb.distribution=bullseye;deb.component=main;deb.architecture=amd64" -T "./$FILE"
else
echo "[DEBUG] - https://artifactory.apps.centreon.com/artifactory/rpm-${{ inputs.version }}-$REPO/${{ inputs.distrib }}/$REPO/x86_64/centreon-collect/$FILE-$FULL_VERSION-$RELEASE.${{ inputs.distrib }}.x86_64.rpm"
curl -v -u "${{ inputs.repos_username }}":"${{ inputs.repos_password }}" -O "https://artifactory.apps.centreon.com/artifactory/rpm-${{ inputs.version }}-$REPO/${{ inputs.distrib }}/$REPO/x86_64/centreon-collect/$FILE-$FULL_VERSION-$RELEASE.${{ inputs.distrib }}.x86_64.rpm"
echo "[DEBUG] - https://yum.centreon.com/standard/${{ inputs.version }}/${{ inputs.distrib }}/$REPO/x86_64/centreon-collect/$PKG_DIR_VERSION/$FILE-$PKG_DIR_VERSION.${{ inputs.distrib }}.x86_64.rpm"
curl -s -JO "https://yum.centreon.com/standard/${{ inputs.version }}/${{ inputs.distrib }}/$REPO/x86_64/centreon-collect/centreon-collect-$PKG_DIR_VERSION/$FILE-$PKG_DIR_VERSION.${{ inputs.distrib }}.x86_64.rpm"
fi
done

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/robot-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- image: centreon-collect-centos7
distrib: el7
folder_report: tests/
- image: centreon-collect-alma8
distrib: el8
folder_report: tests/
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -44,7 +47,8 @@ jobs:
echo "release=$GITHUB_RUN_ATTEMPT" >> $GITHUB_ENV
;;
*)
echo "release=${{ github.sha }}" >> $GITHUB_ENV
echo "release=`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_OUTPUT
echo "release=`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_ENV
;;
esac
shell: bash
Expand All @@ -67,7 +71,7 @@ jobs:
username: ${{ secrets.REPOS_USERNAME }}
password: ${{ secrets.REPOS_PASSWORD }}

- name: Test robot Centos7
- name: Tests robot (Centos7, Alma8)
uses: ./.github/actions/runner-docker
with:
script_name: /src/ci/scripts/collect-test-robot
Expand Down
7 changes: 6 additions & 1 deletion ci/docker/Dockerfile.collect-alma8
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ RUN dnf config-manager --set-enabled powertools
RUN curl -o centreon-release.rpm "http://yum-1.centreon.com/standard/21.10/el8/stable/noarch/RPMS/centreon-release-21.10-1.el8.noarch.rpm"
RUN dnf install --nogpgcheck centreon-release.rpm
RUN dnf config-manager --set-enabled 'centreon-testing*'
RUN curl -LsS "https://r.mariadb.com/downloads/mariadb_repo_setup" | bash -s -- --os-type=rhel --os-version=8 --mariadb-server-version="mariadb-10.5"
RUN dnf clean all && dnf install -y cmake \
gcc \
gcc-c++ \
gettext \
git \
MariaDB-devel \
MariaDB-shared \
MariaDB-client \
MariaDB-compat \
MariaDB-common \
MariaDB-server \
gnutls-devel \
libgcrypt-devel \
libssh2-devel \
Expand All @@ -31,7 +37,6 @@ RUN dnf clean all && dnf install -y cmake \
rpm-build \
rrdtool-devel \
yum-utils \
MariaDB-shared \
perl \
rpm-build
RUN dnf update libarchive
Expand Down
23 changes: 20 additions & 3 deletions ci/scripts/collect-test-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,26 @@ echo "########################### Install Robot Framework ######################
cd /src/tests/
pip3 install -U robotframework robotframework-databaselibrary pymysql python-dateutil

yum install "Development Tools" python3-devel -y

pip3 install grpcio==1.33.2 grpcio_tools==1.33.2
yum groupinstall "Development Tools" -y
yum install python3-devel -y

# Get OS version id
VERSION_ID=$(grep '^VERSION_ID' /etc/os-release | sed -En 's/^VERSION_ID="([[:digit:]])\.[[:digit:]]"/\1/p')

# Force version for el7 only
if [ -f /etc/os-release ]; then
case "$VERSION_ID" in
7)
pip3 install grpcio==1.33.2 grpcio_tools==1.33.2
;;
8)
pip3 install grpcio grpcio_tools
;;
*)
echo "OS Version is neither 7 or 8"
;;
esac
fi

./init-proto.sh

Expand Down