Skip to content

Commit

Permalink
Update the jobs fsal-cephfs, fsal-gluster and fsal-rgw
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakshitha Kamath authored and Rakshitha Kamath committed Jun 19, 2023
1 parent 19df33f commit d8d767f
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 73 deletions.
23 changes: 23 additions & 0 deletions build_scripts/build-fsal/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

echo "Hello from bootstrap.sh"

TEST_SCRIPT=${TEST_SCRIPT}

SERVER_IP=$(cat $WORKSPACE/hosts | sed -n '1p')

server_env="export CENTOS_VERSION='${CENTOS_VERSION}'"
server_env+=" CENTOS_ARCH='${CENTOS_ARCH}'"
server_env+=" GERRIT_HOST='${GERRIT_HOST}'"
server_env+=" GERRIT_PROJECT='${GERRIT_PROJECT}'"
server_env+=" GERRIT_REFSPEC='${GERRIT_REFSPEC}'"

echo $server_env > $WORKSPACE/SERVER_ENV.txt

scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$WORKSPACE/SERVER_ENV.txt" "root@${SERVER_IP}:./SERVER_ENV.txt"

ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${SERVER_IP} "tee -a ~/.bashrc < ./SERVER_ENV.txt"

scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$TEST_SCRIPT" root@${SERVER_IP}:./build.sh

ssh -tt -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${SERVER_IP} 'bash build.sh'
35 changes: 13 additions & 22 deletions build_scripts/build-fsal/build-fsal_cephfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,20 @@ GIT_REPO="https://${GERRIT_HOST}/${GERRIT_PROJECT}"
# enable the Storage SIG Gluster and Ceph repositories
yum -y install centos-release-ceph

BUILDREQUIRES="git bison cmake dbus-devel flex gcc-c++ krb5-devel libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build xfsprogs-devel python2-devel"

BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel"

# basic packages to install
xargs yum -y install <<< "
git
bison
cmake
dbus-devel
flex
gcc-c++
git
krb5-devel
libacl-devel
libblkid-devel
libcap-devel
libnfsidmap-devel
libwbclient-devel
redhat-rpm-config
rpm-build
libcephfs-devel
librgw-devel
xfsprogs-devel
python2-devel
userspace-rcu-devel
"
case "${CENTOS_VERSION}" in
7)
yum install -y ${BUILDREQUIRES} ${BUILDREQUIRES_EXTRA}
;;
8s)
yum install -y ${BUILDREQUIRES}
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA}
;;
esac

git clone --depth=1 ${GIT_REPO}
cd $(basename "${GERRIT_PROJECT}")
Expand Down
34 changes: 13 additions & 21 deletions build_scripts/build-fsal/build-fsal_gluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,20 @@ GIT_REPO="https://${GERRIT_HOST}/${GERRIT_PROJECT}"
# enable the Storage SIG Gluster and Ceph repositories
yum -y install centos-release-gluster

BUILDREQUIRES="git bison cmake dbus-devel flex gcc-c++ krb5-devel libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build libgfapi-devel xfsprogs-devel python2-devel"

BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel"

# basic packages to install
xargs yum -y install <<< "
git
bison
cmake
dbus-devel
flex
gcc-c++
git
krb5-devel
libacl-devel
libblkid-devel
libcap-devel
libnfsidmap-devel
libwbclient-devel
redhat-rpm-config
rpm-build
libgfapi-devel
xfsprogs-devel
python2-devel
userspace-rcu-devel
"
case "${CENTOS_VERSION}" in
7)
yum install -y ${BUILDREQUIRES} ${BUILDREQUIRES_EXTRA}
;;
8s)
yum install -y ${BUILDREQUIRES}
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA}
;;
esac

git clone --depth=1 ${GIT_REPO}
cd $(basename "${GERRIT_PROJECT}")
Expand Down
41 changes: 19 additions & 22 deletions build_scripts/build-fsal/build-fsal_rgw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,26 @@ GIT_REPO="https://${GERRIT_HOST}/${GERRIT_PROJECT}"
# enable the Storage SIG Gluster and Ceph repositories
yum -y install centos-release-ceph

