Skip to content

Commit

Permalink
Merge branch 'main' into jent/codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
jentfoo authored Oct 21, 2024
2 parents 2e6c970 + 38f207d commit 2e527a8
Show file tree
Hide file tree
Showing 22 changed files with 754 additions and 108 deletions.
40 changes: 39 additions & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,55 @@ jobs:
java-version: "21"
distribution: "temurin"
server-id: github
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven Verify
run: |
mvn --batch-mode clean install -s settings.xml
mvn --batch-mode clean verify -s settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sonarcloud:
name: SonarCloud Scan
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7
with:
java-version: "17"
distribution: "temurin"
server-id: github
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven Test Coverage
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -P coverage

ci:
needs:
- mavenverify
- pr
- sonarcloud
runs-on: ubuntu-latest
if: always()
steps:
Expand Down
44 changes: 41 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
release:
types: [created]

permissions:
contents: read
Expand Down Expand Up @@ -35,8 +37,44 @@ jobs:
java-version: "21"
distribution: "temurin"
server-id: github
- name: Publish package
run: mvn --batch-mode deploy -s settings.xml
# stage maven profile
- name: Set up JDK to publish to GitHub Packages
if: github.ref == 'refs/heads/main'
uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7
with:
java-version: "21"
distribution: "temurin"
# write settings.xml
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/main'
run: mvn --batch-mode deploy -DskipTests -P stage
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
# release maven profile
- name: Set up JDK to publish to Maven Central
if: startsWith(github.ref, 'refs/tags/')
uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7
with:
java-version: "21"
distribution: "temurin"
# write settings.xml
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Maven Central
if: startsWith(github.ref, 'refs/tags/')
run: mvn --batch-mode deploy -DskipTests -P release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0"
".": "0.5.0"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.5.0](https://github.com/opentdf/nifi/compare/v0.4.0...v0.5.0) (2024-10-18)


### Bug Fixes

* Sonarcloud, tests, documentation ([#29](https://github.com/opentdf/nifi/issues/29)) ([87d58ec](https://github.com/opentdf/nifi/commit/87d58ecfe64c414edca8a691417c366fc23545c9))

## [0.4.0](https://github.com/opentdf/nifi/compare/v0.3.0...v0.4.0) (2024-08-27)


Expand Down
23 changes: 21 additions & 2 deletions nifi-tdf-controller-services-api-nar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.opentdf.nifi</groupId>
<artifactId>nifi-pom</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</parent>
<artifactId>nifi-tdf-controller-services-nar</artifactId>
<name>nifi-tdf-controller-services-nar</name>
Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nifi-tdf-controller-services-api</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
Expand All @@ -28,6 +28,25 @@
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<phase>none</phase>
</execution>
<execution>
<id>default-report</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.nifi</groupId>
Expand Down
2 changes: 1 addition & 1 deletion nifi-tdf-controller-services-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.opentdf.nifi</groupId>
<artifactId>nifi-pom</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</parent>
<artifactId>nifi-tdf-controller-services-api</artifactId>
<name>nifi-tdf-controller-services-api</name>
Expand Down
24 changes: 21 additions & 3 deletions nifi-tdf-nar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.opentdf.nifi</groupId>
<artifactId>nifi-pom</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</parent>
<artifactId>nifi-tdf-nar</artifactId>
<name>nifi-tdf-nar</name>
Expand All @@ -18,12 +18,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nifi-tdf-processors</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nifi-tdf-controller-services-nar</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<type>nar</type>
</dependency>
</dependencies>
Expand All @@ -33,6 +33,24 @@
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-prepare-agent</id>
<phase>none</phase>
</execution>
<execution>
<id>report-aggregate</id>
<phase>none</phase>
</execution>
<execution>
<id>default-report-aggregate</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
13 changes: 2 additions & 11 deletions nifi-tdf-processors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.opentdf.nifi</groupId>
<artifactId>nifi-pom</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</parent>
<artifactId>nifi-tdf-processors</artifactId>
<name>nifi-tdf-processors</name>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nifi-tdf-controller-services-api</artifactId>
<version>0.5.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
Expand Down Expand Up @@ -97,13 +97,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 2e527a8

Please sign in to comment.