diff options
-rw-r--r-- | build-gluster-org/jobs/abandon-review.yml | 36 | ||||
-rw-r--r-- | build-gluster-org/jobs/bugzilla-post.yml | 48 | ||||
-rw-r--r-- | build-gluster-org/jobs/centos8-regression.yml | 58 | ||||
-rw-r--r-- | build-gluster-org/jobs/clang.yml | 2 | ||||
-rw-r--r-- | build-gluster-org/jobs/experimental-periodic.yml | 43 | ||||
-rw-r--r-- | build-gluster-org/jobs/planet.yml | 35 | ||||
-rw-r--r-- | build-gluster-org/jobs/regression-on-demand-multiplex.yml | 4 | ||||
-rw-r--r-- | build-gluster-org/jobs/restore-review.yml | 36 | ||||
-rw-r--r-- | build-gluster-org/jobs/smoke.yml | 2 | ||||
-rw-r--r-- | build-gluster-org/jobs/untriaged-bugs.yml | 26 | ||||
-rw-r--r-- | build-gluster-org/scripts/32-bit-build-smoke.sh | 2 | ||||
-rw-r--r-- | build-gluster-org/scripts/bugzilla-post.sh | 73 | ||||
-rw-r--r-- | build-gluster-org/scripts/build-jobs.sh | 1 | ||||
-rw-r--r-- | build-gluster-org/scripts/planet.sh | 18 | ||||
-rw-r--r-- | build-gluster-org/scripts/regression-test-burn-in.sh | 2 | ||||
-rw-r--r-- | build-gluster-org/scripts/untriaged-bugs.sh | 5 |
16 files changed, 120 insertions, 271 deletions
diff --git a/build-gluster-org/jobs/abandon-review.yml b/build-gluster-org/jobs/abandon-review.yml deleted file mode 100644 index 016a9e6..0000000 --- a/build-gluster-org/jobs/abandon-review.yml +++ /dev/null @@ -1,36 +0,0 @@ -- job: - name: abandon-review - node: bugzilla - description: Update bugs when a review is abandoned - project-type: freestyle - - scm: - - glusterfs - - triggers: - - gerrit: - trigger-on: - - change-abandoned-event - server-name: review.gluster.org - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'glusterfs' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - - parameters: - - string: - default: refs/heads/master - description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' - name: GERRIT_REFSPEC - - string: - default: master - description: 'Name of the branch you want to build from. We usually build from master' - name: GERRIT_BRANCH - - builders: - - shell: /opt/qa/github/handle_bugzilla.py --abandon - - wrappers: - - timestamps diff --git a/build-gluster-org/jobs/bugzilla-post.yml b/build-gluster-org/jobs/bugzilla-post.yml deleted file mode 100644 index 1a9025e..0000000 --- a/build-gluster-org/jobs/bugzilla-post.yml +++ /dev/null @@ -1,48 +0,0 @@ -- job: - name: bugzilla-post - node: bugzilla - description: Reporting the status of bugs on Bugzilla - project-type: freestyle - - scm: - - glusterfs - - triggers: - - gerrit: - trigger-on: - - patchset-created-event: - exclude-drafts: false - exclude-trivial-rebase: false - exclude-no-code-change: false - - change-merged-event - server-name: review.gluster.org_for-smoke-jobs - override-votes: 1 - gerrit-build-failed-verified-value: 0 - gerrit-build-unstable-verified-value: 0 - gerrit-build-notbuilt-verified-value: 0 - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'glusterfs' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - - parameters: - - string: - default: refs/heads/master - description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' - name: GERRIT_REFSPEC - - string: - default: master - description: 'Name of the branch you want to build from. We usually build from master' - name: GERRIT_BRANCH - - builders: - - shell: /opt/qa/github/handle_bugzilla.py - - wrappers: - - timestamps - - timeout: - timeout: 30 - abort: true - type: absolute diff --git a/build-gluster-org/jobs/centos8-regression.yml b/build-gluster-org/jobs/centos8-regression.yml new file mode 100644 index 0000000..d46b6f6 --- /dev/null +++ b/build-gluster-org/jobs/centos8-regression.yml @@ -0,0 +1,58 @@ +- job: + name: centos8-regression + node: centos8-testing + description: Our production regression test on centos8. Triggerered for once a week. + project-type: freestyle + concurrent: true + + scm: + - git: + branches: + - $GERRIT_BRANCH + refspec: $GERRIT_REFSPEC + choosing-strategy: gerrit + url: git://review.gluster.org/glusterfs.git + wipe-workspace: false + + properties: + - discard-after-x: + x: 90 + - one-build-per-node + + triggers: + - timed: "H 14 */2 * *" + + + publishers: + - email: + recipients: maintainers@gluster.org + send-to-individuals: true + - post-tasks: + - matches: + - log-text: Build was aborted + script: !include-raw: ../scripts/regression-abort.sh + - gluster-logs + + parameters: + - string: + default: refs/heads/master + description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' + name: GERRIT_REFSPEC + - string: + default: master + description: 'Name of the branch you want to build from. We usually build from master' + name: GERRIT_BRANCH + + builders: + - shell: !include-raw: ../scripts/regression-test-burn-in.sh + + wrappers: + - timestamps + - timeout: + timeout: 450 + abort: true + type: absolute + - credentials-binding: + - file: + credential-id: 4db32c5c-890f-4f06-a1d8-7c9a128884e8 + variable: LOG_KEY diff --git a/build-gluster-org/jobs/clang.yml b/build-gluster-org/jobs/clang.yml index 6dc9814..926d386 100644 --- a/build-gluster-org/jobs/clang.yml +++ b/build-gluster-org/jobs/clang.yml @@ -37,7 +37,7 @@ description: 'Name of the branch you want to build from. We usually build from master' name: GERRIT_BRANCH - string: - default: fedora-29-x86_64 + default: fedora-30-x86_64 description: 'Name of the mock chroot used to build' name: MOCK_CHROOT diff --git a/build-gluster-org/jobs/experimental-periodic.yml b/build-gluster-org/jobs/experimental-periodic.yml deleted file mode 100644 index 6d440ac..0000000 --- a/build-gluster-org/jobs/experimental-periodic.yml +++ /dev/null @@ -1,43 +0,0 @@ -- job: - name: experimental-periodic - node: centos7 - description: Regression test run nightly - project-type: freestyle - concurrent: true - - scm: - - git: - branches: - - origin/experimental - url: git://review.gluster.org/glusterfs.git - wipe-workspace: false - browser: cgit - browser-url: http://git.gluster.org/cgit/ - - properties: - - discard-after-x: - x: 90 - - one-build-per-node - - triggers: - - timed: "0 14 * * *" - - publishers: - - email: - recipients: maintainers@gluster.org amarts@redhat.com - send-to-individuals: true - - post-tasks: - - matches: - - log-text: Build was aborted - script: | - sudo reboot - - builders: - - shell: !include-raw: ../scripts/regression-test-burn-in.sh - - wrappers: - - timestamps - - timeout: - timeout: 420 - abort: true - type: absolute diff --git a/build-gluster-org/jobs/planet.yml b/build-gluster-org/jobs/planet.yml new file mode 100644 index 0000000..4c11743 --- /dev/null +++ b/build-gluster-org/jobs/planet.yml @@ -0,0 +1,35 @@ +- job: + name: planet + node: fedora30 + description: Generate planet.gluster.org + project-type: freestyle + concurrent: true + + scm: + - git: + url: https://github.com/gluster/planet-gluster + branches: + - master + + properties: + - discard-after-x: + x: 5 + - one-build-per-node + + triggers: + - timed: "H 14 * * *" + - github + + builders: + - shell: !include-raw: ../scripts/planet.sh + + wrappers: + - timestamps + - credentials-binding: + - file: + credential-id: 0b53bb70-545a-445f-9664-228d9cc0e6e3 + variable: LOG_KEY + - timeout: + timeout: 30 + abort: true + type: absolute diff --git a/build-gluster-org/jobs/regression-on-demand-multiplex.yml b/build-gluster-org/jobs/regression-on-demand-multiplex.yml index fec3a3d..919e930 100644 --- a/build-gluster-org/jobs/regression-on-demand-multiplex.yml +++ b/build-gluster-org/jobs/regression-on-demand-multiplex.yml @@ -61,3 +61,7 @@ timeout: 450 abort: true type: absolute + - credentials-binding: + - file: + credential-id: 4db32c5c-890f-4f06-a1d8-7c9a128884e8 + variable: LOG_KEY diff --git a/build-gluster-org/jobs/restore-review.yml b/build-gluster-org/jobs/restore-review.yml deleted file mode 100644 index 0a5495f..0000000 --- a/build-gluster-org/jobs/restore-review.yml +++ /dev/null @@ -1,36 +0,0 @@ -- job: - name: restore-review - node: bugzilla - description: Update bugs when a review is restored - project-type: freestyle - - scm: - - glusterfs - - triggers: - - gerrit: - trigger-on: - - change-restored-event - server-name: review.gluster.org - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'glusterfs' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - - parameters: - - string: - default: refs/heads/master - description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' - name: GERRIT_REFSPEC - - string: - default: master - description: 'Name of the branch you want to build from. We usually build from master' - name: GERRIT_BRANCH - - builders: - - shell: /opt/qa/github/handle_bugzilla.py --restore - - wrappers: - - timestamps diff --git a/build-gluster-org/jobs/smoke.yml b/build-gluster-org/jobs/smoke.yml index ea8c53c..b0f0cc6 100644 --- a/build-gluster-org/jobs/smoke.yml +++ b/build-gluster-org/jobs/smoke.yml @@ -2,7 +2,7 @@ name: 'smoke' nodeversion: - centos7: - node_name: centos7 + node_name: smoke7 - centos8: node_name: smoke8 jobs: diff --git a/build-gluster-org/jobs/untriaged-bugs.yml b/build-gluster-org/jobs/untriaged-bugs.yml deleted file mode 100644 index eedca86..0000000 --- a/build-gluster-org/jobs/untriaged-bugs.yml +++ /dev/null @@ -1,26 +0,0 @@ -- job: - name: untriaged-bugs - node: bugzilla - description: "List out the untriaged bugs" - project-type: freestyle - - triggers: - - timed: "H 1 * * 1" - - publishers: - - email-ext: - recipients: gluster-devel@gluster.org - subject: Weekly Untriaged Bugs - body: '${BUILD_LOG_REGEX,regex="^http.*"}' - attach-build-log: true - success: true - - builders: - - shell: !include-raw: ../scripts/untriaged-bugs.sh - - wrappers: - - timeout: - timeout: 30 - abort: true - type: absolute - - timestamps diff --git a/build-gluster-org/scripts/32-bit-build-smoke.sh b/build-gluster-org/scripts/32-bit-build-smoke.sh index ec2c79d..a802fbe 100644 --- a/build-gluster-org/scripts/32-bit-build-smoke.sh +++ b/build-gluster-org/scripts/32-bit-build-smoke.sh @@ -6,7 +6,7 @@ sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --install langpacks- sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --copyin $WORKSPACE /src sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --chroot "cd /src && ./autogen.sh" sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --chroot "cd /src && ./configure --enable-gnfs --enable-debug" -sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --chroot "cd src && make install CFLAGS='-Wall -Werror' -j ${nproc}" +sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --chroot "cd src && make install CFLAGS='-Wall -Werror -Wno-address-of-packed-member' -j ${nproc}" ret=$? sudo mock -r fedora-30-i386 --config-opts=dnf_warning=False --clean exit $ret diff --git a/build-gluster-org/scripts/bugzilla-post.sh b/build-gluster-org/scripts/bugzilla-post.sh deleted file mode 100644 index e03150e..0000000 --- a/build-gluster-org/scripts/bugzilla-post.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -set -x -function commit_message_edited() -{ - if [ "$GERRIT_PATCHSET_NUMBER" != "1" ]; then - OLD_PATCHSET_NUM="$(($GERRIT_PATCHSET_NUMBER-1))" - commit_msg=$(curl -X GET https://review.gluster.org/changes/${GERRIT_PROJECT}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/$OLD_PATCHSET_NUM/commit | grep message | sed 's/\\n/\'$'\n''/g') - - old_bugid=$(echo $commit_msg | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F '#' '{print $2}'); - if [ -z "$old_bugid" ] ; then - # This is needed for backward compatibility - old_bugid=$(echo $commit_msg | grep -i '^bug: ' | awk '{print $2}') - fi - - if [ "$bugid" == "$old_bugid" ]; then - exit 0 - fi - fi -} - -function update_bugzilla() -{ - fixes=1 - bugid=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F '#' '{print $2}'); - update_string=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F ' ' '{print $1}'); - if [ ${update_string} == "updates:" ]; then - fixes=0 - fi - - if [[ -z "$bugid" ]] ; then - # Needed for backward compatibility - bugid=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -i '^bug: ' | awk '{print $2}'); - fi - - if [[ -z "$bugid" ]] ; then - # This is commit only has a github issue - return; - fi - - product=$(bugzilla query -b $bugid --outputformat='%{product}'); - if [ "$product" != "GlusterFS" ]; then - echo "Wrong product: $product" >&2; - return 1; - fi - - #checking the type of event - if [ "$GERRIT_EVENT_TYPE" != "change-merged" ]; then - if [ "$GERRIT_PATCHSET_NUMBER" == "1" ]; then - bugzilla modify $bugid --comment="REVIEW: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME" --status POST; - else - commit_message_edited; - bugzilla modify $old_bugid --comment="REVISION POSTED: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; - bugzilla modify $bugid --comment="REVIEW: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME" --status POST; - fi - else - MERGER=$(echo "$GERRIT_PATCHSET_UPLOADER" | sed 's/\\//g') - if [ ${fixes} == 1 ]; then - bugzilla modify $bugid --comment="COMMIT: $GERRIT_CHANGE_URL committed in $GERRIT_BRANCH by $MERGER with a commit message-$(echo; echo;) $(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d)" --status MODIFIED; - else - bugzilla modify $bugid --comment="COMMIT: $GERRIT_CHANGE_URL committed in $GERRIT_BRANCH by $MERGER with a commit message-$(echo; echo;) $(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d)"; - fi - fi -} - -function main() -{ - if [ "$GERRIT_PROJECT" != "glusterfs" ]; then - return; - fi - update_bugzilla; -} - -main; diff --git a/build-gluster-org/scripts/build-jobs.sh b/build-gluster-org/scripts/build-jobs.sh index 0386c8b..b6b6c65 100644 --- a/build-gluster-org/scripts/build-jobs.sh +++ b/build-gluster-org/scripts/build-jobs.sh @@ -1,6 +1,5 @@ #!/bin/sh set -e -source /opt/rh/python27/enable || true virtualenv --system-site-packages env env/bin/pip install tox env/bin/tox diff --git a/build-gluster-org/scripts/planet.sh b/build-gluster-org/scripts/planet.sh new file mode 100644 index 0000000..aae702f --- /dev/null +++ b/build-gluster-org/scripts/planet.sh @@ -0,0 +1,18 @@ +#!/bin/sh +set -e +MOCK_CHROOT=fedora-30-x86_64 + +MOCK="sudo mock -r $MOCK_CHROOT --config-opts=dnf_warning=False --config-opts=use_bootstrap_container=True" + +$MOCK --clean +$MOCK --init +$MOCK --install rubygem-bundler ruby-devel curl-devel make gcc gcc-c++ ImageMagick patch zlib-devel tar git rubygem-bigdecimal +$MOCK --copyin $WORKSPACE /src +$MOCK --enable-network --chroot "cd /src && bundle install && bundle exec middleman build --verbose" +$MOCK --copyout /src/build/ $WORKSPACE/build +$MOCK --clean + +sudo chown -R jenkins:jenkins build +if [ "$GIT_BRANCH" == 'origin/master' ]; then + scp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i "$LOG_KEY" -r build/. _bits-gluster@http.int.rht.gluster.org:/var/www/glusterfs-planet +fi diff --git a/build-gluster-org/scripts/regression-test-burn-in.sh b/build-gluster-org/scripts/regression-test-burn-in.sh index c3ad27b..fe64f94 100644 --- a/build-gluster-org/scripts/regression-test-burn-in.sh +++ b/build-gluster-org/scripts/regression-test-burn-in.sh @@ -61,6 +61,8 @@ echo sudo -E bash /opt/qa/regression.sh -c RET=$? +echo "Logs are archived at Build artifacts: https://build.gluster.org/job/${JOB_NAME}/${UNIQUE_ID}" sudo mv /tmp/gluster_regression.txt $WORKSPACE || true sudo chown jenkins:jenkins gluster_regression.txt || true +ssh -o "StrictHostKeyChecking=no" build@review.gluster.org gerrit review --message "'$BURL : $VERDICT'" --project=glusterfs --label CentOS-regression="$V" $GIT_COMMIT exit $RET diff --git a/build-gluster-org/scripts/untriaged-bugs.sh b/build-gluster-org/scripts/untriaged-bugs.sh deleted file mode 100644 index 134035d..0000000 --- a/build-gluster-org/scripts/untriaged-bugs.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e -echo "Weekly GlusterFS Untriaged Bugs Report" -echo "" -bugzilla query --outputformat='https://bugzilla.redhat.com/%{id} / %{component}: %{summary}' --from-url='https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&product=GlusterFS&chfield=[Bug creation]&chfieldfrom=-4w&chfieldto=Now&f1=keywords&o1=notsubstring&v1=Triaged' | sort -k 3 |