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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven
name: Java CI with Gradle

on:
push:
Expand All @@ -22,12 +22,12 @@ jobs:
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Set up JDK 23
- name: Set up JDK 25
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
with:
java-version: '23'
java-version: '25'
distribution: 'zulu'
cache: maven
cache: gradle

- name: Maven test
run: mvn test --batch-mode
- name: Gradle test
run: ./gradlew test
17 changes: 6 additions & 11 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven Package
name: Gradle Publish

on:
release:
Expand All @@ -18,21 +15,19 @@ jobs:
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Set up JDK 23
- name: Set up JDK 25
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
with:
java-version: '23'
java-version: '25'
distribution: 'zulu'
# server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
# settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B deploy
- name: Build with Gradle
run: ./gradlew publish

- name: Add output files to the Github release
shell: bash
run: |
gh release upload $TAG target/diagnostics-${TAG:1}-dist.zip target/diagnostics-${TAG:1}-dist.zip.sha256
gh release upload $TAG build/distributions/diagnostics-${TAG:1}-dist.zip build/distributions/diagnostics-${TAG:1}-dist.zip.sha256
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
TAG: ${{ github.event.release.tag_name }}
Expand Down
17 changes: 4 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ crashlytics-build.properties
### Eclipse ###
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
Expand Down Expand Up @@ -91,23 +90,15 @@ local.properties
.texlipse


### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
### Gradle ###
.gradle/
build/

.DS_Store



./diagnostic-output
### VSCode
.vscode/launch.json

### Temporary diags
*.zip
*.zip
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ Note: `ossrh` matches the `id` used in the `pom.xml`. You can use any version of
Once the `settings.xml` is setup, you can run

```
mvn clean deploy
./gradlew publish
```

This will deploy based on the version in the `pom.xml` file (`-SNAPSHOT` creates
This will deploy based on the version in the `gradle.properties` file (`-SNAPSHOT` creates
it in their snapshot repository, which you should always do before a real
release).

Expand Down
18 changes: 6 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
FROM docker.elastic.co/wolfi/jdk:openjdk-23.0.2-r7-dev@sha256:ea249437c8316cf2905ea40e1508933789cf293d68b08531e7d151a779d64b25 AS builder
FROM docker.elastic.co/wolfi/jdk:openjdk-25-dev AS builder

#####################
# Install dev tools
# Build code
#####################
USER root

# need to be root to be able to install maven
RUN apk add --no-cache maven

#####################
# Build code
#####################
WORKDIR /build

COPY ./ ./

RUN mvn package
RUN ./gradlew build

FROM docker.elastic.co/wolfi/jdk:openjdk-23.0.2-r7@sha256:a4b87ff540ce784a1b69611aa8b60b743ad70e18ef97d6a6afec4bb906d5989b AS runner
FROM docker.elastic.co/wolfi/jdk:openjdk-25 AS runner

########################
# Prepare the code to run
########################
WORKDIR /support-diagnostics

COPY --from=builder /build/scripts /support-diagnostics
COPY --from=builder /build/target/lib /support-diagnostics/lib
COPY --from=builder /build/target/diagnostics-*.jar /support-diagnostics/lib
COPY --from=builder /build/build/libs/diagnostics-*.jar /support-diagnostics/lib/
COPY --from=builder /build/build/lib/ /support-diagnostics/lib/
COPY --from=builder /build/src/main/resources /support-diagnostics/config
Loading