-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1a9e88
commit 043a569
Showing
8 changed files
with
265 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/io/fabric8/maven/docker/config/AttestationConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package io.fabric8.maven.docker.config; | ||
|
||
import io.fabric8.maven.docker.util.EnvUtil; | ||
import java.io.Serializable; | ||
import java.util.List; | ||
import org.apache.maven.plugins.annotations.Parameter; | ||
|
||
/** | ||
* Attestation Configuration | ||
*/ | ||
public class AttestationConfiguration implements Serializable { | ||
|
||
/** | ||
* Provenance attestation mode; one of true, false, min, max | ||
*/ | ||
@Parameter | ||
private String provenance; | ||
|
||
/** | ||
* Enable Software Bill of Materials attestation | ||
*/ | ||
@Parameter | ||
private Boolean sbom; | ||
|
||
public String getProvenance() { | ||
return provenance; | ||
} | ||
|
||
public Boolean getSbom() { | ||
return sbom; | ||
} | ||
|
||
public static class Builder { | ||
|
||
private final AttestationConfiguration config = new AttestationConfiguration(); | ||
private boolean isEmpty = true; | ||
|
||
public AttestationConfiguration build() { | ||
return isEmpty ? null : config; | ||
} | ||
|
||
public AttestationConfiguration.Builder provenance(String provenance) { | ||
config.provenance = provenance; | ||
if (provenance != null) { | ||
isEmpty = false; | ||
} | ||
return this; | ||
} | ||
|
||
public AttestationConfiguration.Builder sbom(Boolean sbom) { | ||
config.sbom = sbom; | ||
if (sbom != null) { | ||
isEmpty = false; | ||
} | ||
return this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.