Compare commits

...

7 commits

Author SHA1 Message Date
4617d8d3ba Make byte[] to String conversion null-safe.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 14:59:08 +02:00
6c250d4656 Fix release versions.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 14:28:57 +02:00
2403f5db64 Undo previous commit (is implied by fetch-depth: 0). 2024-06-01 13:57:21 +02:00
c66e304de4 Fetch all tags to make axion release plugin work properly.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 13:44:53 +02:00
2cb8c90357 Try to fix version issue when building release.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 13:26:47 +02:00
837ee043aa Checkout triggering version (is default).
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 12:28:28 +02:00
a20602f671 Plain tags for development branches.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 11:54:23 +02:00
4 changed files with 13 additions and 8 deletions

View file

@ -18,10 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install podman

View file

@ -5,6 +5,11 @@
*/
plugins {
// Apply the common versioning conventions.
// Put this at the start, because accessing project.version before
// this is applied makes things fail.
id 'org.jdrupes.vmoperator.versioning-conventions'
// Apply the java Plugin to add support for Java.
id 'java'
@ -13,9 +18,6 @@ plugins {
// Access to git information
id 'org.ajoberstar.grgit'
// Apply the common versioning conventions.
id 'org.jdrupes.vmoperator.versioning-conventions'
}
repositories {

View file

@ -21,11 +21,13 @@ scmVersion {
}
var p = shortened.replace('.', '-') + "-"
if (grgit.branch.current.name != "main"
&& !grgit.branch.current.name.startsWith("release")) {
&& grgit.branch.current.name != "HEAD"
&& !grgit.branch.current.name.startsWith("release")
&& !grgit.branch.current.name.startsWith("develop")) {
p = p + grgit.branch.current.name.replace('/', '-') + "-"
}
prefix = p
}
}
version = scmVersion.version
project.version = scmVersion.version
ext.isSnapshot = version.endsWith('-SNAPSHOT')

View file

@ -33,6 +33,7 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Scanner;
import java.util.logging.Level;
import static org.jdrupes.vmoperator.common.Constants.APP_NAME;
@ -180,7 +181,8 @@ public class DisplaySecretMonitor
// Check validity
var model = stub.model().get();
@SuppressWarnings("PMD.StringInstantiation")
var expiry = new String(model.getData().get(DATA_PASSWORD_EXPIRY));
var expiry = Optional.ofNullable(model.getData()
.get(DATA_PASSWORD_EXPIRY)).map(b -> new String(b)).orElse(null);
if (model.getData().get(DATA_DISPLAY_PASSWORD) != null
&& stillValid(expiry)) {
event.setResult(