Announcing GraalVM Enterprise in Oracle Cloud Infrastructure DevOps

July 7, 2022 | 2 minute read
Sachin Pikle
Product Strategy Director
Text Size 100%:

Today, we are announcing that you can use GraalVM Enterprise directly in Oracle Cloud Infrastructure (OCI) DevOps build pipelines to build high-performance Java applications, at no additional cost. 

GraalVM is a high-performance JDK distribution that accelerates Java workloads. GraalVM Native Image ahead-of-time compilation builds Java applications into native executables that are small, start fast, and use less memory and CPU. At build time, GraalVM Native Image analyzes a Java application and its dependencies to identify just what classes, methods, and fields are necessary and generates optimized machine code for just those elements. Leading Java microservices frameworks such as Spring Boot, Micronaut, Quarkus and Helidon use GraalVM Native Image. 

OCI DevOps service provides a continuous integration and deployment (CI/CD) platform for developers to automate the build, test, and deployment of software applications in Oracle Cloud. OCI DevOps build and deployment pipelines reduce change-driven errors and decrease the time customers spend on building and deploying software. The service also includes private Git repositories to store your code and provides connections to external code repositories.  

Using GraalVM Enterprise in DevOps Build Pipelines 

You can install and use GraalVM Enterprise components such as Native Image and Java Development Kit (JDK) by adding a simple YUM package manager command in your build specification file. 

  1. Add a command to install one or more required GraalVM Enterprise components. For example, the following command installs Native Image along with JDK and other necessary dependencies. 

steps: 

  - type: Command 

    name: "Install the latest GraalVM Enterprise 22.x for Java 17 - JDK and Native Image" 

    command: | 

      yum -y install graalvm22-ee-17-native-image 

  1. Set the JAVA_HOME environment variable. 

env: 

  variables: 

    "JAVA_HOME" : "/usr/lib64/graalvm/graalvm22-ee-java17" 

  1. Set the PATH environment variable. 

env: 

  variables: 

    # PATH is a reserved variable and cannot be defined as a variable. 

    # PATH can be changed in a build step and the change is visible in subsequent steps. 

steps: 

  - type: Command 

    name: "Set the PATH here" 

    command: | 

      export PATH=$JAVA_HOME/bin:$PATH 

  1. Build a native executable from your Java application. 

steps: 

  - type: Command 

    name: "Build a native executable with GraalVM Enterprise 22.x for Java 17 - Native Image" 

    command: | 

      mvn --no-transfer-progress -Pnative -DskipTests package 

 

Now you can easily build high-performance native Java applications in Oracle Cloud with GraalVM Enterprise and OCI DevOps at no additional cost. For more information, refer to 

  1. Documentation: Using GraalVM Enterprise in DevOps Build Pipelines 

  1. Sample: Build a native executable for a Java app with GraalVM Enterprise in DevOps Build Pipelines 

  1. Sample: Build a native executable for a Micronaut app with GraalVM Enterprise in DevOps Build Pipelines 

Sachin Pikle

Product Strategy Director

Sachin Pikle is a Product Strategy Director for GraalVM and Graal Cloud Native in Oracle Labs.


Previous Post

Java Card Forum 25 years anniversary

Nicolas Ponsini | 3 min read

Next Post


JavaOne Update Series: Part 1

Chad Arimura | 3 min read