Skip to content

Commit

Permalink
Add debug steps
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshitha Kamath <[email protected]>
  • Loading branch information
rakshithakamath94 committed Aug 1, 2023
1 parent 1cff6f8 commit bf8d613
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build_scripts/common/basic-gluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
GIT_REPO=$(basename "${GERRIT_PROJECT}")
GIT_URL="https://${GERRIT_HOST}/${GERRIT_PROJECT}"

BASE_PACKAGES="git bison flex cmake gcc-c++ libacl-devel krb5-devel dbus-devel rpm-build redhat-rpm-config"
BASE_PACKAGES="git bison flex cmake gcc-c++ libacl-devel krb5-devel dbus-devel rpm-build redhat-rpm-config gdb"
BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel"
if [ "${CENTOS_VERSION}" = "7" ]; then
yum -y install libgfapi-devel
Expand All @@ -80,7 +80,7 @@ else
elif [ "${CENTOS_VERSION}" = "9s" ]; then
yum install -y ${BASE_PACKAGES} libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build libgfapi-devel xfsprogs-devel
yum install --enablerepo=crb -y ${BUILDREQUIRES_EXTRA}
yum -y install selinux-policy-devel sqlite
yum -y install selinux-policy-devel sqlite samba-winbind
fi

git init "${GIT_REPO}"
Expand All @@ -103,7 +103,7 @@ else
mkdir build
pushd build

cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_GLUSTER=ON ../src
cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_GLUSTER=ON -DUSE_DBUS=ON ../src
make dist
rpmbuild -ta --define "_srcrpmdir $PWD" --define "_rpmdir $PWD" *.tar.gz
rpm_arch=$(rpm -E '%{_arch}')
Expand Down
8 changes: 6 additions & 2 deletions build_scripts/common/basic-server-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function server_run()
scp ${SSH_OPTIONS} ${2} root@${1}:./$(basename ${2})

ssh -t ${SSH_OPTIONS} root@${1} "GERRIT_HOST='${GERRIT_HOST}' GERRIT_PROJECT='${GERRIT_PROJECT}' GERRIT_REFSPEC='${GERRIT_REFSPEC}' CENTOS_VERSION='${CENTOS_VERSION}' CENTOS_ARCH='${CENTOS_ARCH}' ${VOLUME_TYPE}_VOLUME='${EXPORT}' YUM_REPO='${YUM_REPO}' ${INCLUDE_TEMPLATE_URL} ${INCLUDE_ACL_PARAM} bash ./$(basename ${2})"
RETURN_CODE=$?
#RETURN_CODE=$?

return $RETURN_CODE
#return $RETURN_CODE
}

function client_run()
Expand Down Expand Up @@ -52,11 +52,15 @@ elif [ "${SERVER_TEST_SCRIPT}" ] && [ "${CLIENT_TEST_SCRIPT}" ]; then
CLIENT_IP=$(cat $WORKSPACE/hosts | sed -n '2p')
server_run ${SERVER_IP} ${SERVER_TEST_SCRIPT}
SERVER_SCRIPT_RESULT=$?
echo "SERVER_SCRIPT_RESULT = $SERVER_SCRIPT_RESULT"
if [ "${SERVER_SCRIPT_RESULT}" == "0" ]; then
echo "Server script success!"
client_run ${CLIENT_IP} ${CLIENT_TEST_SCRIPT} ${SERVER_IP}
FINAL_RESULT=$?
else
scp root@${SERVER_IP}:/root/rpmbuild/BUILD/nfs-ganesha-5.4/CMakeFiles/CMakeOutput.log $WORKSPACE
scp root@${SERVER_IP}:/root/rpmbuild/BUILD/nfs-ganesha-5.4/CMakeFiles/CMakeError.log $WORKSPACE
ls -ltr $WORKSPACE
FINAL_RESULT=${SERVER_SCRIPT_RESULT}
fi
fi
Expand Down
1 change: 1 addition & 0 deletions jobs/code_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@
- cleanup-ws

publishers:
- archive_artifacts
- post_build_task_return-node
10 changes: 10 additions & 0 deletions jobs/macros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,13 @@
operator: OR
script:
!include-raw: ../build_scripts/common/return-node.sh

- publisher:
name: archive_artifacts
publishers:
- archive:
artifacts: '*.log'
allow-empty: true
only-if-success: false
fingerprint: true
excludes: path

0 comments on commit bf8d613

Please sign in to comment.