mirror of
https://github.com/InsanusMokrassar/JenkinsDocker.git
synced 2024-11-26 12:48:42 +00:00
add autoupdater
This commit is contained in:
parent
2737e72ee3
commit
e1be082270
@ -20,4 +20,4 @@ USER 1000
|
|||||||
|
|
||||||
VOLUME /var/jenkins_home/jenkins
|
VOLUME /var/jenkins_home/jenkins
|
||||||
|
|
||||||
RUN cd /var/jenkins_home/ && axel -a -n 8 --max-redirect=256 http://mirrors.jenkins.io/war-stable/2.414.3/jenkins.war
|
RUN cd /var/jenkins_home/ && axel -a -n 8 --max-redirect=256 http://mirrors.jenkins.io/war-stable/2.246.1/jenkins.war
|
||||||
|
11
autoupdate.sh
Executable file
11
autoupdate.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
newVersion="2.246.1"
|
||||||
|
else
|
||||||
|
newVersion="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i -E "s/[0-9\.]+\/jenkins.war/${newVersion}\/jenkins.war/g" Dockerfile
|
||||||
|
sed -i -E "s/version=\"[0-9\.]+\"/version=\"${newVersion}\"/g" deploy
|
||||||
|
|
2
deploy
2
deploy
@ -9,7 +9,7 @@ function assert_success() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
version="2.414.3"
|
version="2.246.1"
|
||||||
|
|
||||||
assert_success docker build -t jenkins:$version ./
|
assert_success docker build -t jenkins:$version ./
|
||||||
assert_success docker tag jenkins:$version insanusmokrassar/jenkins:$version
|
assert_success docker tag jenkins:$version insanusmokrassar/jenkins:$version
|
||||||
|
Loading…
Reference in New Issue
Block a user