Trouble with SVN post-commit and Jenkins

后端 未结 5 862
盖世英雄少女心
盖世英雄少女心 2021-01-05 06:07

I am trying to get CI going with Jenkins. To date, we have been performing two scheduled builds in our environment, but our dev staff wants to get CI working. I have follo

5条回答
  •  忘掉有多难
    2021-01-05 06:37

    Try increasing your timeout -- 2 seconds is like... Too low.

    This is what works for me:

    /usr/bin/wget --http-user=jenkins \
                  --http-passwd=passwordGoesHere \
                  --header "Content-Type:text/plain;charset=UTF-8" \
                  --post-data "`svnlook changed --revision $REV $REPOS`" \
                  --output-document "/var/log/svn/svn-notify-commit-post" \
                  --timeout=10 \
                  --read-timeout=10 \
                  --tries=2 \
                  "http://jenkins:8082/jenkins/subversion/${UUID}/notifyCommit?rev=$REV" \
                  >> /var/log/svn/svn-notify-commit-post.log 2>&1
    

    (Make sure you have a /var/log/svn directory owned by the proper user).

    Also, enable SCM polling and set a cron rule like */30 * * * *.

提交回复
热议问题