diff --git a/Jenkinsfile b/Jenkinsfile index 0184868..0f1a970 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,24 +1,46 @@ /** Builds images for the Grouper Training Env - * Each class has a set of images. Each class's image sets are independent, but within + * Each class has a set of images. Each class's image sets are independent, but within * a class each image builds upon the prior exercise. Therefore all images are built - * first and then push to the repo. Order of the build is important, but ordering of the + * first and then push to the repo. Order of the build is important, but ordering of the * image pushes are not. If an image is missing the extra layers get pushed, then the * missing layers only get tagged when they are pushed. **/ -/** Each class has a set of modules with a set of steps. - * For examples, 101.1.1, 101.1.2, 101.1.3, 101.2.1, 101.2.2, etc. - * Each step is an associated docker image. - * exerciseSets has the class name and an array of the number of steps for module. +/** Each class is an associated docker image. + * EXERCISE_FOLDERS has the image name and corresponding build folder **/ -// TODO unused? -exerciseSets = ['101.1.1', ] + +TARGET_BRANCH = '202202' + +EXERCISE_FOLDERS = [ + "base": "base", + "101.1.1": "ex101/ex101.1.1", + "201.end": "ex201/ex201.end", + "401.end": "ex401/ex401.end", + //"201.1.1": "ex201/ex201.1.1", + //"201.1.end": "ex201/ex201.1.end", + //"201.2.1": "ex201/ex201.2.1", + //"201.2.end": "ex201/ex201.2.end", + //"201.3.1": "ex201/ex201.3.1", + //"201.3.end": "ex201/ex201.3.end", + //"201.4.1": "ex201/ex201.4.1", + //"201.4.end": "ex201/ex201.4.end", + //"201.5.1": "ex201/ex201.5.1", + //"201.5.end": "ex201/ex201.5.end", + //"211.1.1": "ex211/ex211.1.1", + //"301.4.1": "ex301/ex301.4.1", + //"401.1.1": "ex401/ex401.1.1", + //"401.1.end": "ex401/ex401.1.end", + //"401.3.1": "ex401/ex401.3.1", + //"401.3.end": "ex401/ex401.3.end", + //"full_demo": "full-demo,", +] pipeline { agent any - environment { + environment { maintainer = "t" imagename = 'g' tag = 'l' @@ -45,9 +67,9 @@ pipeline { sh 'rm -rf ../bin/*' sh 'mv ./bin/* ../bin/.' } - } + } } - } + } stage('Clean') { steps { script { @@ -61,16 +83,6 @@ pipeline { } } } - } - stage('Build Base') { - steps { - script { - docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-${maintainer}") { - def baseImg = docker.build("${maintainer}/${imagename}:base-${tag}", "--no-cache --pull base") - baseImg.push("base-${tag}") - } - } - } } stage('Build exerciseSets') { steps { @@ -79,226 +91,16 @@ pipeline { // def tagSet = generateTagSet() // def builds = build(tagSet) - if(env.BRANCH_NAME == "202109") { + if(env.BRANCH_NAME == TARGET_BRANCH) { //builds.each{ k, v -> echo ("push ${k}") } //for local testing // builds.each{ k, v -> v.push(k) } <- not used anymore - def exerciseFolders = [ - "base": "base", - "101.1.1": "ex101/ex101.1.1", - "201.end": "ex201/ex201.end", - //"201.1.1": "ex201/ex201.1.1", - //"201.1.end": "ex201/ex201.1.end", - //"201.2.1": "ex201/ex201.2.1", - //"201.2.end": "ex201/ex201.2.end", - //"201.3.1": "ex201/ex201.3.1", - //"201.3.end": "ex201/ex201.3.end", - //"201.4.1": "ex201/ex201.4.1", - //"201.4.end": "ex201/ex201.4.end", - //"201.5.1": "ex201/ex201.5.1", - //"201.5.end": "ex201/ex201.5.end", - //"211.1.1": "ex211/ex211.1.1", - //"301.4.1": "ex301/ex301.4.1", - //"401.1.1": "ex401/ex401.1.1", - //"401.1.end": "ex401/ex401.1.end", - //"401.3.1": "ex401/ex401.3.1", - //"401.3.end": "ex401/ex401.3.end", - //"full_demo": "full-demo,", - ] - exerciseFolders.each { exercise, folder -> + EXERCISE_FOLDERS.each { exercise, folder -> def build = docker.build("${maintainer}/${imagename}:${exercise}-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ${folder}") build.push("${exercise}-${tag}") } - - /* - def build = docker.build("${maintainer}/${imagename}:101.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex101/ex101.1.1") - build.push("101.1.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:base-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} base") - build.push("base-${tag}") - - build = docker.build("${maintainer}/${imagename}:full_demo-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} full-demo/") - build.push("full_demo-${tag}") - - build = docker.build("${maintainer}/${imagename}:401.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.1.1") - build.push("401.1.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:401.1.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.1.end") - build.push("401.1.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:401.3.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.3.1") - build.push("401.3.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:401.3.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.3.end") - build.push("401.3.end-${tag}") - - - - build = docker.build("${maintainer}/${imagename}:301.4.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex301/ex301.4.1") - build.push("301.4.1-${tag}") - - - - - - build = docker.build("${maintainer}/${imagename}:201.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.1.1") - build.push("201.1.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.1.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.1.end") - build.push("201.1.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.2.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.2.1") - build.push("201.2.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.2.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.2.end") - build.push("201.2.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.3.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.3.1") - build.push("201.3.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.3.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.3.end") - build.push("201.3.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.4.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.4.1") - build.push("201.4.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.4.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.4.end") - build.push("201.4.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.5.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.5.1") - build.push("201.5.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:201.5.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex201/ex201.5.end") - build.push("201.5.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:211.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex211/ex211.1.1") - build.push("211.1.1-${tag}") - - - build = docker.build("${maintainer}/${imagename}:101.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex101/ex101.1.1") - build.push("101.1.1-${tag}") - */ - - /* - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - - - - */ - - - - - /* - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - - build = docker.build("${maintainer}/${imagename}:-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} /") - build.push("-${tag}") - - build = docker.build("${maintainer}/${imagename}:$i-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} $i/$i") - build.push("$i-${tag}") - - build = docker.build("${maintainer}/${imagename}:401.3.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.3.end") - build.push("401.3.end-${tag}") - - - build = docker.build("${maintainer}/${imagename}:401.3.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.3.end") - build.push("401.3.end-${tag}") - - build = docker.build("${maintainer}/${imagename}:401.3.end-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex401/ex401.3.end") - build.push("401.3.end-${tag}") - */ - - - /* - docker pull "tier/gte:401.3.end-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:401.3.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:401.1.end-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:401.1.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:301.4.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:211.1.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.5.end-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.5.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.4.end-$GROUPER_GTE_DOCKER_BRANCH" - ocker pull "tier/gte:201.4.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.3.end-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.3.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.2.end-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.2.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.1.end-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:201.1.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:101.1.1-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:full_demo-$GROUPER_GTE_DOCKER_BRANCH" - docker pull "tier/gte:base-$GROUPER_GTE_DOCKER_BRANCH" - - - - - def build = docker.build("${maintainer}/${imagename}:101.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex101/ex101.1.1") - build.push("101.1.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:211.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex211/ex211.1.1") - build.push("211.1.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:301.4.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex301/ex301.4.1") - build.push("301.4.1-${tag}") - - build = docker.build("${maintainer}/${imagename}:full_demo-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} full-demo") - build.push("full_demo-${tag}") - */ - } else { - echo 'not building images, since the SCM branch is not 202109' + echo "not building images, since the SCM branch is not ${TARGET_BRANCH}" } } } @@ -311,8 +113,8 @@ pipeline { } } } - post { - always { + post { + always { echo 'Done Building.' } failure { diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..f8c5d29 --- /dev/null +++ b/TODO.md @@ -0,0 +1,9 @@ +TODO +===== + + +202202 +------- + +- Upgrade Shibboleth IDP to latest 4.1.4 (low priority) +- Remove folders for unused images; in Sept. 2021 we were fine with 101.1, 201.end and 401.end diff --git a/base/Dockerfile b/base/Dockerfile index ed42985..c9694ce 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,7 +1,7 @@ FROM tier/shib-idp:3.4.3_20190201 as idp # Grouper version for the entire GTE -FROM i2incommon/grouper:2.6.0 +FROM i2incommon/grouper:2.6.5 # Disable docker HEALTHCHECK inherited from tier/shib-sp HEALTHCHECK NONE diff --git a/ex101/run.sh b/ex101/run.sh index 86d6585..e226cd0 100755 --- a/ex101/run.sh +++ b/ex101/run.sh @@ -1 +1 @@ -docker run -d -p 389:389 -p 8443:443 -p 3306:3306 --name grouper-demo tier/gte:101.1.1-202109 +docker run -d -p 389:389 -p 8443:443 -p 3306:3306 --name grouper-demo tier/gte:101.1.1-202202 diff --git a/gte b/gte index 56d7a40..72c1bc2 100755 --- a/gte +++ b/gte @@ -1,7 +1,7 @@ #! /bin/bash REPOSITORY=tier/gte -VERSION_TAG=202109 +VERSION_TAG=202202 EXTRA_ARGS= RABBITMQ_FL= @@ -75,6 +75,6 @@ fi #docker stop "$1" 2> /dev/null #docker rm "$1" 2> /dev/null -#docker run -d -p 8443:443 --link rabbitmq:rabbitmq --name $1 tier/gte:"$1"-202106 +#docker run -d -p 8443:443 --link rabbitmq:rabbitmq --name $1 tier/gte:"$1"-202202 echo "Starting container tier/gte:"$LESSON_ID"-$VERSION_TAG" docker run -p 8443:443 $EXTRA_ARGS --name $LESSON_ID tier/gte:"$LESSON_ID"-$VERSION_TAG $* diff --git a/internal/createNew.txt b/internal/createNew.txt index 2116bf7..4f93b7e 100644 --- a/internal/createNew.txt +++ b/internal/createNew.txt @@ -7,7 +7,7 @@ storage 30gig security group: gte-training tag env training -user data script from https://github.internet2.edu/docker/grouper_training/raw/202106/internal/userdata.sh +user data script from https://github.internet2.edu/docker/grouper_training/raw/202202/internal/userdata.sh ssh -i gte-training-master.pem ec2-user@3.136.154.33 diff --git a/internal/mkstudent.sh b/internal/mkstudent.sh index cbb5111..0e3bd3d 100644 --- a/internal/mkstudent.sh +++ b/internal/mkstudent.sh @@ -2,7 +2,7 @@ export GROUPER_GTE_BRANCH=GROUPER_BUILD_CLOUD_FORMATION #export GROUPER_GTE_DOCKER_BRANCH=GROUPER_BUILD_CLOUD_FORMATION -export GROUPER_GTE_DOCKER_BRANCH=202109 +export GROUPER_GTE_DOCKER_BRANCH=202202 echo "$GROUPER_GTE_BRANCH" > /root/grouperGteBranch.txt chmod a+r /root/grouperGteBranch.txt