diff --git a/initial-configuration/jenkins/jenkins-docker/Dockerfile b/initial-configuration/jenkins/jenkins-docker/Dockerfile index a8ade3e6..12c9d0fd 100644 --- a/initial-configuration/jenkins/jenkins-docker/Dockerfile +++ b/initial-configuration/jenkins/jenkins-docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins/jenkins:2.440-jdk11 +FROM jenkins/jenkins:2.442-jdk11 COPY plugins.yml /usr/share/jenkins/ref/plugins.yml diff --git a/initial-configuration/jenkins/jenkins-docker/jobs/Update User Token/config.xml b/initial-configuration/jenkins/jenkins-docker/jobs/Update User Token/config.xml index 4a0a9b74..967fa68d 100644 --- a/initial-configuration/jenkins/jenkins-docker/jobs/Update User Token/config.xml +++ b/initial-configuration/jenkins/jenkins-docker/jobs/Update User Token/config.xml @@ -61,7 +61,7 @@ grep client_secret /usr/local/docker-config/wildfly/standalone.xml | cut -d &apo export USER_SUBJECT=`docker run -i -v /root/.my.cnf:/root/.my.cnf --network=${MYSQL_NETWORK:-host} mysql mysql -N -e \ "SELECT subject FROM auth.user where email='$USERNAME'; "` -export user_token=`java -jar generateJwt.jar secret.txt sub "${USER_SUBJECT}" ${DAYSUNTILEXPIRATION} day | grep -v "Generating"` +export user_token=`java -jar generateJwt.jar secret.txt sub "LONG_TERM_TOKEN|${USER_SUBJECT}" ${DAYSUNTILEXPIRATION} day | grep -v "Generating"` docker run -i -v /root/.my.cnf:/root/.my.cnf --network=${MYSQL_NETWORK:-host} mysql mysql -e \ "update auth.user set long_term_token='$user_token' where email='$USERNAME';" diff --git a/update-jenkins.sh b/update-jenkins.sh index 67f57d7d..28d6b32e 100755 --- a/update-jenkins.sh +++ b/update-jenkins.sh @@ -35,6 +35,8 @@ fi # Pull through previous PICSURE configurations sed -i "s|__PROJECT_SPECIFIC_OVERRIDE_REPO__|`cat /var/jenkins_home_bak/config.xml | grep -A1 project_specific_override_repo | tail -1 | sed 's/<\/*string>//g' | sed 's/ //g' `|g" /var/jenkins_home/config.xml sed -i "s|__RELEASE_CONTROL_REPO__|`cat /var/jenkins_home_bak/config.xml | grep -A1 release_control_repo | tail -1 | sed 's/<\/*string>//g' | sed 's/ //g' `|g" /var/jenkins_home/config.xml +sed -i "s|/usr/local/docker-config/|`cat /var/jenkins_home_bak/config.xml | grep -A1 DOCKER_CONFIG_DIR | tail -1 | sed 's/<\/*string>//g' | sed 's/ //g' `|g" /var/jenkins_home/config.xml +sed -i "s|host|`cat /var/jenkins_home_bak/config.xml | grep -A1 MYSQL_NETWORK | tail -1 | sed 's/<\/*string>//g' | sed 's/ //g' `|g" /var/jenkins_home/config.xml sed -i "s|*/master|`cat /var/jenkins_home_bak/config.xml | grep -A1 release_control_branch | tail -1 | sed 's/<\/*string>//g' | sed 's/ //g' `|g" /var/jenkins_home/config.xml