Skip to content
Permalink
Browse files

Adapt directory structure to docker/util

The container is now built directly from the root directory.
Even the simplest composition was moved to demo/plain.
  • Loading branch information
mederly committed Sep 27, 2018
1 parent ce27088 commit 55fcd70f1d9c48cfa9e61bb996da5acd97bdd933
Showing with 19 additions and 30 deletions.
  1. 0 {midpoint/midpoint-server → }/Dockerfile
  2. +16 −27 Jenkinsfile
  3. 0 {midpoint/midpoint-server → }/container_files/httpd/conf/midpoint.conf.auth.internal
  4. 0 {midpoint/midpoint-server → }/container_files/httpd/conf/midpoint.conf.auth.shibboleth
  5. 0 {midpoint/midpoint-server → }/container_files/httpd/conf/ssl-enable.conf
  6. 0 {midpoint/midpoint-server → }/container_files/mp-dir/active-spring-profiles
  7. 0 {midpoint/midpoint-server → }/container_files/mp-dir/repository-url
  8. 0 {midpoint/midpoint-server → }/container_files/opt-tier/setenv.sh
  9. 0 {midpoint/midpoint-server → }/container_files/shibboleth/attribute-map.xml
  10. 0 {midpoint/midpoint-server → }/container_files/shibboleth/native.logger
  11. 0 {midpoint/midpoint-server → }/container_files/shibboleth/shibd.logger
  12. 0 {midpoint/midpoint-server → }/container_files/supervisor/supervisord.conf
  13. 0 {midpoint/midpoint-server → }/container_files/usr-local-bin/healthcheck.sh
  14. 0 {midpoint/midpoint-server → }/container_files/usr-local-bin/sendtierbeacon.sh
  15. 0 {midpoint/midpoint-server → }/container_files/usr-local-bin/setup-cron.sh
  16. 0 {midpoint/midpoint-server → }/container_files/usr-local-bin/start-httpd.sh
  17. 0 {midpoint/midpoint-server → }/container_files/usr-local-bin/start-midpoint.sh
  18. 0 {midpoint/midpoint-server → }/container_files/usr-local-bin/startup.sh
  19. 0 {midpoint → demo/plain}/.env
  20. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/application/database_password.txt
  21. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/application/keystore_password.txt
  22. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/httpd/host-cert.pem
  23. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/httpd/host-key.pem
  24. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/shibboleth/idp-metadata.xml
  25. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/shibboleth/shibboleth2.xml
  26. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/shibboleth/sp-cert.pem
  27. 0 {midpoint → demo/plain}/configs-and-secrets/midpoint/shibboleth/sp-key.pem
  28. +1 −1 {midpoint → demo/plain}/docker-compose.yml
  29. +2 −2 {midpoint → }/download-midpoint
  30. 0 {midpoint → midpoint-obsolete}/README.md
  31. 0 {midpoint → midpoint-obsolete}/build.sh
  32. 0 {midpoint → midpoint-obsolete}/cleanup.sh
  33. 0 {midpoint → midpoint-obsolete}/test.sh
  34. 0 {midpoint → midpoint-obsolete}/test/t010-wait-for-start.sh
  35. 0 {midpoint → midpoint-obsolete}/test/t100-check-health.sh
  36. 0 {midpoint → midpoint-obsolete}/test/t110-get-administrator.sh
  37. 0 {midpoint → midpoint-obsolete}/test/t120-add-get-user.sh
  38. 0 {midpoint → midpoint-obsolete}/test/t200-stop-start.sh
  39. 0 {midpoint → midpoint-obsolete}/test/t300-repository-preservation.sh
  40. 0 {midpoint → }/tests/main.bats
File renamed without changes.
@@ -6,49 +6,36 @@ pipeline {
tag = 'l'
}
stages {
stage('Setting build context') {
stage ('Setting build context') {
steps {
script {
maintainer = maintain()
imagename = imagename()
if(env.BRANCH_NAME == "master" || env.BRANCH_NAME == "bats") { // temporary
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME == "bats") { // temporary
tag = "latest"
} else {
tag = env.BRANCH_NAME
}
if(!imagename){
if (!imagename) {
echo "You must define imagename in common.bash"
currentBuild.result = 'FAILURE'
}
}
sh 'mkdir -p bin'
sh 'mkdir -p tmp'
dir('tmp') {
git([ url: "https://github.internet2.edu/docker/util.git", credentialsId: "jenkins-github-access-token" ])
sh 'ls'
sh 'mv bin/* ../bin/.'
dir ('tmp') {
git([ url: "https://github.internet2.edu/docker/util.git", credentialsId: "jenkins-github-access-token" ])
sh 'ls'
sh 'mv bin/* ../bin/.'
}
}
}
}
stage ('Clean') {
steps {
script {
try {
sh 'bin/destroy.sh >> debug'
} catch (error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem building the Base Image. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}
}
}
}
}
stage ('Build') {
steps {
script {
try {
sh '(set -e ; cd midpoint ; ./download-midpoint ; ../bin/build.sh) &> debug'
sh './download-midpoint &> debug'
sh 'bin/rebuild.sh &>> debug'
} catch (error) {
def error_details = readFile('./debug')
def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"
@@ -62,16 +49,17 @@ pipeline {
steps {
script {
try {
sh 'bats midpoint/tests &> debug'
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}"
def message = "BUILD ERROR: There was a problem testing ${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}
}
}
}
/*
stage ('Test2') {
steps {
script {
@@ -91,10 +79,11 @@ pipeline {
}
}
}
*/
stage ('Push') {
steps {
script {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
def baseImg = docker.build("$maintainer/$imagename")
baseImg.push("$tag")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -14,7 +14,7 @@ services:
- CREATE_NEW_DATABASE=if_needed

midpoint-server:
build: ./midpoint-server/
image: tier/midpoint:latest
ports:
- 8443:443
environment:
@@ -3,10 +3,10 @@
dir=`dirname "$0"`
echo "Downloading midPoint 3.9-SNAPSHOT"
echo "-----------------------------------------"
curl --output $dir/midpoint-server/midpoint-3.9-SNAPSHOT-dist.tar.gz "https://evolveum.com/downloads/midpoint-tier/midpoint-3.9-SNAPSHOT-dist.tar.gz"
curl --output $dir/midpoint-3.9-SNAPSHOT-dist.tar.gz "https://evolveum.com/downloads/midpoint-tier/midpoint-3.9-SNAPSHOT-dist.tar.gz"
echo "-----------------------------------------"
echo "Checking the download..."
if tar -tf $dir/midpoint-server/midpoint-3.9-SNAPSHOT-dist.tar.gz >/dev/null; then
if tar -tf $dir/midpoint-3.9-SNAPSHOT-dist.tar.gz >/dev/null; then
echo "OK"
else
echo "The file was not downloaded correctly"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 55fcd70

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