Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/java-sample-app-ecr-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ jobs:
- name: Build and Upload Main Service Image
working-directory: sample-apps/java/springboot-main-service
run: |
# For Java 8, springboot must be lower than version 3
# For Java 11,17,21, they are compatible with both springboot version
# For Java 22 and above, springboot must be version 3 or higher
if [ "${{ matrix.java-version }}" = "22" ]; then
sed -i 's/id("org.springframework.boot")/id("org.springframework.boot") version "3.3.4"/' build.gradle.kts
cat build.gradle.kts
fi

sed -i 's#"{{ECR_IMAGE_URI}}"#"${{ env.E2E_TEST_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/${{ env.JAVA_MAIN_SAMPLE_APP_IMAGE }}:v${{ matrix.java-version }}"#g' build.gradle.kts
gradle jib -P javaVersion=${{ matrix.java-version }}

Expand Down Expand Up @@ -157,5 +165,13 @@ jobs:
- name: Build and Upload Remote Service Image
working-directory: sample-apps/java/springboot-remote-service
run: |
# For Java 8, springboot must be lower than version 3
# For Java 11,17,21, they are compatible with both springboot version
# For Java 22 and above, springboot must be version 3 or higher
if [ "${{ matrix.java-version }}" = "22" ]; then
sed -i 's/id("org.springframework.boot")/id("org.springframework.boot") version "3.3.4"/' build.gradle.kts
cat build.gradle.kts
fi

sed -i 's#"{{ECR_IMAGE_URI}}"#"${{ env.E2E_TEST_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/${{ env.JAVA_REMOTE_SAMPLE_APP_IMAGE }}:v${{ matrix.java-version }}"#g' build.gradle.kts
gradle jib -P javaVersion=${{ matrix.java-version }}
3 changes: 3 additions & 0 deletions sample-apps/java/springboot-main-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ plugins {
id("org.springframework.boot")
id("io.spring.dependency-management") version "1.1.0"
id("com.google.cloud.tools.jib")
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}

group = "com.amazon.sampleapp"
Expand All @@ -46,6 +47,8 @@ dependencies {
implementation("software.amazon.awssdk:sts")
implementation("com.mysql:mysql-connector-j:8.4.0")
implementation ("org.apache.httpcomponents:httpclient:4.5.13")
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.20")
testImplementation("org.jetbrains.kotlin:kotlin-test:2.0.20")
}

jib {
Expand Down
3 changes: 3 additions & 0 deletions sample-apps/java/springboot-remote-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ plugins {
id("org.springframework.boot")
id("io.spring.dependency-management") version "1.1.0"
id("com.google.cloud.tools.jib")
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}

group = "com.amazon.sampleapp"
Expand All @@ -41,6 +42,8 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation ("org.apache.httpcomponents:httpclient:4.5.13")
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.20")
testImplementation("org.jetbrains.kotlin:kotlin-test:2.0.20")
}

jib {
Expand Down