Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update to version 1.4.1 of the Shibboleth UI, add some missing pieces
mgrady committed Oct 30, 2018
1 parent 832b5fb commit 2fc2b4c
Showing 6 changed files with 134 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,6 +1,6 @@
FROM alpine:3.7 as bootstrap

ARG version=1.4.0
ARG version=1.4.1

COPY bootstrapfiles/shibui-${version}.jar.sha256sum .

88 changes: 88 additions & 0 deletions Jenkinsfile
@@ -0,0 +1,88 @@
node {

stage 'Checkout'

checkout scm

stage 'Acquire util'

sh 'mkdir -p tmp && mkdir -p bin'
dir('tmp'){
git([ url: "https://github.internet2.edu/docker/util.git",
credentialsId: "jenkins-github-access-token" ])
sh 'mv ./bin/* ../bin/.'
}
sh 'rm -rf tmp'

stage 'Setting build context'

def maintainer = maintainer()
def imagename = imagename()
def tag

// Tag images created on master branch with 'latest'
if(env.BRANCH_NAME == "master"){
tag = "latest"
}else{
tag = env.BRANCH_NAME
}

if(!imagename){
echo "You must define an imagename in common.bash"
currentBuild.result = 'FAILURE'
}
if(maintainer){
echo "Building ${imagename}:${tag} for ${maintainer}"
}

stage 'Build'
try{
sh 'bin/build.sh &> debug'
} catch(error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}

stage 'Tests'

try{
sh 'bin/test.sh &> debug'
} catch(error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}

stage 'Push'

docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
def baseImg = docker.build("$maintainer/$imagename")
baseImg.push("$tag")
}

stage 'Notify'

slackSend color: 'good', message: "$maintainer/$imagename:$tag pushed to DockerHub"

}

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 handleError(String message){
echo "${message}"
currentBuild.setResult("FAILED")
slackSend color: 'danger', message: "${message}"
//step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'chris.bynum@levvel.io', sendToIndividuals: true])
sh 'exit 1'
}
41 changes: 41 additions & 0 deletions README.md
@@ -1,2 +1,43 @@
# shib-ui
Code and files for the TIER Shibboleth UI Project

This repository contains both:
* the needed artifacts to build (including auto-builds through Jenkins) a Docker image of the Shibboleth UI,
* and a "testbed" that provides the full environment one needs to explore and gain experience with the Shibboleth UI.

The Docker image of the Shibboleth UI follows the TIER Docker packaging standards, utilizing CentOS7, the Zulu JDK, supervisord, and the TIER Beacon configuration.

## How To

* Install Docker. These instructions require version 17.03.1 or higher.

* TIER can build an image for Shib UI with something like the following:
```
docker build --rm -t tier/shib-idp-ui
```

* And then that image could be run with something like the following:
```
docker run -p 8080:8080 tier/shib-idp-ui
```

### Testbed environment

* There is a "testbed" environment that you can build and run that is embedded into this repository. That testbed includes the:
* Shibboleth UI,
* a Shibboleth IdP
* with a shared filesystem between the Shibboleth UI and Shibboleth IdP,
* an LDAP server as the base credential/attribute store for the IdP,
* and the TIER Maria DB image for the UI's persistent database.

To setup that testbed, you need to:

* Clone this repository:
```
git clone https://github.com/Internet2/shib-ui.git
```
* __cd__ into _test-compose/_
* Run the following command:
```
docker-compose kill; docker-compose rm; docker-compose build && docker-compose up
```
2 changes: 2 additions & 0 deletions bash.common
@@ -0,0 +1,2 @@
maintainer=tier
imagename=shib-idp-ui
1 change: 1 addition & 0 deletions bootstrapfiles/shibui-1.4.1.jar.sha256sum
@@ -0,0 +1 @@
2efc58019fa423b78768adf319d7fe3edcf21de724e269600e7796a27f55ce06 shibui-1.4.1.jar
2 changes: 1 addition & 1 deletion containerfiles/supervisord.conf
@@ -16,7 +16,7 @@ stderr_logfile_maxbytes=0
directory=/usr/bin

[program:shibui]
command=/usr/bin/java -jar /opt/shibui/shibui.jar
command=/usr/bin/java -Didp.home=/idp-home -jar /opt/shibui/shibui.jar
directory=/opt/shibui
autostart=true
autorestart=true

0 comments on commit 2fc2b4c

Please sign in to comment.