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

Latest build conv #371

Merged
merged 1 commit into from
Dec 14, 2023
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: 8 additions & 3 deletions buildSrc/src/main/kotlin/creek-common-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
*
* <p>Apply to all java modules, usually excluding the root project in multi-module sets.
*
* <p>Version: 1.8
* <p>Versions:
* - 1.10: Add ability to exclude containerised tests
* - 1.9: Add `allDeps` task.
* - 1.8: Tweak test config to reduce build speed.
* - 1.7: Switch to setting Java version via toolchain
* - 1.6: Remove GitHub packages for snapshots
* - 1.5: Add filters to exclude generated sources
* - 1.4: Add findsecbugs-plugin
* - 1.3: Fail on warnings for test code too.
*/

plugins {
Expand Down Expand Up @@ -71,7 +71,12 @@ tasks.withType<JavaCompile> {
}

tasks.test {
useJUnitPlatform()
useJUnitPlatform() {
if (project.hasProperty("excludeContainerised")) {
excludeTags("ContainerisedTest")
}
}

setForkEvery(5)
maxParallelForks = Runtime.getRuntime().availableProcessors()
testLogging {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ publishing {
name.set("${project.group}:${artifactId}")

if (prependRootName) {
description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " "))
description.set("${rootProject.name} ${project.name} library".replace("-", " "))
} else {
description.set("${project.name.capitalize()} library".replace("-", " "))
description.set("${project.name} library".replace("-", " "))
}

url.set("https://www.creekservice.org")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ publishing {
name.set("${project.group}:${artifactId}")

if (prependRootName) {
description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " "))
description.set("${rootProject.name} ${project.name} library".replace("-", " "))
} else {
description.set("${project.name.capitalize()} library".replace("-", " "))
description.set("${project.name} library".replace("-", " "))
}

url.set("https://www.creekservice.org")
Expand Down
6 changes: 6 additions & 0 deletions config/spotbugs/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@
<!-- Exclude generated sources -->
<Source name="~.*[\\/]build[\\/]generated[\\/]source.*" />
</Match>

<Match>
<!-- Disable this check as it leads to longer names and harder to read code -->
<!-- Discussion: https://github.com/spotbugs/spotbugs/issues/2627 -->
<Bug pattern="PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES"/>
</Match>
</FindBugsFilter>
5 changes: 1 addition & 4 deletions test-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ ARG APP_NAME
ARG APP_VERSION
ENV VERSION=$APP_VERSION

RUN yum update -y
RUN yum install -y tar lsof

RUN mkdir -p /opt/creek

COPY bin /bin
COPY log4j /log

COPY ${APP_NAME}-${APP_VERSION}.tar /opt/creek
COPY ${APP_NAME}-${APP_VERSION} /opt/creek/${APP_NAME}-${APP_VERSION}
WORKDIR /opt/creek
RUN tar xf ${APP_NAME}-${APP_VERSION}.tar
RUN ln -s ${APP_NAME}-${APP_VERSION} service

ENTRYPOINT ["/bin/run.sh"]
2 changes: 1 addition & 1 deletion test-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tasks.register<Copy>("prepareDocker") {

from (
layout.projectDirectory.file("Dockerfile"),
layout.buildDirectory.file("distributions/${project.name}-${project.version}.tar"),
tarTree(layout.buildDirectory.file("distributions/${project.name}-${project.version}.tar")),
layout.projectDirectory.dir("include")
)

Expand Down
Loading