Compare commits
7 commits
main
...
vmconlet-3
| Author | SHA1 | Date | |
|---|---|---|---|
| 4617d8d3ba | |||
| 6c250d4656 | |||
| 2403f5db64 | |||
| c66e304de4 | |||
| 2cb8c90357 | |||
| 837ee043aa | |||
| a20602f671 |
4 changed files with 13 additions and 8 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue