Merge lp:~hloeung/jenkins-agent-charm/jenkins-slave.jar into lp:jenkins-agent-charm

Proposed by Haw Loeung
Status: Merged
Approved by: Paul Collins
Approved revision: 20
Merged at revision: 21
Proposed branch: lp:~hloeung/jenkins-agent-charm/jenkins-slave.jar
Merge into: lp:jenkins-agent-charm
Diff against target: 18 lines (+3/-2)
1 file modified
files/download-slave.sh (+3/-2)
To merge this branch: bzr merge lp:~hloeung/jenkins-agent-charm/jenkins-slave.jar
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Review via email: mp+363305@code.launchpad.net

Commit message

Better handle downloading of slave.jar

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'files/download-slave.sh'
2--- files/download-slave.sh 2016-06-03 03:37:31 +0000
3+++ files/download-slave.sh 2019-02-18 04:26:03 +0000
4@@ -15,11 +15,12 @@
5
6 # Retrieve Slave JAR from Master Server
7 echo "Downloading slave.jar from ${JENKINS_URL}..."
8-wget -q -O ${SLAVE_JAR} ${JENKINS_URL}/jnlpJars/slave.jar
9+wget -q -O ${SLAVE_JAR}.new ${JENKINS_URL}/jnlpJars/slave.jar
10
11 # Check to make sure slave.jar was downloaded.
12-if [ -f ${SLAVE_JAR} ]
13+if [ -s ${SLAVE_JAR}.new ]
14 then
15+ mv ${SLAVE_JAR}.new ${SLAVE_JAR}
16 exit 0
17 else
18 exit 1

Subscribers

People subscribed via source and target branches