Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Loading status checks…
update to version 1.4.1 of the Shibboleth UI, add some missing pieces
Showing
6 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
maintainer=tier | ||
imagename=shib-idp-ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2efc58019fa423b78768adf319d7fe3edcf21de724e269600e7796a27f55ce06 shibui-1.4.1.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters