-
-
Couldn't load subscription status.
- Fork 4.7k
chore: download war from mirrors unless we are publishing a release #2074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
06078fb
aa634ff
8d22dd1
d9f7143
4b21ffc
1d5b0e9
6a4a3f5
fd32886
dbbfaef
919cdd2
c9f1876
a120baf
2dc353c
b735c05
2be154f
c57b7a1
f4ea4c7
ec1c1e6
2402170
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,8 +37,15 @@ $env:JENKINS_VERSION = "$JenkinsVersion" | |||||
| # Compared to weekly releases, LTS releases include an additional build number in their version | ||||||
| # Note: the ':' separator is included as trying to set an environment variable to empty on Windows unset it. | ||||||
| $env:SEPARATOR_LTS_PREFIX = ':' | ||||||
| $releaseLine = 'war' | ||||||
| if ($JenkinsVersion.Split('.').Count -eq 3) { | ||||||
| $env:SEPARATOR_LTS_PREFIX = ':lts-' | ||||||
| $releaseLine = 'war-stable' | ||||||
| } | ||||||
|
|
||||||
| # If there is no WAR_URL set, using get.jenkins.io URL depending on the release line | ||||||
| if([String]::IsNullOrWhiteSpace($env:WAR_URL)) { | ||||||
| $env:WAR_URL = 'https://get.jenkins.io/{0}/{1}/jenkins.war' -f $releaseLine, $env:JENKINS_VERSION | ||||||
| } | ||||||
|
|
||||||
| $items = $ImageType.Split('-') | ||||||
|
|
@@ -50,10 +57,10 @@ if ($items[1] -eq 'ltsc2019') { | |||||
| $env:TOOLS_WINDOWS_VERSION = '1809' | ||||||
| } | ||||||
|
|
||||||
| # Retrieve the sha256 corresponding to the JENKINS_VERSION | ||||||
| $jenkinsShaURL = 'https://repo.jenkins-ci.org/releases/org/jenkins-ci/main/jenkins-war/{0}/jenkins-war-{0}.war.sha256' -f $env:JENKINS_VERSION | ||||||
| # Retrieve the sha256 corresponding to the war file | ||||||
| $warShaURL = '{0}.sha256' -f $env:WAR_URL | ||||||
| $webClient = New-Object System.Net.WebClient | ||||||
| $env:WAR_SHA = $webClient.DownloadString($jenkinsShaURL).ToUpper() | ||||||
| $env:WAR_SHA = $webClient.DownloadString($warShaURL).Split(' ')[0] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the help of temporary debug statements in fd32886, I found out why my builds were failing on Windows on the SHA256 checksum:
|
||||||
|
|
||||||
| $env:COMMIT_SHA=$(git rev-parse HEAD) | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.