Skip to content

Commit 22253e9

Browse files
committed
Merge branch 'master' into mountainduck
2 parents d69f3fe + f64f308 commit 22253e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+6555
-53
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, reopened]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up JDK 17
14+
uses: actions/setup-java@v4
15+
with:
16+
java-version: '17'
17+
distribution: 'temurin'
18+
cache: maven
19+
- name: Build with Maven
20+
run: mvn --batch-mode --update-snapshots package
21+
22+
- name: Run pynfs tests in container
23+
id: tester
24+
run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f full-test.yml up --build --quiet-pull --exit-code-from tester
25+
26+
- name: Publish Test Report
27+
uses: mikepenz/action-junit-report@v5
28+
if: always()
29+
with:
30+
report_paths: 'report/*.xml'

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Auto-publish release on tag to trigger zenodo DOI generation
3+
#
4+
name: Releases
5+
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
13+
build:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: ncipollo/release-action@v1

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM almalinux/9-minimal
2+
3+
RUN microdnf install -y java-21-openjdk-headless && \
4+
microdnf clean all && \
5+
rm -rf /var/cache/yum
6+
7+
RUN mkdir /nfs4j
8+
COPY basic-server/target/basic-server.jar /nfs4j/basic-server.jar
9+
10+
11+
CMD ["java", "-jar", "/nfs4j/basic-server.jar"]

basic-server/pom.xml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.dcache</groupId>
6+
<artifactId>nfs4j</artifactId>
7+
<version>0.27.0-SNAPSHOT</version>
8+
</parent>
9+
10+
<groupId>org.dcache.nfs4j</groupId>
11+
<artifactId>basic-server</artifactId>
12+
<packaging>jar</packaging>
13+
14+
15+
<build>
16+
<plugins>
17+
<plugin>
18+
<groupId>org.apache.maven.plugins</groupId>
19+
<artifactId>maven-assembly-plugin</artifactId>
20+
<version>3.1.0</version>
21+
<executions>
22+
<execution>
23+
<goals>
24+
<goal>single</goal>
25+
</goals>
26+
<phase>package</phase>
27+
<configuration>
28+
<descriptorRefs>
29+
<descriptorRef>jar-with-dependencies</descriptorRef>
30+
</descriptorRefs>
31+
<archive>
32+
<manifest>
33+
<mainClass>org.dcache.nfs4j.server.Main</mainClass>
34+
<packageName>org.dcache.nfs</packageName>
35+
<addExtensions />
36+
</manifest>
37+
<manifestEntries>
38+
<mode>development</mode>
39+
<Implementation-Build>${buildNumber}</Implementation-Build>
40+
<url>${project.url}</url>
41+
<Build-Time>${maven.build.timestamp}</Build-Time>
42+
</manifestEntries>
43+
</archive>
44+
<finalName>${project.artifactId}</finalName>
45+
<appendAssemblyId>false</appendAssemblyId>
46+
</configuration>
47+
</execution>
48+
</executions>
49+
</plugin>
50+
51+
<plugin>
52+
<groupId>io.fabric8</groupId>
53+
<artifactId>docker-maven-plugin</artifactId>
54+
<version>0.45.1</version>
55+
<configuration>
56+
<images>
57+
<image>
58+
<name>%g/nfs4j-server:%l</name>
59+
<build>
60+
<dockerFile>${project.basedir}/src/main/container/Dockerfile</dockerFile>
61+
<assembly>
62+
<descriptorRef>artifact-with-dependencies</descriptorRef>
63+
</assembly>
64+
</build>
65+
</image>
66+
</images>
67+
</configuration>
68+
<executions>
69+
<execution>
70+
<id>build</id>
71+
<phase>install</phase>
72+
<goals>
73+
<goal>build</goal>
74+
</goals>
75+
</execution>
76+
</executions>
77+
</plugin>
78+
79+
</plugins>
80+
</build>
81+
82+
<dependencies>
83+
<dependency>
84+
<groupId>org.dcache</groupId>
85+
<artifactId>nfs4j-core</artifactId>
86+
<version>${project.version}</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>ch.qos.logback</groupId>
90+
<artifactId>logback-classic</artifactId>
91+
</dependency>
92+
<dependency>
93+
<groupId>info.picocli</groupId>
94+
<artifactId>picocli</artifactId>
95+
</dependency>
96+
<dependency>
97+
<groupId>com.boundary</groupId>
98+
<artifactId>high-scale-lib</artifactId>
99+
</dependency>
100+
</dependencies>
101+
</project>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM almalinux:9-minimal as builder
2+
3+
# Add JRE
4+
RUN microdnf -y install java-17-openjdk-devel java-17-openjdk-jmods binutils
5+
RUN jlink -v --compress=2 --strip-debug --no-header-files --no-man-pages --add-modules java.base,java.compiler,java.instrument,java.logging,java.management,java.naming,java.security.jgss,java.transaction.xa,java.xml,jdk.jfr,jdk.security.auth,jdk.unsupported --output /jlink-runtime
6+
7+
8+
FROM almalinux:9-minimal
9+
COPY --from=builder /jlink-runtime /jlink-runtime
10+
11+
# add external files into container at the build time
12+
COPY run.sh /run.sh
13+
RUN chmod +x /run.sh
14+
15+
# where we store the data
16+
RUN mkdir -p /usr/share/nfs4j
17+
18+
# Add JARS
19+
COPY maven /usr/share/nfs4j/jars
20+
21+
22+
# Post-install brutal cleanup
23+
RUN microdnf clean all && rm -rf /var/cache/yum /var/lib/dnf /var/lib/rpm
24+
25+
# expose TCP ports for network services
26+
EXPOSE 2049
27+
28+
# by default we start server
29+
CMD ["/run.sh"]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
exec /jlink-runtime/bin/java \
4+
${JAVA_OPT} ${JMX} ${JAVA_ARGS} \
5+
-cp "/usr/share/nfs4j/jars/*" org.dcache.nfs4j.server.Main "$@"

0 commit comments

Comments
 (0)