Skip to content

Commit

Permalink
Update the checkpatch
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshitha Kamath <[email protected]>
  • Loading branch information
Rakshitha Kamath authored and Rakshitha Kamath committed Jun 19, 2023
1 parent cf571a6 commit 8b46df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- job:
name: nfs-ganesha_trigger-checkpatch
name: checkpatch
node: cico-workspace
description: "Run checkpatch on nfs-ganesha. This job is triggered by sending a change to https://review.gerrithub.io/#/q/project:ffilz/nfs-ganesha for review\n\nNote: it is possible to retrigger a test for a change by including recheck checkpatch in a comment on GerritHub."
project-type: freestyle
Expand Down Expand Up @@ -51,4 +51,4 @@
branch-compare-type: ANT

wrappers:
- ssh-agent
- gerrithub_key
6 changes: 2 additions & 4 deletions jobs/scripts/checkpatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ if [[ -n "$GERRIT_REFSPEC" ]]; then
GERRIT_PUBLISH=true
fi

#ssh -o 'StrictHostKeyChecking no' -p 29418 [email protected] -v

if ! [ -d nfs-ganesha ]; then
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" git clone --depth=1 -o gerrit ssh://$GERRIT_USER@review.gerrithub.io:29418/ffilz/nfs-ganesha.git -v
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i $GERRITHUB_KEY" git clone --depth=1 -o gerrit ssh://$GERRIT_USER@review.gerrithub.io:29418/ffilz/nfs-ganesha.git -v
fi

( cd nfs-ganesha && git fetch gerrit $GERRIT_REF && git checkout $REVISION )

publish_checkpatch() {
local SSH_GERRIT="ssh -p 29418 $GERRIT_USER@review.gerrithub.io"
local SSH_GERRIT="ssh -p 29418 -i $GERRITHUB_KEY $GERRIT_USER@review.gerrithub.io"
if [[ "$GERRIT_PUBLISH" == "true" ]]; then
tee /proc/$$/fd/1 | $SSH_GERRIT "gerrit review --json --project ffilz/nfs-ganesha $REVISION"
else
Expand Down

0 comments on commit 8b46df0

Please sign in to comment.