diff --git a/.github/actions/get-packages/action.yml b/.github/actions/get-packages/action.yml index 786c41a42a0..ff3327071ff 100644 --- a/.github/actions/get-packages/action.yml +++ b/.github/actions/get-packages/action.yml @@ -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 diff --git a/.github/workflows/robot-nightly.yml b/.github/workflows/robot-nightly.yml index 60a5345496a..d867e4e0460 100644 --- a/.github/workflows/robot-nightly.yml +++ b/.github/workflows/robot-nightly.yml @@ -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 @@ -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 @@ -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 diff --git a/ci/docker/Dockerfile.collect-alma8 b/ci/docker/Dockerfile.collect-alma8 index 793428839d0..73cc9ab8ea8 100644 --- a/ci/docker/Dockerfile.collect-alma8 +++ b/ci/docker/Dockerfile.collect-alma8 @@ -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 \ @@ -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 diff --git a/ci/scripts/collect-test-robot.sh b/ci/scripts/collect-test-robot.sh index e9656c0a080..e4b2d060fa2 100755 --- a/ci/scripts/collect-test-robot.sh +++ b/ci/scripts/collect-test-robot.sh @@ -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