BUILDREQUIRES="git bison cmake dbus-devel flex gcc-c++ krb5-devel libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build xfsprogs-devel python2-devel"

BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel librgw-devel"

# basic packages to install
xargs yum -y install <<< "
git
bison
cmake
dbus-devel
flex
gcc-c++
git
krb5-devel
libacl-devel
libblkid-devel
libcap-devel
libnfsidmap-devel
libwbclient-devel
redhat-rpm-config
rpm-build
libcephfs-devel
librgw-devel
xfsprogs-devel
python2-devel
userspace-rcu-devel
"
case "${CENTOS_VERSION}" in
7)
yum install -y ${BUILDREQUIRES} ${BUILDREQUIRES_EXTRA}
;;
8s)
yum install -y ${BUILDREQUIRES}
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA}
;;
*)
ENABLE_REPOS="--enablerepo=powertools"
BUILDREQUIRES="${BUILDREQUIRES} python3-devel rpcgen libtirpc-devel liburing-devel rsync "
yum -y update --skip-broken --nobest
yum -y install epel-release
;;
esac

git clone --depth=1 ${GIT_REPO}
cd $(basename "${GERRIT_PROJECT}")
Expand Down
2 changes: 1 addition & 1 deletion jobs/code_compilation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- job:
name: nfs_ganesha_code_compilation
name: code-compilation
node: cico-workspace
description: 'Run code compilation for nfs-ganesha against the latest build of Ganesha with FSAL_GLUSTER.'
project-type: freestyle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- project:
name: 'nfs-ganesha_trigger-fsal'
name: 'fsal'
product:
- cephfs
- gluster
- rgw

jobs:
- '{name}_{product}'
- '{name}-{product}'

- job-template:
name: '{name}_{product}'
name: '{name}-{product}'
node: cico-workspace
project-type: freestyle
concurrent: false
Expand All @@ -31,6 +31,11 @@
- centos_variables

builders:

- shell: !include-raw-escape: scripts/fsal-build.sh

builders:
- shell: !include-raw-escape: scripts/common/get-node.sh
- shell: !include-raw-escape: scripts/fsal-build.sh

triggers:
Expand Down
4 changes: 2 additions & 2 deletions jobs/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export BUILD_NUMBER=${BUILD_NUMBER}
if [ "$JOB_NAME" == "nfs_ganesha_dbench" ]; then
bash $WORKSPACE/ci-tests/jobs/scripts/dbench/basic-gluster-duffy.sh
RET=$?
elif [ "$JOB_NAME" == "nfs_ganesha_code_compilation" ]; then
bash $WORKSPACE/ci-tests/jobs/scripts/code_compilation/basic-gluster-duffy.sh
elif [ "$JOB_NAME" == "code-compilation" ]; then
bash $WORKSPACE/ci-tests/build_scripts/build-fsal/bootstrap.sh
RET=$?
fi

Expand Down
2 changes: 1 addition & 1 deletion jobs/scripts/common/get-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ do
fi
done

if [ "$JOB_NAME" == "nfs-ganesha_trigger-fsal_cephfs" ] || [ "$JOB_NAME" == "nfs-ganesha_trigger-fsal_gluster" ] || [ "$JOB_NAME" == "nfs-ganesha_trigger-fsal_rgw" ]; then
if [[ $JOB_NAME =~ fsal-* ]]; then
node_count=1
else
node_count=2
Expand Down
2 changes: 1 addition & 1 deletion jobs/scripts/fsal-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set +x
set +e

# run the bootstrap script
python $WORKSPACE/ci-tests/build_scripts/common/bootstrap.py
bash $WORKSPACE/ci-tests/build_scripts/build-fsal/bootstrap.sh
RET=$?

# we accept different return values
Expand Down

0 comments on commit d8d767f

Please sign in to comment.