Skip to content
Permalink
Browse files

Downloads the Shib IDP distribution

  • Loading branch information
Jim Van Fleet
Jim Van Fleet committed Jul 27, 2016
1 parent e759b5a commit 32f50f11322f6edf756518292f3effbd9c548af1
Showing with 52 additions and 5 deletions.
  1. +2 −0 .gitignore
  2. +36 −3 Jenkinsfile
  3. +11 −0 bin/download.sh
  4. +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"

0 comments on commit 32f50f1

Please sign in to comment.
You can’t perform that action at this time.