Giter Site home page Giter Site logo

paketo-buildpacks / adoptium Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 5.0 768 KB

A Cloud Native Buildpack that provides the Adoptium implementations of JREs and JDKs

License: Apache License 2.0

Go 54.39% Shell 45.61%
cnb adopt-openjdk jvm jvm-applications adoptium hacktoberfest

adoptium's People

Contributors

anthonydahanne avatar christopherclark avatar chuckquinniv avatar dashaun avatar dependabot[bot] avatar dmikusa avatar eddumelendez avatar ekcasey avatar modulo11 avatar nebhale avatar paketo-bot avatar pivotal-david-osullivan avatar twoseat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

adoptium's Issues

Inconsistent adoptium version

The output generated during building an image using the Paketo Adoptium Buildpack is inconsistent regarding the version of the Adoptium JDK.

Expected Behavior

I expect all ouput of the Adoptium Buildpack to reflect the actually used version of adoptium consitently.

Current Behavior

The first line produced by the adoptium buildpack contains Adoptium version 11.0.0:
Paketo Buildpack for Adoptium 11.0.0
The following lines contradict this in that they contain version 17, here are some examples:
$BP_JVM_VERSION 17
Adoptium JRE 17.0.6: Contributing to layer
Downloading from https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.6%2B10/OpenJDK17U-jre_x64_linux_hotspot_17.0.6_10.tar.gz

The last line refers to adoptium 11.0.0 again:
Finished running build for buildpack paketo-buildpacks/[email protected]

The generated image actually uses Adoptium Temurin 17, so only the first and last line are wrong.

Possible Solution

Fix the wrong output.

Steps to Reproduce

Build an image using Paketo Adoptium Buildpack.

Motivations

It's misleading that the output contains different versions. To avoid misunderstandings it should only contain the correct version which is actually used.

edit

I've added the complete output as attachment:
paketo-buildpack-adoptium-output-java-11-17.txt

And I've also added more information to the section "Current Behavior".

JDK 21

Temurin 21 was released today. Can it be added to the buildpack?

buildpack.toml is missing

Until today my Spring Boot applications were successfully build. Today all my applications could not build anymore.

Expected Behavior

The build should be successful.

Current Behavior

The build failed with following error:

[INFO] --- spring-boot:3.1.3:build-image-no-fork (default) @ my-service ---
[WARNING]  Parameter 'imageName' (user property 'spring-boot.build-image.imageName') is read-only, must not be used in configuration
[WARNING]  Parameter 'publish' (user property 'spring-boot.build-image.publish') is read-only, must not be used in configuration
[INFO] Building image 'gitlab.mycomp.com:5005/group/subgroup/my-service:1351'
[INFO] 
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder:base' 100%
[INFO]  > Pulled builder image 'paketobuildpacks/builder@sha256:17ea21162ba8c7717d3ead3ee3836a368aced7f02f2e59658e52029bd6d149e7'
[INFO]  > Pulling run image 'docker.io/paketobuildpacks/run:base-cnb' 100%
[INFO]  > Pulled run image 'paketobuildpacks/run@sha256:1af9935d8987fd52b2266d288200c9482d1dd5529860bbf5bc2d248de1cb1a38'
[INFO]  > Pulling buildpack image 'gcr.io/paketo-buildpacks/adoptium:11.2.3' 100%
[INFO]  > Pulled buildpack image 'gcr.io/paketo-buildpacks/adoptium@sha256:c748c03a1d22adba9f5eaba450363f24de7db038c2d4d5e38997d44dfe9e9b99'
[INFO]  > Pulling buildpack image 'gcr.io/paketo-buildpacks/health-checker:latest' 100%
[INFO]  > Pulled buildpack image 'gcr.io/paketo-buildpacks/health-checker@sha256:ffbc1804adbed9c7c6849e10c55669728dbbc77baebcc432fd87a425ed1cc6bc'
[INFO]  > Executing lifecycle version v0.16.5
[INFO]  > Using build cache volume 'pack-cache-fbacccace87f.build'
[INFO] 
[INFO]  > Running creator
[INFO]     [creator]     ===> ANALYZING
[INFO]     [creator]     Image with name "gitlab.mycomp.com:5005/group/subgroup/my-service:1351" not found
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     ERROR: failed to initialize detector: open /cnb/buildpacks/paketo-buildpacks_adoptium/11.2.3/buildpack.toml: no such file or directory

Steps to Reproduce

My Spring Boot Maven Plugin configuration:

<configuration>
	<image>
		<env>
			<BP_SPRING_CLOUD_BINDINGS_DISABLED>true</BP_SPRING_CLOUD_BINDINGS_DISABLED>
			<BP_OCI_DESCRIPTION>${project.description}</BP_OCI_DESCRIPTION>
			<BP_OCI_VENDOR>${project.organization.name}</BP_OCI_VENDOR>
			<BP_OCI_CREATED>${maven.build.timestamp}</BP_OCI_CREATED>
			<BP_OCI_SOURCE>${CI_PROJECT_URL}</BP_OCI_SOURCE>
			<BP_OCI_REVISION>${CI_COMMIT_SHA}</BP_OCI_REVISION>
			<BP_HEALTH_CHECKER_ENABLED>true</BP_HEALTH_CHECKER_ENABLED>
			<THC_PORT>8081</THC_PORT>
			<THC_PATH>/health</THC_PATH>
		</env>
		<buildpacks>
			<buildpack>gcr.io/paketo-buildpacks/adoptium:11.2.3</buildpack> 
			<buildpack>urn:cnb:builder:paketo-buildpacks/java</buildpack>
			<buildpack>gcr.io/paketo-buildpacks/health-checker:latest</buildpack>
		</buildpacks>
		<createdDate>${maven.build.timestamp}</createdDate>
	</image>
	<docker>
		<publishRegistry>
			<url>${docker.publishRegistry.url}</url>
			<username>${docker.publishRegistry.username}</username>
			<password>${docker.publishRegistry.password}</password>
		</publishRegistry>
	</docker>
</configuration>

Maven is executed on GitLab Runner with following job:

.build-java:
  image: maven:3.9.3-eclipse-temurin-17
  stage: build
  tags:
    - intern
  variables: 
    MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN"
    MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
    GOAL: "package"
  script:
    - mvn $MAVEN_CLI_OPTS $GOAL $SONAR_PLUGIN
      -Dspring-boot.build-image.imageName=$CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
      -Dspring-boot.build-image.publish=$PUBLISH
      -Ddocker.publishRegistry.username="$CI_REGISTRY_USER"
      -Ddocker.publishRegistry.password="$CI_REGISTRY_PASSWORD"
      -Ddocker.publishRegistry.url="$CI_REGISTRY"

I tried also with the latest version of gcr.io/paketo-buildpacks/adoptium, but this didn't fix the problem. Also I removed all images and volumes on the runner, but it didn't fix the problem either.

I also set BP_LOG_LEVEL with DEBUG, but I got no additional logs.

Documentation: JRE 17 Support

The following disclaimer is present in the README.md:

Please note that starting with Java version 16, the upstream Adoptium project has elected to forgo JRE releases. As such, this buildpack will only include JREs for Java 8 and 11. If you select a JRE for 16+, you'll end up with a JDK instead.

However, the FAQ link no longer references forgoing JRE releases & Adoptium seems to have Java 17 JREs released.

Is this warning still accurate / needed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.