File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -118,14 +118,22 @@ function downloadAzureKeyvaultSecret() {
118118 --file " ${SIGN_CERTIFICATE} "
119119}
120120
121- # JENKINS_VERSION: Define which version will be packaged where:
122- # * \'latest\' means the latest version available
123- # * <version> represents any valid existing version like 2.440.3 available at JENKINS_DOWNLOAD_URL
124- # JENKINS_DOWNLOAD_URL: Specify the endpoint to use for downloading jenkins.war
125- # MAVEN_REPOSITORY_USERNAME: optional username for repository access
126- # MAVEN_REPOSITORY_PASSWORD: optional password for repository access
121+ # Once the exact Jenkins Version to get is determined, we retrieve the WAR and the signature file from Artifactory
122+ # The signature is verified to ensure the GPG key is correct
127123function downloadJenkinsWar() {
128- jv download
124+ jenkinsVersion=" $( jv get) " # jv utilizes the JENKINS_VERSION environment variable which can be the line (latest/weekly/lts/stable) or an exact version
125+
126+ # Download WAR from Artifactory. Note: the expected filename is "jenkins.war".
127+ warUrl=" https://repo.jenkins-ci.org/releases/org/jenkins-ci/main/jenkins-war/${jenkinsVersion} /jenkins-war-${jenkinsVersion} .war"
128+ curl --fail --silent --show-error --location --output " ${WAR} " \
129+ " ${warUrl} "
130+
131+ # Download signature from Artifactory (signed by Maven during the release process). Note: the expected filename is "jenkins.war.asc".
132+ warSignatureUrl=" ${warUrl} .asc"
133+ curl --fail --silent --show-error --location --output " ${WAR} .asc" \
134+ " ${warSignatureUrl} "
135+
136+ # TODO: verify the download. Requires retrieving the correct GPG key (edge case when rotating key, might need to use state files)
129137}
130138
131139function getGPGKeyFromAzure() {
You can’t perform that action at this time.
0 commit comments