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

            Shashank Kumar made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 851561 ]
            Shashank Kumar made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 851561 ]
            Yevhen made changes -
            Fix Version/s New: 8.1.12 [ 104622 ]
            Fix Version/s New: 9.1.3 [ 104995 ]
            Fix Version/s New: 9.0.4 [ 104670 ]
            Fix Version/s New: 8.2.9 [ 104671 ]
            Fix Version/s New: 9.2.7 [ 106156 ]
            Fix Version/s New: 9.3.5 [ 106408 ]
            Fix Version/s New: 9.4.1 [ 106314 ]
            Yevhen made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Review [ 10051 ] New: Closed [ 6 ]
            Shashank Kumar made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 840184 ]
            Eduardo Alvarenga (Inactive) made changes -
            Affects Version/s New: 8.1.12 [ 104622 ]
            Eduardo Alvarenga (Inactive) made changes -
            Affects Version/s New: 9.1.3 [ 104995 ]
            Affects Version/s New: 9.0.4 [ 104670 ]
            Affects Version/s New: 8.2.9 [ 104671 ]
            Yevhen made changes -
            Assignee New: Yevhen [ c64f33b2bce3 ]
            Yevhen made changes -
            Status Original: In Progress [ 3 ] New: In Review [ 10051 ]
            Yevhen made changes -
            Status Original: Needs Triage [ 10030 ] New: In Progress [ 3 ]

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

                Created:
                Updated:
                Resolved: