diff --git a/plugins/nexus-script-plugin/src/main/java/org/sonatype/nexus/script/plugin/RepositoryApi.java b/plugins/nexus-script-plugin/src/main/java/org/sonatype/nexus/script/plugin/RepositoryApi.java index 4b4527189e..a0c4b48f4e 100644 --- a/plugins/nexus-script-plugin/src/main/java/org/sonatype/nexus/script/plugin/RepositoryApi.java +++ b/plugins/nexus-script-plugin/src/main/java/org/sonatype/nexus/script/plugin/RepositoryApi.java @@ -263,6 +263,35 @@ Repository createDockerProxy(final String name, //NOSONAR final boolean strictContentTypeValidation, final boolean v1Enabled); + /** + * Create a Docker proxy repository. + * + * @param name The name of the new Repository + * @param remoteUrl The url of the external proxy for this Repository + * @param indexType Use 'REGISTRY' to use the proxy url for the index as well. Use 'HUB' to use the + * index from DockerHub. Use 'CUSTOM' in conjunction with the 'indexUrl' param to + * specify a custom index location + * @param indexUrl The url of a 'CUSTOM' index; only used in conjunction with the 'indexType' + * parameter + * @param httpPort The http port to accept traffic for this Repository on (optional) + * @param httpsPort The https port to accept traffic for this Repository on (optional) + * @param blobStoreName The BlobStore the Repository should use + * @param strictContentTypeValidation Whether or not the Repository should enforce strict content types + * @param v1Enabled Whether or not this Repository supports Docker V1 format + * @param forceBasicAuth Whether to force basic auth. False is required to enable token auth which can be used for anonymous access + * @return the newly created Repository + */ + Repository createDockerProxy(final String name, //NOSONAR + final String remoteUrl, + final String indexType, + final String indexUrl, + Integer httpPort, + Integer httpsPort, + final String blobStoreName, + final boolean strictContentTypeValidation, + final boolean v1Enabled, + final boolean forceBasicAuth); + /** * Create a Docker group repository. * @param name The name of the new Repository @@ -280,6 +309,25 @@ Repository createDockerGroup(final String name, final boolean v1Enabled, final String blobStoreName); + /** + * Create a Docker group repository. + * @param name The name of the new Repository + * @param httpPort The http port to accept traffic for this Repository on (optional) + * @param httpsPort The https port to accept traffic for this Repository on (optional) + * @param v1Enabled Whether or not this Repository supports Docker V1 format + * @param blobStoreName The BlobStore the Repository should use + * @param members The names of the Repositories in the group + * @param forceBasicAuth whether to force basic auth. False is required to enable token auth which can be used for anonymous access + * @return the newly created Repository + */ + Repository createDockerGroup(final String name, + Integer httpPort, + Integer httpsPort, + final List members, + final boolean v1Enabled, + final String blobStoreName, + final boolean forceBasicAuth); + /** * Create a Bower hosted repository. * @param name