-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
-
This is an interesting one.
The code:
https://github.com/rh-openjdk/jdkContainerOsTests/blob/main/containersQa/testlib.bash#L523C1-L552C2
function s2iLocal()
{ prepareS2I setUser if [ "x$s2iBin" == "xundef" -o "x$s2iBin" == "x" ] ; then echo $SKIPPED return fi local d=`mktemp -d` pushd $d DF=s2iDockerFile # branch needed here to allow for the added variables needed for a Jenkins Build. $JENKINS_BUILD will be # defined in the calling function if it is attempting to build a Jenkins plug-in. if [[ "$JENKINS_BUILD" == "yes" ]] ; then # copy the jenkins settings file to the local tmp directory $s2iBin build -e "$MAIN" -e "$ARGS" -e "$SETTING_ARGS" "$REPO" "$HASH" "$NAME" --as-dockerfile $DF.orig cp $LIBCQA_SCRIPT_DIR/jenkins_settings.xml upload/src else $s2iBin build -e "$MAIN" -e "$ARGS" "$REPO" "$HASH" "$NAME" --as-dockerfile $DF.orig fi if [ "x$OVERWRITE_USER" == x ] ; then #update the container file for proper functionality cat $DF.orig | sed "s;/usr/libexec;/usr/local;g" | sed "s;1001:0;$USERNAME:$USERNAME;g" | sed "s;1001;$USERNAME;g" | sed "s;/s2i/run;/s2i/run $ADDS;g;" > $DF.nw1 else cat $DF.orig | sed "s;/s2i/run;/s2i/run $ADDS;g;" > $DF.nw1 fi cat $DF.nw1 | tee $DF buildFileWithHash $DF popd rm -rf $d }This sed command sed "s;1001;$USERNAME;g" is causing the username to get inserted into the container hash:
http://hydra.brq.redhat.com:8080/job/containerqa-jp21-ojdk21~rhel9~ubi~containers-el9z.x86_64-all.sdk-el9z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff/9/
Should be this:
64628742ee2a8225eb0eb8a55112f030c41001e8c00e1deb2cd37e5ef0c66c1e
Is
64628742ee2a8225eb0eb8a55112f030c4defaulte8c00e1deb2cd37e5ef0c66c1e
Also change this:
Whilst you're at it, if you add "--image-scripts-url image:///usr/local/s2i"
would remove the need for this sed
+ sed 's;/usr/libexec;/usr/local;g'
- mentioned in
-
Page Loading...