Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.0 #14

Merged
merged 9 commits into from
May 30, 2024
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
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
insert_final_newline = true

[{*.kt,*.kts}]
ident_size = 4
max_line_length = 80
ktlint_code_style = ktlint_official
ktlint_experimental = enabled
ktlint_standard_no-wildcard-imports = disabled
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
java-version: '21'

- name: Get Gradle Version
run: |
echo "TAGS=latest" >> $GITHUB_ENV
SUFFIX=""
VERSION=$(grep 'version' build.gradle | cut -f 2 -d "'")$SUFFIX
VERSION=$(grep 'version =' build.gradle.kts | cut -f 2 -d '"')$SUFFIX
echo "VERSION=$VERSION" >> $GITHUB_ENV
REPO=$(echo $GITHUB_REPOSITORY | cut -f 2 -d "/")
echo "REPO=$REPO" >> $GITHUB_ENV
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
-Dquarkus.container-image.additional-tags=${{ env.TAGS }}

- name: Creating GitHub Tag
uses: mathieudutour/github-tag-action@v6.1
uses: mathieudutour/github-tag-action@v6.2
with:
custom_tag: ${{ env.VERSION }}
tag_prefix: ''
Expand All @@ -86,7 +86,7 @@ jobs:
/bin/cp -f README.md build/jacoco-report/.

- name: Publishing to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
publish_dir: ./build/jacoco-report
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
java-version: '21'

- name: Generating self-signed certificate
run: |
Expand Down
50 changes: 0 additions & 50 deletions build.gradle

This file was deleted.

70 changes: 70 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
plugins {
kotlin("jvm") version "1.9.24"
kotlin("plugin.allopen") version "1.9.24"
id("io.quarkus")
}

repositories {
mavenCentral()
mavenLocal()
}

val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project

dependencies {
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("io.smallrye.config:smallrye-config-source-file-system")
implementation("io.quarkus:quarkus-micrometer-registry-prometheus")
implementation("io.quarkus:quarkus-smallrye-openapi")
implementation("io.quarkus:quarkus-smallrye-health")
implementation("io.quarkus:quarkus-rest")
implementation("io.quarkus:quarkus-rest-jackson")
implementation("io.quarkus:quarkus-container-image-docker")
implementation("io.quarkus:quarkus-info")
implementation("io.quarkus:quarkus-kotlin")
implementation("io.quarkus:quarkus-arc")
testImplementation("io.quarkus:quarkus-junit5")
testImplementation("io.rest-assured:rest-assured")
testImplementation("io.rest-assured:kotlin-extensions")
testImplementation("io.quarkus:quarkus-jacoco")
}

group = "com.testainers"
version = "0.1.0"

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType<Test> {
systemProperty(
"java.util.logging.manager",
"org.jboss.logmanager.LogManager"
)

testLogging {
events(
"PASSED",
"SKIPPED",
"FAILED",
"STANDARD_OUT",
"STANDARD_ERROR"
)
}
}

allOpen {
annotation("jakarta.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("jakarta.persistence.Entity")
annotation("io.quarkus.test.junit.QuarkusTest")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_21.toString()
kotlinOptions.javaParameters = true
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Gradle properties
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.7.2
quarkusPluginVersion=3.11.0
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=3.7.2
quarkusPlatformVersion=3.11.0
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 0 additions & 11 deletions settings.gradle

This file was deleted.

13 changes: 13 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pluginManagement {
val quarkusPluginVersion: String by settings
val quarkusPluginId: String by settings
repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal()
}
plugins {
id(quarkusPluginId) version quarkusPluginVersion
}
}
rootProject.name="httpbucket"
3 changes: 1 addition & 2 deletions src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi8/openjdk-17:1.18
FROM registry.access.redhat.com/ubi8/openjdk-21:1.18

ENV LANGUAGE='en_US:en'


# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 build/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 build/quarkus-app/*.jar /deployments/
Expand Down
6 changes: 3 additions & 3 deletions src/main/docker/Dockerfile.legacy-jar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=legacy-jar
# ./gradlew build -Dquarkus.package.jar.type=legacy-jar
#
# Then, build the image with:
#
Expand Down Expand Up @@ -77,7 +77,7 @@
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi8/openjdk-17:1.18
FROM registry.access.redhat.com/ubi8/openjdk-21:1.18

ENV LANGUAGE='en_US:en'

Expand All @@ -90,4 +90,4 @@ USER 185
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"

ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=native
# ./gradlew build -Dquarkus.native.enabled=true
#
# Then, build the image with:
#
Expand All @@ -24,4 +24,4 @@ COPY --chown=1001:root build/*-runner /work/application
EXPOSE 8080
USER 1001

ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile.native-micro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=native
# ./gradlew build -Dquarkus.native.enabled=true
#
# Then, build the image with:
#
Expand Down Expand Up @@ -38,4 +38,4 @@ EXPOSE 8443

USER 1001

ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
Loading