Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-25543

Bamboo-remote-agent-base docker image has hardcoded JDK 11 capabilities even when using JDK 17

      Issue Summary

      Though the bamboo-remote-agent-base Docker image supports JDK 11 and 17, the configured bamboo-capabilities.properties inside the image contain only a hardcoded JDK 11 version.

      This is reproducible on Data Center:

      Steps to Reproduce

      $ for jdkn in 11 17 ; do
        docker run -it --entrypoint bash atlassian/bamboo-agent-base:jdk${jdkn} -c "echo \"### atlassian/bamboo-agent-base:jdk${jdkn}\" && \
        cat /var/atlassian/application-data/bamboo-agent/bin/bamboo-capabilities.properties && \
        echo --- && /opt/java/openjdk/bin/java -version && echo"
      done
      
      ### atlassian/bamboo-agent-base:jdk11
      system.jdk.JDK\ 1.11=/opt/java/openjdk/bin/java
      JDK\ 11=/opt/java/openjdk/bin/java
      Python=/usr/bin/python3
      Python\ 3=/usr/bin/python3
      Git=/usr/bin/git
      ---
      openjdk version "11.0.20.1" 2023-08-24
      OpenJDK Runtime Environment Temurin-11.0.20.1+1 (build 11.0.20.1+1)
      OpenJDK 64-Bit Server VM Temurin-11.0.20.1+1 (build 11.0.20.1+1, mixed mode, sharing)
      
      ### atlassian/bamboo-agent-base:jdk17
      system.jdk.JDK\ 1.11=/opt/java/openjdk/bin/java  <<<<<< HERE
      JDK\ 11=/opt/java/openjdk/bin/java               <<<<<< HERE
      Python=/usr/bin/python3
      Python\ 3=/usr/bin/python3
      Git=/usr/bin/git
      ---
      openjdk version "17.0.9" 2023-10-17
      OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
      OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode, sharing)
      

      Expected Results

      -jdk11 should have JDK 11 capabilities and -jdk17 should have JDK 17

      Actual Results

      Both docker (11 and 17) images report JDK 11 in the bamboo-capabilities.properties file.

      Workaround

      Add a custom entrypoint script to the JDK 17 Docker image that would run:

      /bamboo-update-capability.sh "system.jdk.JDK 17" ${JAVA_HOME}/bin/java \
          && /bamboo-update-capability.sh "JDK 17" ${JAVA_HOME}/bin/java \
      

            [BAM-25543] Bamboo-remote-agent-base docker image has hardcoded JDK 11 capabilities even when using JDK 17

            Yevhen added a comment -

            Yevhen added a comment - https://bitbucket.org/atlassian-docker/docker-bamboo-agent-base/pull-requests/47

              c64f33b2bce3 Yevhen
              73868399605e Eduardo Alvarenga
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: