jenkins-infra / crawler

tools crawler
26 stars 65 forks source link

scriptler.groovy fails since 2022-03-12 #123

Closed lemeurherve closed 1 year ago

lemeurherve commented 2 years ago

Noticed in https://github.com/jenkins-infra/helpdesk/issues/2950

Caught: java.io.FileNotFoundException: /home/jenkins/workspace/crawler/./jenkins-scripts/scriptler java.io.FileNotFoundException: /home/jenkins/workspace/crawler/./jenkins-scripts/scriptler at scriptler.run(scriptler.groovy:18) at runner$_run_closure1.doCall(runner.groovy:13) at runner.run(runner.groovy:10)

Zastai commented 1 year ago

The groovy script will try to get those scripts via git pull --rebase origin master if the jenkins-scripts folder exists and has a .git subdir, or via git clone git://github.com/jenkinsci/jenkins-scripts -b master otherwise. That does have one permanent failure mode when the .git exists but the folder is in an unusable state (breaking the pull). The scripts repo seems small enough to just always use a fresh checkout, so that might be better.

Other than that, it /looked/ fine, until I tried it myself:

PS C:\Sources\Jenkins> git clone git://github.com/jenkinsci/jenkins-scripts
Cloning into 'jenkins-scripts'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Unknown error

PS C:\Sources\Jenkins> git clone https://github.com/jenkinsci/jenkins-scripts
Cloning into 'jenkins-scripts'...
remote: Enumerating objects: 942, done.

Receiving objects: 100% (942/942), 171.37 KiB | 2.45 MiB/s, done.
Resolving deltas: 100% (550/550), done.

Looks like the use of git:// URLs is broken (it seems to have been removed in March); adjusting the git commands in scriptler.groovy to use https:// instead should make it work again.