mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ab4af4d80 | |||
| a20eb6866a |
+1
-1
@@ -16,7 +16,7 @@ Please report unacceptable behavior on [https://github.com/aptly-dev/aptly/discu
|
|||||||
### List of Repositories
|
### List of Repositories
|
||||||
|
|
||||||
* [aptly-dev/aptly](https://github.com/aptly-dev/aptly) - aptly source code, functional tests, man page
|
* [aptly-dev/aptly](https://github.com/aptly-dev/aptly) - aptly source code, functional tests, man page
|
||||||
* [apty-dev/aptly-dev.github.io](https://github.com/aptly-dev/aptly-dev.github.io) - aptly website (https://www.aptly.info/)
|
* [aptly-dev/aptly-dev.github.io](https://github.com/aptly-dev/aptly-dev.github.io) - aptly website (https://www.aptly.info/)
|
||||||
* [aptly-dev/aptly-fixture-db](https://github.com/aptly-dev/aptly-fixture-db) & [aptly-dev/aptly-fixture-pool](https://github.com/aptly-dev/aptly-fixture-pool) provide
|
* [aptly-dev/aptly-fixture-db](https://github.com/aptly-dev/aptly-fixture-db) & [aptly-dev/aptly-fixture-pool](https://github.com/aptly-dev/aptly-fixture-pool) provide
|
||||||
fixtures for aptly functional tests
|
fixtures for aptly functional tests
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ serve: prepare swagger-install ## Run development server (auto recompiling)
|
|||||||
test -f $(BINPATH)/air || go install github.com/air-verse/air@v1.52.3
|
test -f $(BINPATH)/air || go install github.com/air-verse/air@v1.52.3
|
||||||
cp debian/aptly.conf ~/.aptly.conf
|
cp debian/aptly.conf ~/.aptly.conf
|
||||||
sed -i /enable_swagger_endpoint/s/false/true/ ~/.aptly.conf
|
sed -i /enable_swagger_endpoint/s/false/true/ ~/.aptly.conf
|
||||||
|
sed -i /enable_metrics_endpoint/s/false/true/ ~/.aptly.conf
|
||||||
PATH=$(BINPATH):$$PATH air -build.pre_cmd 'swag init -q --propertyStrategy pascalcase --markdownFiles docs --generalInfo docs/swagger.conf' -build.exclude_dir docs,system,debian,pgp/keyrings,pgp/test-bins,completion.d,man,deb/testdata,console,_man,systemd,obj-x86_64-linux-gnu -- api serve -listen 0.0.0.0:3142
|
PATH=$(BINPATH):$$PATH air -build.pre_cmd 'swag init -q --propertyStrategy pascalcase --markdownFiles docs --generalInfo docs/swagger.conf' -build.exclude_dir docs,system,debian,pgp/keyrings,pgp/test-bins,completion.d,man,deb/testdata,console,_man,systemd,obj-x86_64-linux-gnu -- api serve -listen 0.0.0.0:3142
|
||||||
|
|
||||||
dpkg: prepare swagger ## Build debian packages
|
dpkg: prepare swagger ## Build debian packages
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ type gpgDeleteKeyParams struct {
|
|||||||
// @Summary Add GPG Keys
|
// @Summary Add GPG Keys
|
||||||
// @Description **Adds GPG keys to aptly keyring**
|
// @Description **Adds GPG keys to aptly keyring**
|
||||||
// @Description
|
// @Description
|
||||||
// @Description Add GPG public keys for veryfing remote repositories for mirroring.
|
// @Description Add GPG public keys for verifying remote repositories for mirroring.
|
||||||
// @Description
|
// @Description
|
||||||
// @Description Keys can be added in two ways:
|
// @Description Keys can be added in two ways:
|
||||||
// @Description * By providing the ASCII armord key in `GpgKeyArmor` (leave Keyserver and GpgKeyID empty)
|
// @Description * By providing the ASCII armord key in `GpgKeyArmor` (leave Keyserver and GpgKeyID empty)
|
||||||
|
|||||||
+1
-1
@@ -497,7 +497,7 @@ func apiMirrorsEdit(c *gin.Context) {
|
|||||||
type mirrorUpdateParams struct {
|
type mirrorUpdateParams struct {
|
||||||
// Change mirror name to `Name`
|
// Change mirror name to `Name`
|
||||||
Name string ` json:"Name" example:"mirror1"`
|
Name string ` json:"Name" example:"mirror1"`
|
||||||
// Gpg keyring(s) for verifing Release file
|
// Gpg keyring(s) for verifying Release file
|
||||||
Keyrings []string ` json:"Keyrings" example:"trustedkeys.gpg"`
|
Keyrings []string ` json:"Keyrings" example:"trustedkeys.gpg"`
|
||||||
// Set "true" to ignore checksum errors
|
// Set "true" to ignore checksum errors
|
||||||
IgnoreChecksums bool ` json:"IgnoreChecksums"`
|
IgnoreChecksums bool ` json:"IgnoreChecksums"`
|
||||||
|
|||||||
+1
-1
@@ -124,7 +124,7 @@ func apiPublishList(c *gin.Context) {
|
|||||||
// @Description See also: `aptly publish show`
|
// @Description See also: `aptly publish show`
|
||||||
// @Tags Publish
|
// @Tags Publish
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param prefix path string true "publishing prefix, use `:.` instead of `.` because it is ambigious in URLs"
|
// @Param prefix path string true "publishing prefix, use `:.` instead of `.` because it is ambiguous in URLs"
|
||||||
// @Param distribution path string true "distribution name"
|
// @Param distribution path string true "distribution name"
|
||||||
// @Success 200 {object} deb.PublishedRepo
|
// @Success 200 {object} deb.PublishedRepo
|
||||||
// @Failure 404 {object} Error "Published repository not found"
|
// @Failure 404 {object} Error "Published repository not found"
|
||||||
|
|||||||
+4
-3
@@ -102,7 +102,7 @@ type repoCreateParams struct {
|
|||||||
DefaultDistribution string ` json:"DefaultDistribution" example:"stable"`
|
DefaultDistribution string ` json:"DefaultDistribution" example:"stable"`
|
||||||
// Default component when publishing from this local repo
|
// Default component when publishing from this local repo
|
||||||
DefaultComponent string ` json:"DefaultComponent" example:"main"`
|
DefaultComponent string ` json:"DefaultComponent" example:"main"`
|
||||||
// Snapshot name to create repoitory from (optional)
|
// Snapshot name to create repository from (optional)
|
||||||
FromSnapshot string ` json:"FromSnapshot" example:""`
|
FromSnapshot string ` json:"FromSnapshot" example:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ type reposEditParams struct {
|
|||||||
Comment *string ` json:"Comment" example:"example repo"`
|
Comment *string ` json:"Comment" example:"example repo"`
|
||||||
// Change Default Distribution for publishing
|
// Change Default Distribution for publishing
|
||||||
DefaultDistribution *string ` json:"DefaultDistribution" example:""`
|
DefaultDistribution *string ` json:"DefaultDistribution" example:""`
|
||||||
// Change Devault Component for publishing
|
// Change Default Component for publishing
|
||||||
DefaultComponent *string ` json:"DefaultComponent" example:""`
|
DefaultComponent *string ` json:"DefaultComponent" example:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,6 +420,7 @@ func apiReposPackagesAddDelete(c *gin.Context, taskNamePrefix string, cb func(li
|
|||||||
// @Description API verifies that packages actually exist in aptly database and checks constraint that conflicting packages can’t be part of the same local repository.
|
// @Description API verifies that packages actually exist in aptly database and checks constraint that conflicting packages can’t be part of the same local repository.
|
||||||
// @Tags Repos
|
// @Tags Repos
|
||||||
// @Param name path string true "Repository name"
|
// @Param name path string true "Repository name"
|
||||||
|
// @Consume json
|
||||||
// @Param request body reposPackagesAddDeleteParams true "Parameters"
|
// @Param request body reposPackagesAddDeleteParams true "Parameters"
|
||||||
// @Param _async query bool false "Run in background and return task object"
|
// @Param _async query bool false "Run in background and return task object"
|
||||||
// @Produce json
|
// @Produce json
|
||||||
@@ -623,11 +624,11 @@ type reposCopyPackageParams struct {
|
|||||||
// @Summary Copy Package
|
// @Summary Copy Package
|
||||||
// @Description Copies a package from a source to destination repository
|
// @Description Copies a package from a source to destination repository
|
||||||
// @Tags Repos
|
// @Tags Repos
|
||||||
// @Produce json
|
|
||||||
// @Param name path string true "Destination repo"
|
// @Param name path string true "Destination repo"
|
||||||
// @Param src path string true "Source repo"
|
// @Param src path string true "Source repo"
|
||||||
// @Param file path string true "File/packages to copy"
|
// @Param file path string true "File/packages to copy"
|
||||||
// @Param _async query bool false "Run in background and return task object"
|
// @Param _async query bool false "Run in background and return task object"
|
||||||
|
// @Produce json
|
||||||
// @Success 200 {object} task.ProcessReturnValue "msg"
|
// @Success 200 {object} task.ProcessReturnValue "msg"
|
||||||
// @Failure 400 {object} Error "Bad Request"
|
// @Failure 400 {object} Error "Bad Request"
|
||||||
// @Failure 404 {object} Error "Not Found"
|
// @Failure 404 {object} Error "Not Found"
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ import (
|
|||||||
|
|
||||||
var context *ctx.AptlyContext
|
var context *ctx.AptlyContext
|
||||||
|
|
||||||
|
// @Summary Get Metrics
|
||||||
|
// @Description **Get Prometheus Metrics**
|
||||||
|
// @Tags Status
|
||||||
|
// @Produce text/plain
|
||||||
|
// @Success 200 {string} string Metrics
|
||||||
|
// @Router /api/metrics [get]
|
||||||
func apiMetricsGet() gin.HandlerFunc {
|
func apiMetricsGet() gin.HandlerFunc {
|
||||||
return func(c *gin.Context) {
|
return func(c *gin.Context) {
|
||||||
countPackagesByRepos()
|
countPackagesByRepos()
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
|
|
||||||
In order to add debian package files to a local repository, files are first uploaded to a temporary directory.
|
In order to add debian package files to a local repository, files are first uploaded to a temporary directory.
|
||||||
Then the directory (or a specific file within) is added to a repository. After adding to a repositorty, the directory resp. files are removed bt default.
|
Then the directory (or a specific file within) is added to a repository. After adding to a repository, the directory resp. files are removed bt default.
|
||||||
|
|
||||||
All uploaded files are stored under `<rootDir>/upload/<tempdir>` directory.
|
All uploaded files are stored under `<rootDir>/upload/<tempdir>` directory.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
# Search Package Collection
|
# Search Package Collection
|
||||||
<div>
|
<div>
|
||||||
Perform operations on the whole collection of packages in apty database.
|
Perform operations on the whole collection of packages in aptly database.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -35,6 +35,6 @@ aptly publish repo my-repo --gpg-key=KEY_ID_a --gpg-key=KEY_ID_b
|
|||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
Publish APIs use following convention to identify published repositories: `/api/publish/:prefix/:distribution`. `:distribution` is distribution name, while `:prefix` is `[<storage>:]<prefix>` (storage is optional, it defaults to empty string), if publishing prefix contains slashes `/`, they should be replaced with underscores (`_`) and underscores
|
Publish APIs use following convention to identify published repositories: `/api/publish/:prefix/:distribution`. `:distribution` is distribution name, while `:prefix` is `[<storage>:]<prefix>` (storage is optional, it defaults to empty string), if publishing prefix contains slashes `/`, they should be replaced with underscores (`_`) and underscores
|
||||||
should be replaced with double underscore (`__`). To specify root `:prefix`, use `:.`, as `.` is ambigious in URLs.
|
should be replaced with double underscore (`__`). To specify root `:prefix`, use `:.`, as `.` is ambiguous in URLs.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Manage Local Repositories
|
# Manage Local Repositories
|
||||||
<div>
|
<div>
|
||||||
A local repository is a collection of versionned packages (usually custom packages created internally).
|
A local repository is a collection of versioned packages (usually custom packages created internally).
|
||||||
|
|
||||||
Packages can be added, removed, moved or copied between repos.
|
Packages can be added, removed, moved or copied between repos.
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class APITest(BaseTest):
|
|||||||
"linkMethod": "symlink"
|
"linkMethod": "symlink"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"enableMetricsEndpoint": True,
|
||||||
"enableSwaggerEndpoint": True
|
"enableSwaggerEndpoint": True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user