Skip to content

Commit

Permalink
Merge pull request #9 from docker/repoint
Browse files Browse the repository at this point in the history
Repoint
  • Loading branch information
Jim Van Fleet committed Aug 2, 2016
2 parents 563f536 + 399fb2c commit 4212f68
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 28 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM bigfleet/shibboleth_idp

ARG maintainer=tier
ARG imagename=shibboleth_idp
ARG version=3.2.1
ENV VERSION=$version

RUN chown -R root:root /opt/shibboleth/shibboleth-identity-provider-$version
8 changes: 8 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ node {
sh 'mv bin/* .'
}

stage 'Acquire conftree'

sh 'mkdir -p root'
dir('root'){
git([ url: "https://github.internet2.edu/docker/shib-idp-conftree.git",
branch: "test", credentialsId: "jenkins-github-access-token" ])
}

stage 'Tests'

sh 'bin/test.sh'
Expand Down
7 changes: 2 additions & 5 deletions bin/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ 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"
fi
tar xf shibboleth-identity-provider.tar.gz
mv shibboleth-identity-provider-$version root
rm -rf root/bin root/logs
git clone git@github.internet2.edu:docker/shib-idp-conftree.git --depth 1 --branch test root
fi
23 changes: 0 additions & 23 deletions tests/download.bats

This file was deleted.

27 changes: 27 additions & 0 deletions tests/image.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bats

load ../common

setup() {
./bin/rebuild.sh
}

@test "Creates non-root Shib IDP home" {
result="$(docker run -i $maintainer/$imagename ls /opt/shibboleth/current/bin/)"
[ "$result" != '' ]
}

@test "Retains first-run experience" {
result="$(docker run -i $maintainer/$imagename ls /tmp/firsttimerunning)"
[ "$result" != '' ]
}

@test "Contains java" {
run docker run -i $maintainer/$imagename which java
[ "$status" -eq 0 ]
}

@test "Logs directory exists, owned by root" {
result="$(docker run -i $maintainer/$imagename stat -c '%U' /opt/shibboleth/current/logs)"
[ "$result" != 'UNKNOWN' ]
}

0 comments on commit 4212f68

Please sign in to comment.