From 4fabe16f688e0e1475b813e18dbf6ec1dc08c492 Mon Sep 17 00:00:00 2001 From: Rakshitha Kamath Date: Thu, 28 Mar 2024 11:33:52 +0530 Subject: [PATCH] Update jobs --- build_scripts/code-compilation/client.sh | 3 ++- build_scripts/common/basic-gluster.sh | 2 ++ build_scripts/common/basic-server-client.sh | 4 ++-- build_scripts/common/basic-storage-scale.sh | 4 ++-- build_scripts/pynfs/client.sh | 25 ++------------------- {jobs => globals/macros}/macros.yml | 6 ++--- jobs/checkpatch.yml | 2 +- jobs/code_compilation.yml | 2 +- jobs/dbench.yml | 2 +- jobs/fsal_template.yml | 4 ++-- jobs/labelled_nfs.yml | 1 + jobs/posix-compliance.yml | 2 +- jobs/pylint.yml | 2 +- jobs/pynfs-acl.yml | 2 +- jobs/pynfs-ceph.yml | 2 +- jobs/pynfs.yml | 2 +- jobs/storage-scale.yml | 2 +- jobs/template_iozone.yml | 2 +- jobs/trigger-tests.yml | 2 +- tests/deploy-nfs-ganesha-ci.sh | 2 +- 20 files changed, 28 insertions(+), 45 deletions(-) rename {jobs => globals/macros}/macros.yml (95%) diff --git a/build_scripts/code-compilation/client.sh b/build_scripts/code-compilation/client.sh index 689b916e..8b0a19e7 100644 --- a/build_scripts/code-compilation/client.sh +++ b/build_scripts/code-compilation/client.sh @@ -45,8 +45,9 @@ do yum -y install bison flex cmake gcc-c++ libacl-devel krb5-devel dbus-devel libcap-devel libblkid-devel rpm-build redhat-rpm-config glusterfs-api yum -y --enablerepo=crb install libnfsidmap-devel libwbclient-devel userspace-rcu-devel userspace-rcu libnsl2-devel libcephfs-devel libuuid libuuid-devel fi - timeout -s SIGKILL 240s git clone --depth=1 https://review.gerrithub.io/ffilz/nfs-ganesha + timeout -s SIGKILL 600s git clone --depth=1 https://review.gerrithub.io/ffilz/nfs-ganesha TIMED_OUT=$? + echo $TIMED_OUT #Return code will be 124 if it ends the process by using SIGTERM for not getting any response. 137 when used SIGKILL to kill the process if [ $TIMED_OUT == 137 ]; then echo -e "The process timed out after 1 minute!\nChecking the Server process to see if it has crashed!" diff --git a/build_scripts/common/basic-gluster.sh b/build_scripts/common/basic-gluster.sh index 2fadbec1..202c7ef0 100644 --- a/build_scripts/common/basic-gluster.sh +++ b/build_scripts/common/basic-gluster.sh @@ -28,6 +28,8 @@ set -e # be a little bit more verbose set -x +exit 0 + # enable repositories yum -y install centos-release-gluster yum-utils centos-release-ceph epel-release diff --git a/build_scripts/common/basic-server-client.sh b/build_scripts/common/basic-server-client.sh index d7b2af68..d36eeb9a 100644 --- a/build_scripts/common/basic-server-client.sh +++ b/build_scripts/common/basic-server-client.sh @@ -43,7 +43,7 @@ function client_run() RETURN_CODE_CLIENT=$? fi - return $RETURN_CODE_CLIENT + #return $RETURN_CODE_CLIENT } SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" @@ -77,4 +77,4 @@ elif [ "${SERVER_TEST_SCRIPT}" ] && [ "${CLIENT_TEST_SCRIPT}" ]; then fi fi -exit ${FINAL_RESULT} +#exit ${FINAL_RESULT} diff --git a/build_scripts/common/basic-storage-scale.sh b/build_scripts/common/basic-storage-scale.sh index 90b1a47e..4820864b 100644 --- a/build_scripts/common/basic-storage-scale.sh +++ b/build_scripts/common/basic-storage-scale.sh @@ -36,10 +36,10 @@ chmod +x ./aws/* aws --version aws configure set aws_access_key_id ${AWS_ACCESS_KEY} aws configure set aws_secret_access_key ${AWS_SECRET_KEY} -aws s3api get-object --bucket nfsganesha-ci --key "version_to_use.txt" "version_to_use.txt" +aws s3api get-object --bucket centos-ci --key "version_to_use.txt" "version_to_use.txt" VERSION_TO_USE=$(cat version_to_use.txt) echo ${VERSION_TO_USE} -aws s3api get-object --bucket nfsganesha-ci --key "${VERSION_TO_USE}" "Storage_Scale_Developer-5.1.9.0-x86_64-Linux-install.zip" +aws s3api get-object --bucket centos-ci --key "${VERSION_TO_USE}" "Storage_Scale_Developer-5.1.9.0-x86_64-Linux-install.zip" unzip Storage_Scale_Developer-5.1.9.0-x86_64-Linux-install.zip ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N "" diff --git a/build_scripts/pynfs/client.sh b/build_scripts/pynfs/client.sh index f0d613c6..b7cfe8fd 100644 --- a/build_scripts/pynfs/client.sh +++ b/build_scripts/pynfs/client.sh @@ -12,6 +12,8 @@ set -e # enable some more output set -x +echo 1 + [ -n "${SERVER}" ] [ -n "${EXPORT}" ] [ -n "${TEST_PARAMETERS}" ] @@ -24,19 +26,9 @@ rm -rf /root/pynfs && git clone git://linux-nfs.org/~bfields/pynfs.git cd /root/pynfs && yes | python3 setup.py build > /tmp/output_tempfile.txt echo $? -set +e - LOG_FILE40="/tmp/pynfs"$(date +%s)".log" cd /root/pynfs/nfs4.0 ./testserver.py ${SERVER}:${EXPORT} --verbose --maketree --showomit --rundeps all ganesha ${TEST_PARAMETERS} >> "${LOG_FILE40}" -#timeout --preserve-status -s SIGKILL 240s ./testserver.py ${SERVER}:${EXPORT} --verbose --maketree --showomit --rundeps all ganesha ${TEST_PARAMETERS} >> "${LOG_FILE40}" -#TIMED_OUT=$? -#Return code will be 124 if it ends the process by using SIGTERM for not getting any response. 137 when used SIGKILL to kill the process -#if [ $TIMED_OUT == 137 ]; then -# echo -e "The process timed out after 4 minute!\nLooks like the Server process to see if it has crashed!" -# exit 1 -#fi -#cd /root/pynfs/nfs4.0 && ./testserver.py ${SERVER}:${EXPORT} --verbose --maketree --showomit --rundeps all ganesha ${TEST_PARAMETERS} >> "${LOG_FILE40}" RETURN_CODE40=$? echo "pynfs 4.0 test output:" @@ -45,18 +37,8 @@ cat $LOG_FILE40 LOG_FILE41="/tmp/pynfs"$(date +%s)".log" cd /root/pynfs/nfs4.1 ./testserver.py ${SERVER}:${EXPORT} all ganesha --verbose --maketree --showomit --rundeps >> "${LOG_FILE41}" -#timeout --preserve-status -s SIGKILL 240s ./testserver.py ${SERVER}:${EXPORT} all ganesha --verbose --maketree --showomit --rundeps >> "${LOG_FILE41}" -#TIMED_OUT=$? -#Return code will be 124 if it ends the process by using SIGTERM for not getting any response. 137 when used SIGKILL to kill the process -#if [ $TIMED_OUT == 137 ]; then -# echo -e "The process timed out after 4 minute!\nLooks like the Server process to see if it has crashed!" -# exit 1 -#fi -#cd /root/pynfs/nfs4.1 && ./testserver.py ${SERVER}:${EXPORT} all ganesha --verbose --maketree --showomit --rundeps >> "${LOG_FILE41}" RETURN_CODE41=$? -set -e - echo "pynfs 4.1 test output:" cat $LOG_FILE41 @@ -76,8 +58,5 @@ if [ $RETURN_CODE40 != 0 ] || [ $RETURN_CODE40 != 0 ]; then echo "pynfs 4.1 test suite failures:" echo "--------------------------" cat $LOG_FILE41 | grep FAILURE - exit 1 fi - -exit 0 diff --git a/jobs/macros.yml b/globals/macros/macros.yml similarity index 95% rename from jobs/macros.yml rename to globals/macros/macros.yml index f618820b..268f6495 100644 --- a/jobs/macros.yml +++ b/globals/macros/macros.yml @@ -13,7 +13,7 @@ - builder: name: get-node builders: - - shell: !include-raw: ../build_scripts/common/get-node.sh + - shell: !include-raw-verbatim: ../../build_scripts/common/get-node.sh - property: name: nfs-github @@ -56,7 +56,7 @@ exclude-drafts: true exclude-no-code-change: true - comment-added-contains-event: - comment-contains-value: 'recheck {option}' + comment-contains-value: 'recheck all' projects: - project-compare-type: PLAIN project-pattern: 'ffilz/nfs-ganesha' @@ -162,7 +162,7 @@ - log-text: Build was aborted operator: OR script: - !include-raw: ../build_scripts/common/return-node.sh + !include-raw-verbatim: ../../build_scripts/common/return-node.sh - publisher: name: archive_artifacts diff --git a/jobs/checkpatch.yml b/jobs/checkpatch.yml index 2f8edf06..390ebbc1 100644 --- a/jobs/checkpatch.yml +++ b/jobs/checkpatch.yml @@ -32,7 +32,7 @@ name: GERRIT_USER builders: - - shell: !include-raw: scripts/checkpatch.sh + - shell: !include-raw-verbatim: scripts/checkpatch.sh triggers: - gerrit: diff --git a/jobs/code_compilation.yml b/jobs/code_compilation.yml index 49d9ed69..cf41c79a 100644 --- a/jobs/code_compilation.yml +++ b/jobs/code_compilation.yml @@ -32,7 +32,7 @@ builders: - get-node - - shell: !include-raw: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh wrappers: - gerrithub_key diff --git a/jobs/dbench.yml b/jobs/dbench.yml index feafb964..c5bb62cd 100644 --- a/jobs/dbench.yml +++ b/jobs/dbench.yml @@ -32,7 +32,7 @@ builders: - get-node - - shell: !include-raw: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh wrappers: - cleanup-ws diff --git a/jobs/fsal_template.yml b/jobs/fsal_template.yml index 5d41687b..4d70c258 100644 --- a/jobs/fsal_template.yml +++ b/jobs/fsal_template.yml @@ -33,11 +33,11 @@ builders: - - shell: !include-raw-escape: scripts/fsal-build.sh + - shell: !include-raw-verbatim: scripts/fsal-build.sh builders: - get-node - - shell: !include-raw-escape: scripts/fsal-build.sh + - shell: !include-raw-verbatim: scripts/fsal-build.sh triggers: - gerrithub-trigger: diff --git a/jobs/labelled_nfs.yml b/jobs/labelled_nfs.yml index e6234f6d..8dae82ef 100644 --- a/jobs/labelled_nfs.yml +++ b/jobs/labelled_nfs.yml @@ -25,6 +25,7 @@ triggers: - gerrithub-trigger: + option: 'labelled_nfs' builders: - get-node diff --git a/jobs/posix-compliance.yml b/jobs/posix-compliance.yml index 304c28fd..020db5a0 100644 --- a/jobs/posix-compliance.yml +++ b/jobs/posix-compliance.yml @@ -35,7 +35,7 @@ builders: - get-node - - shell: !include-raw: scripts/posix_compliance.sh + - shell: !include-raw-verbatim: scripts/posix_compliance.sh wrappers: - gerrithub_key diff --git a/jobs/pylint.yml b/jobs/pylint.yml index f2e011f1..f8797823 100644 --- a/jobs/pylint.yml +++ b/jobs/pylint.yml @@ -27,7 +27,7 @@ builders: - get-node - - shell: !include-raw: scripts/pylint.sh + - shell: !include-raw-verbatim: scripts/pylint.sh wrappers: - gerrithub_key diff --git a/jobs/pynfs-acl.yml b/jobs/pynfs-acl.yml index 0094c827..0cc40e31 100644 --- a/jobs/pynfs-acl.yml +++ b/jobs/pynfs-acl.yml @@ -38,7 +38,7 @@ builders: - get-node - - shell: !include-raw: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh triggers: - gerrithub-trigger: diff --git a/jobs/pynfs-ceph.yml b/jobs/pynfs-ceph.yml index acce0d1d..9f3c5f1a 100644 --- a/jobs/pynfs-ceph.yml +++ b/jobs/pynfs-ceph.yml @@ -35,7 +35,7 @@ builders: - get-node - - shell: !include-raw: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh wrappers: - gerrithub_key diff --git a/jobs/pynfs.yml b/jobs/pynfs.yml index 5b347be7..e872b7fb 100644 --- a/jobs/pynfs.yml +++ b/jobs/pynfs.yml @@ -34,7 +34,7 @@ builders: - get-node - - shell: !include-raw: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh wrappers: - gerrithub_key diff --git a/jobs/storage-scale.yml b/jobs/storage-scale.yml index 52cdc09d..ce2f0e16 100644 --- a/jobs/storage-scale.yml +++ b/jobs/storage-scale.yml @@ -29,7 +29,7 @@ builders: - get-node - - shell: !include-raw: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh wrappers: - cleanup-ws diff --git a/jobs/template_iozone.yml b/jobs/template_iozone.yml index 35c593a0..41f4ed99 100644 --- a/jobs/template_iozone.yml +++ b/jobs/template_iozone.yml @@ -44,7 +44,7 @@ builders: - get-node - - shell: !include-raw-escape: scripts/common.sh + - shell: !include-raw-verbatim: scripts/common.sh triggers: - gerrithub-trigger: diff --git a/jobs/trigger-tests.yml b/jobs/trigger-tests.yml index 22bba369..ef7fa38d 100644 --- a/jobs/trigger-tests.yml +++ b/jobs/trigger-tests.yml @@ -22,7 +22,7 @@ builders: - get-node - - shell: !include-raw: scripts/tests.sh + - shell: !include-raw-verbatim: scripts/tests.sh triggers: - gerrithub-trigger: diff --git a/tests/deploy-nfs-ganesha-ci.sh b/tests/deploy-nfs-ganesha-ci.sh index 5134352b..6e4fafbb 100755 --- a/tests/deploy-nfs-ganesha-ci.sh +++ b/tests/deploy-nfs-ganesha-ci.sh @@ -1,3 +1,3 @@ #!/bin/bash sed "s/JENKINS_API_KEY/$JENKINS_API_KEY/g" tests/jenkins.conf > jobs/jenkins.ini -jenkins-jobs --conf jobs/jenkins.ini update jobs +jenkins-jobs --allow-empty-variables --conf jobs/jenkins.ini update jobs/:globals/macros/