forked from jenkinsci/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweekly.sh
More file actions
executable file
·22 lines (14 loc) · 770 Bytes
/
weekly.sh
File metadata and controls
executable file
·22 lines (14 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -e
set -x
JENKINS_VERSION=$(curl -sq https://api.github.com/repos/jenkinsci/jenkins/tags | grep '"name":' | egrep -o '[0-9]+(\.[0-9]+)+' | sort --version-sort | uniq | tail -1)
echo "$JENKINS_VERSION"
JENKINS_SHA=$(curl "http://repo.jenkins-ci.org/simple/releases/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war.sha1")
echo "$JENKINS_SHA"
docker build --build-arg "JENKINS_VERSION=$JENKINS_VERSION" \
--build-arg "JENKINS_SHA=$JENKINS_SHA" \
--no-cache --pull \
--tag "jenkinsci/jenkins:$JENKINS_VERSION" .
docker tag -f "jenkinsci/jenkins:$JENKINS_VERSION" jenkinsci/jenkins:latest
docker push "jenkinsci/jenkins:$JENKINS_VERSION"
docker push jenkinsci/jenkins:latest