DiscordSRV

DiscordSRV

86.8k Downloads

[Proposal] Jenkins `DiscordSRV.jar` artifact

RoyCurtis opened this issue ยท 4 comments

commented

May I please ask that the scarsz.me Jenkins generates an artifact simply named DiscordSRV.jar, along-side the versioned one?

Rationale

For our server, I use a shell script to update our plugins from various sources. Some of these sources are Jenkins repositories, like DiscordSRV's.

For Jenkins, we rely on the job/foobar/lastSuccessfulBuild/ endpoint to always get the latest build. Examples of other Jenkins' that allow this:

However, DiscordSRV's Jenkins only has one artifact, and it has the build number on it. This means that the script breaks when a new version of DiscordSRV is built.

Notes

  • This script is not run abusively (e.g. we don't run it every 5 minutes). On our 1.12 BETA and our live server, it's run manually at least once a week (or up to a few times a day, if we're testing).
  • I could instead use a build's perma-link, but I would prefer to be on the bleeding-edge at all times and avoid updating the update script manually
commented

https://scarsz.me/discordsrv.jar has been a thing for a while

commented

Was not aware of that URL (cannot find mention of it on the Spigot page or wiki). Works for me, thank you very much!

commented

I leave the decision about this to @Scarsz

Here are some examples how I'm handling it:

# AntiXRay
  wget https://jenkins.androkai.net/job/AntiXRay/lastSuccessfulBuild/artifact/build/libs/AntiXRay-*.jar/*zip*/libs.zip -O AntiXRay.zip
  unzip AntiXRay.zip
  rm AntiXRay.zip
  mv AntiXRay-*.jar AntiXRay.jar

# BossShop
  wget https://jenkins.androkai.net/job/BossShop/lastSuccessfulBuild/artifact/target/BossShop.jar

# ChairsReloaded
  wget http://build.true-games.org/job/ChairsReloaded/lastSuccessfulBuild/artifact/target/Chairs.jar

# DiscordSRV
  wget https://ci.scarsz.me/job/DiscordSRV/lastSuccessfulBuild/artifact/target/*.jar/*zip*/target.zip -O DiscordSRV.zip
  unzip DiscordSRV.zip
  rm DiscordSRV.zip
  mv DiscordSRV*.jar DiscordSRV.jar

# Dynmap
  wget http://dynmap.us/builds/dynmap/dynmap-HEAD.jar -O dynmap.jar

# EssentialsX
  wget http://ci.drtshock.net/job/essentialsx/lastSuccessfulBuild/artifact/Essentials/target/EssentialsX-*.jar/*zip*/target.zip -O EssentialsX-Core.zip
  unzip EssentialsX-Core.zip
  rm EssentialsX-Core.zip
  mv EssentialsX-*.jar EssentialsX.jar
  wget http://ci.drtshock.net/job/essentialsx/lastSuccessfulBuild/artifact/EssentialsChat/target/EssentialsXChat-*.jar/*zip*/target.zip -O EssentialsX-Chat.zip
  unzip EssentialsX-Chat.zip
  rm EssentialsX-Chat.zip
  mv EssenitialsXChat-*.jar EssentialsXChat.jar
  wget http://ci.drtshock.net/job/essentialsx/lastSuccessfulBuild/artifact/EssentialsGeoIP/target/EssentialsXGeoIP-*.jar/*zip*/target.zip -O EssentialsX-GeoIP.zip
  unzip EssentialsX-GeoIP.zip
  rm EssentialsX-GeoIP.zip
  mv EssentialsXGeoIP-*.jar EssentialsXGeoIP.jar
  wget http://ci.drtshock.net/job/essentialsx/lastSuccessfulBuild/artifact/EssentialsSpawn/target/EssentialsXSpawn-*.jar/*zip*/target.zip -O EssentialsX-Spawn.zip
  unzip EssentialsX-Spawn.zip
  rm EssentialsX-Spawn.zip
  mv EssentialsXSpawn-*.jar EssentialsXSpawn.jar

# ProtocolLib
  wget http://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/artifact/modules/ProtocolLib/target/ProtocolLib.jar

# TerrainControl
  wget http://build.mctcp.com/view/All/job/TerrainControl%20-%20Master%20-%20Gradle/lastStableBuild/default/artifact/platforms/bukkit/build/distributions/terraincontrol-bukkit-*-SNAPSHOT.jar/*zip*/distributions.zip -O TerrainControl.zip
  unzip TerrainControl.zip
  rm TerrainControl.zip
  mv terraincontrol-bukkit-*-SNAPSHOT.jar TerrainControl.jar
commented

Interesting, I did not know you could wildcard URLs in Jenkins that way. Thanks!

Sadly, it looks like this only works when zipping artifacts, rather than trying to directly get the jar. So I'll keep this proposal open, as would prefer not to introduce extra code/steps in the script (and it'll probably be easier on the Jenkins to not have artifacts zipped on each request)