From f9be0d94b8cc2b8e6c81c90801e96910a7314605 Mon Sep 17 00:00:00 2001 From: Olya Gupalo Date: Wed, 18 Dec 2024 10:39:29 +0200 Subject: [PATCH] Move java-hello-world-maven to clouds/native-oci-cloud-shell --- ...aven.yml => clouds-native-oci-cloud-shell.yml} | 15 +++++++-------- .../native-oci-cloud-shell}/README-Cloud-Shell.md | 8 ++++---- .../native-oci-cloud-shell}/README.md | 0 .../native-oci-cloud-shell}/pom.xml | 8 +++----- .../src/main/java/com/gvm/samples/App.java | 0 .../src/test/java/com/gvm/samples/AppTest.java | 0 6 files changed, 14 insertions(+), 17 deletions(-) rename .github/workflows/{java-hello-world-maven.yml => clouds-native-oci-cloud-shell.yml} (66%) rename {java-hello-world-maven => clouds/native-oci-cloud-shell}/README-Cloud-Shell.md (92%) rename {java-hello-world-maven => clouds/native-oci-cloud-shell}/README.md (100%) rename {java-hello-world-maven => clouds/native-oci-cloud-shell}/pom.xml (95%) rename {java-hello-world-maven => clouds/native-oci-cloud-shell}/src/main/java/com/gvm/samples/App.java (100%) rename {java-hello-world-maven => clouds/native-oci-cloud-shell}/src/test/java/com/gvm/samples/AppTest.java (100%) diff --git a/.github/workflows/java-hello-world-maven.yml b/.github/workflows/clouds-native-oci-cloud-shell.yml similarity index 66% rename from .github/workflows/java-hello-world-maven.yml rename to .github/workflows/clouds-native-oci-cloud-shell.yml index d2775a2ef..4edca98fa 100644 --- a/.github/workflows/java-hello-world-maven.yml +++ b/.github/workflows/clouds-native-oci-cloud-shell.yml @@ -1,10 +1,9 @@ -name: java-hello-world-maven +name: clouds/native-oci-cloud-shell on: push: paths: - - 'java-hello-world-maven/**' - - '.github/workflows/java-hello-world-maven.yml' - # pull_request: (requires EE, which is unavailable in PRs) + - 'clouds/native-oci-cloud-shell/**' + - '.github/workflows/clouds-native-oci-cloud-shell.yml' schedule: - cron: "0 0 1 * *" # run every month workflow_dispatch: @@ -12,21 +11,21 @@ permissions: contents: read jobs: run: - name: Run 'java-hello-world-maven' + name: Run 'clouds/native-oci-cloud-shell' runs-on: ubuntu-latest timeout-minutes: 15 steps: - uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 with: - java-version: '21.0.2' + java-version: '21' distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} cache: 'maven' native-image-job-reports: 'true' - - name: Run 'java-hello-world-maven' + - name: Run 'clouds/native-oci-cloud-shell' run: | - cd java-hello-world-maven + cd clouds/native-oci-cloud-shell mvn --no-transfer-progress clean package java -jar target/my-app-1.0-SNAPSHOT.jar mvn --no-transfer-progress clean -Pnative -DskipTests package diff --git a/java-hello-world-maven/README-Cloud-Shell.md b/clouds/native-oci-cloud-shell/README-Cloud-Shell.md similarity index 92% rename from java-hello-world-maven/README-Cloud-Shell.md rename to clouds/native-oci-cloud-shell/README-Cloud-Shell.md index 21995ee3d..55b473cd1 100644 --- a/java-hello-world-maven/README-Cloud-Shell.md +++ b/clouds/native-oci-cloud-shell/README-Cloud-Shell.md @@ -10,7 +10,7 @@ Oracle GraalVM is available for use on Oracle Cloud Infrastructure (OCI) at no a ## What is Cloud Shell? -[Cloud Shell](https://www.oracle.com/devops/cloud-shell/) is a free-to-use browser-based terminal accessible from the Oracle Cloud Console. It provides access to a Linux shell with preinstalled developer tools and a preauthenticated OCI CLI. You can use the shell to interact with OCI resources, follow labs and tutorials, and quickly run utility commands. +[Cloud Shell](https://www.oracle.com/devops/cloud-shell/) is a free-to-use browser-based terminal accessible from the Oracle Cloud Console. It provides access to a Linux shell with preinstalled developer tools and a pre-authenticated OCI CLI. You can use the shell to interact with OCI resources, follow labs and tutorials, and quickly run utility commands. Oracle GraalVM for JDK 17 (with Native Image) is preinstalled in Cloud Shell, so you don’t have to install and configure a development machine to get started. @@ -50,7 +50,6 @@ Oracle GraalVM for JDK 17 (with Native Image) is preinstalled in Cloud Shell, so This step is optional - [Check software version and environment variables](../_common/README-check-version-env-vars.md) - ## Step 4: Set up your project, build and run as a JAR 1. Git clone this example. @@ -69,7 +68,6 @@ This step is optional - [Check software version and environment variables](../_c git pull --depth=1 origin master cd java-hello-world-maven - ``` 2. Build a JAR file for the example app. @@ -78,7 +76,7 @@ This step is optional - [Check software version and environment variables](../_c mvn clean package ``` -3. Run the JAR using: +3. Run the JAR: ```shell java -jar target/my-app-1.0-SNAPSHOT.jar @@ -148,3 +146,5 @@ You will notice the `Quick Build` mode reduces the time required to generate a n ```text Hello World! ``` + +Learn how to start using Oracle GraalVM with other OCI services at [docs.oracle.com](https://docs.oracle.com/en/graalvm/jdk/23/docs/getting-started/oci/). \ No newline at end of file diff --git a/java-hello-world-maven/README.md b/clouds/native-oci-cloud-shell/README.md similarity index 100% rename from java-hello-world-maven/README.md rename to clouds/native-oci-cloud-shell/README.md diff --git a/java-hello-world-maven/pom.xml b/clouds/native-oci-cloud-shell/pom.xml similarity index 95% rename from java-hello-world-maven/pom.xml rename to clouds/native-oci-cloud-shell/pom.xml index f0b3e5778..89c164255 100644 --- a/java-hello-world-maven/pom.xml +++ b/clouds/native-oci-cloud-shell/pom.xml @@ -17,7 +17,7 @@ 17 17 3.2.2 - 0.9.28 + 0.10.3 @@ -43,8 +43,7 @@ - - + @@ -78,13 +77,12 @@ my-app true - -H:+ReportExceptionStackTraces - + diff --git a/java-hello-world-maven/src/main/java/com/gvm/samples/App.java b/clouds/native-oci-cloud-shell/src/main/java/com/gvm/samples/App.java similarity index 100% rename from java-hello-world-maven/src/main/java/com/gvm/samples/App.java rename to clouds/native-oci-cloud-shell/src/main/java/com/gvm/samples/App.java diff --git a/java-hello-world-maven/src/test/java/com/gvm/samples/AppTest.java b/clouds/native-oci-cloud-shell/src/test/java/com/gvm/samples/AppTest.java similarity index 100% rename from java-hello-world-maven/src/test/java/com/gvm/samples/AppTest.java rename to clouds/native-oci-cloud-shell/src/test/java/com/gvm/samples/AppTest.java