Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove maven-group, add docker-proxy #120

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading