Permalink
Browse files
Downloads the Shib IDP distribution
- Loading branch information
Showing
with
52 additions
and
5 deletions.
-
+2
−0
.gitignore
-
+36
−3
Jenkinsfile
-
+11
−0
bin/download.sh
-
+3
−2
common.bash
|
@@ -5,3 +5,5 @@ bin/rebuild.sh |
|
|
bin/rerun.sh |
|
|
bin/run.sh |
|
|
bin/test.sh |
|
|
root/** |
|
|
shibboleth-identity-provider.tar.gz |
|
|
@@ -1,5 +1,5 @@ |
|
|
node { |
|
|
|
|
|
|
|
|
stage 'Checkout' |
|
|
|
|
|
checkout scm |
|
@@ -13,14 +13,47 @@ node { |
|
|
sh 'ls' |
|
|
sh 'mv bin/* .' |
|
|
} |
|
|
|
|
|
stage 'Base' |
|
|
|
|
|
stage 'Build' |
|
|
|
|
|
def maintainer = maintainer() |
|
|
def imagename = imagename() |
|
|
def tag = env.BRANCH_NAME |
|
|
if(!imagename){ |
|
|
echo "You must define an imagename in common.bash" |
|
|
currentBuild.result = 'FAILURE' |
|
|
} |
|
|
if(maintainer){ |
|
|
echo "Building ${maintainer}:${tag} for ${maintainer}" |
|
|
} |
|
|
|
|
|
sh 'bin/build.sh' |
|
|
|
|
|
stage 'Tests' |
|
|
|
|
|
sh 'bin/test.sh' |
|
|
|
|
|
stage 'Push' |
|
|
|
|
|
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") { |
|
|
def baseImg = docker.build("$maintainer/$imagename") |
|
|
baseImg.push("$tag") |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
def maintainer() { |
|
|
def matcher = readFile('common.bash') =~ 'maintainer="(.+)"' |
|
|
matcher ? matcher[0][1] : 'tier' |
|
|
} |
|
|
|
|
|
def imagename() { |
|
|
def matcher = readFile('common.bash') =~ 'imagename="(.+)"' |
|
|
matcher ? matcher[0][1] : null |
|
|
} |
|
|
|
|
|
def version() { |
|
|
def matcher = readFile('common.bash') =~ 'version="(.+)"' |
|
|
matcher ? matcher[0][1] : null |
|
|
}
|
|
|
@@ -0,0 +1,11 @@ |
|
|
#!/bin/bash |
|
|
|
|
|
source common.bash . |
|
|
|
|
|
rm -rf root |
|
|
if [ ! -f shibboleth-identity-provider.tar.gz ]; then |
|
|
curl -o shibboleth-identity-provider.tar.gz "https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-$version.tar.gz" |
|
|
tar xvf shibboleth-identity-provider.tar.gz |
|
|
mv shibboleth-identity-provider-$version root |
|
|
fi |
|
|
#curl -o shibboleth-identity-provider-3.2.1.tar.gz https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-3.2.1.tar.gz
|
|
|
@@ -1,2 +1,3 @@ |
|
|
maintainer="tier" |
|
|
imagename="imagename-replaceme-in-common-bash"
|
|
|
maintainer="bigfleet" |
|
|
imagename="shibboleth_idp_runtime" |
|
|
version="3.2.1"
|