feat(plugins): Additional plugin info fields
@@ -26,6 +26,7 @@ import java.util.regex.Pattern;
import javax.annotation.Nonnull;
import javax.validation.Valid;
import lombok.Data;
+import org.hibernate.validator.constraints.URL;
/**
* A Spinnaker plugin's artifact information.
@@ -34,6 +35,7 @@ import lombok.Data;
* install, as well as the specific releases that should be installed.
*/
@Data
+@Valid
public class PluginInfo implements Timestamped {
/**
* The canonical plugin ID.
@@ -60,6 +62,12 @@ public class PluginInfo implements Timestamped {
/** The last principal to modify this PluginInfo. */
private String lastModifiedBy;
+ /** The code repository information for the plugin. */
+ private Repository repository;
+
+ /** The homepage URL for the plugin. */
+ @URL private String homepage;
+
public PluginInfo() {}
public Optional<Release> getReleaseByVersion(String version) {
@@ -156,4 +164,11 @@ public class PluginInfo implements Timestamped {
});
}
}
+
+ @Data
+ public static class Repository {
+ String type;
+
+ @URL String url;
+ }
}
