ploigos / ploigos-containers

Container image definitions for the Ploigos project.
GNU General Public License v3.0
7 stars 14 forks source link

Adding Containerfiles for Gradle 8.8 #127

Closed jimmyliang-gov closed 2 weeks ago

jimmyliang-gov commented 2 weeks ago

Purpose

New Feature: Adding Containerfile for an image with Gradle build tool. This is primary used to support Scala apps that are built with Gradle. Version 8.8 of Gradle is used.

NOTE: This PR is to merge from a feature branch to the main branch within the ploigos/ploigos-containers project.

The previous PR (https://github.com/ploigos/ploigos-containers/pull/123) was to pull from a fork into a feature branch due to nuances with the CI build that was failing.

Breaking?

No

Integration Testing

This Containerfile was built and tested within an OpenShift 4.12 environment. Below is snippet from the OpenShift build that installs Gradle.

--> 0a1b5a1399c
STEP 12/17: RUN wget -qLO /tmp/gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" &&     mkdir /opt/gradle &&     unzip -d /opt/gradle /tmp/gradle.zip &&     rm /tmp/gradle.zip &&     chown -R ${PLOIGOS_USER_UID}:${PLOIGOS_USER_GID} /opt/gradle &&     chmod -R ug+wx /opt/gradle
Archive:  /tmp/gradle.zip
   creating: /opt/gradle/gradle-8.8/
  <TRUNCATED FOR BREVITY>
--> 6cbd18a06ed
STEP 13/17: ENV PATH="${PATH}:/opt/gradle/gradle-${GRADLE_VERSION}/bin"
--> 0a5f6e32c9a

The ploigos-tool-gradle was then tested with modified PSR steps that calls the Gradle CLI.

Below is a snippet from the PSR step calling unit-tests:

    --------------------------------------------------------------------------------
                         Standard Out - unit-test (GradleTest)                      
    --------------------------------------------------------------------------------
        Run unit tests

        Welcome to Gradle 8.8!

        Here are the highlights of this release:
         - Running Gradle on Java 22
         - Configurable Gradle daemon JVM
         - Improved IDE performance for large projects

        For more details see https://docs.gradle.org/8.8/release-notes.html

        Starting a Gradle Daemon (subsequent builds will be faster)
        > Task :app:compileJava
        > Task :app:processResources
        > Task :app:classes
        > Task :app:compileTestJava
        > Task :app:processTestResources NO-SOURCE
        > Task :app:testClasses
        > Task :app:test

        Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

        You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

        For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

        BUILD SUCCESSFUL in 57s
        4 actionable tasks: 4 executed
jimmyliang-gov commented 2 weeks ago

Hi @itewk - Can you help me figure out why the push for the new images isn't working? Does it have something to do with Quay and new images?

itewk commented 2 weeks ago

Hi @itewk - Can you help me figure out why the push for the new images isn't working? Does it have something to do with Quay and new images?

issue is that the repo has to exist in quay for it to push to. that has been done now. lets see if that resolves it.

itewk commented 2 weeks ago

ugg, forgot to give the robo account permissions. trying again.

itewk commented 2 weeks ago

@jimmyliang-gov thanks for the contribution. sorry for the pain and delays.