Skip to content

Commit

Permalink
[ALS-7703] Patches for GIC release
Browse files Browse the repository at this point in the history
- Bump jenkins version
- Fix Update User Token job to work with psama >=3.2.x
- Long awaited fix to persist DOCKER_CONFIG_DIR, and MYSQL_NETWORK vars through restart
  • Loading branch information
Luke Sikina committed Oct 28, 2024
1 parent 3656d3f commit b830d52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion initial-configuration/jenkins/jenkins-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';"
Expand Down
2 changes: 2 additions & 0 deletions update-jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit b830d52

Please sign in to comment.