Skip to content

Commit

Permalink
fix: remove maven-group, add docker-proxy (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
olenagerasimova authored Sep 27, 2023
1 parent 1cdf642 commit ffd20ad
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public final class RepositoryTemplate {
/**
* Pre-defined template names.
*/
private static final List<String> PREDEFINED = List.of("maven-group", "maven-proxy");
private static final List<String> PREDEFINED = List.of(
"maven-proxy", "docker-proxy", "file-proxy", "npm-proxy", "php-proxy", "pypi-proxy"
);

/**
* Template engine.
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/html/repository/create
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function formSubmit() {
<option value="npm-proxy">NPM proxy (mirror)</option>
<option value="pypi-proxy">Python proxy (mirror)</option>
<option value="php-proxy">Php proxy (remote)</option>
<option value="maven-group">Maven group (virtual)</option>
<option value="docker-proxy">Docker proxy (remote)</option>
</select>
<fieldset>
<textarea id="new-repo-config" name="config" class="monospace" type="textarea" style="width: 100%; height: 12em;"></textarea>
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/info/docker-proxy.info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Artipie Docker Proxy repository redirects all pull requests to specified remote registries. Storage is optional here:
if not added, no images will be cached and <code>push</code> to the repository is not allowed.
If storage is set, remote images are cached and <code>push</code> works as usual.
8 changes: 0 additions & 8 deletions src/main/resources/info/maven-group.info.html

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/resources/template/default.template.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
repo:
type: {{type}}
storage: default
permissions:
{{user}}:
- upload
- download
"*":
- download
7 changes: 7 additions & 0 deletions src/main/resources/template/docker-proxy.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repo:
type: docker-proxy
storage: default
# proxy for Docker registry
remotes:
- url: registry-1.docker.io
- url: mcr.microsoft.com
6 changes: 6 additions & 0 deletions src/main/resources/template/file-proxy.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repo:
type: file-proxy
storage: default
# proxy some general file storage
remotes:
- uri: https://some-general-storage.com
14 changes: 0 additions & 14 deletions src/main/resources/template/maven-group.template.yaml

This file was deleted.

10 changes: 1 addition & 9 deletions src/main/resources/template/maven-proxy.template.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
repo:
type: maven-proxy
storage: default
# proxy for Apache Maven central
# proxy for Apache Maven central (several remotes supported)
remotes:
- uri: https://repo.maven.apache.org/maven2
cache:
storage: default
permissions:
{{user}}:
- upload
- download
"*":
- download
6 changes: 6 additions & 0 deletions src/main/resources/template/npm-proxy.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repo:
type: npm-proxy
storage: default
# proxy for NPM public registry
remotes:
- uri: https://registry.npmjs.org
6 changes: 6 additions & 0 deletions src/main/resources/template/php-proxy.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repo:
type: php-proxy
storage: default
# proxy for php composer central repository
remotes:
- uri: https://packagist.org/
6 changes: 6 additions & 0 deletions src/main/resources/template/pypi-proxy.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repo:
type: pypi-proxy
storage: default
# proxy for PyPI repository
remotes:
- uri: https://pypi.org/pypi

0 comments on commit ffd20ad

Please sign in to comment.