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 #123

Closed jimmyliang-gov closed 2 weeks ago

jimmyliang-gov commented 3 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.

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 3 weeks ago

@itewk / @dwinchell - Please take a look.

jimmyliang-gov commented 2 weeks ago

Taking a look into the build failure.... i see this:

IMAGE_TAG_LOCAL: localhost:5000/${{ secrets.REGISTRY_REPOSITORY }}/ploigos-base:latest.ubi8

is it because the ${{ secrets.REGISTRY_REPOSITORY }} is not defined? and hence it's generating localhost:5000//ploigos-base:latest:ubi8 (with the double slash). Do you know why this is?

jimmyliang-gov commented 2 weeks ago

I updated the branch the updated publish.yaml

itewk commented 2 weeks ago

@jimmyliang-gov due to the way CI secrets work in github, the branch has to be on the main project and not from a fork for the CI to work. i have added you as a comitter on this project so you can push your branch to this project and re-open the PR to get the CI to start running. please close out this one and open new one from bracnh right on the project. sorry for the pain.

jimmyliang-gov commented 2 weeks ago

This PR will go into a feature branch and then merged into Main from there.