mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-17 10:27:22 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3026decd06 | ||
|
|
4a43267f10 | ||
|
|
516fcc6bfd | ||
|
|
1c5db5f5b3 | ||
|
|
f51224958b | ||
|
|
fef55f81e5 | ||
|
|
16691aad83 | ||
|
|
e4c3399ae5 |
No files matched your search
+18
-21
@@ -24,7 +24,7 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
# fetch the whole repo for `git describe` to work
|
# fetch the whole repo for `git describe` to work
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
make docker-unit-test
|
make docker-unit-test
|
||||||
mkdir -p out/coverage
|
mkdir -p out/coverage
|
||||||
mv unit.out out/coverage/
|
mv unit.out out/coverage/
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: unit-tests-coverage
|
name: unit-tests-coverage
|
||||||
path: out/
|
path: out/
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
sudo apt-get install -y --no-install-recommends graphviz gnupg2 gpgv2 git gcc make devscripts python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage python3-etcd3 python3-plyvel flake8 faketime dput-ng
|
sudo apt-get install -y --no-install-recommends graphviz gnupg2 gpgv2 git gcc make devscripts python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage python3-etcd3 python3-plyvel flake8 faketime dput-ng
|
||||||
|
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
# fetch the whole repo for `git describe` to work
|
# fetch the whole repo for `git describe` to work
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
id: goversion
|
id: goversion
|
||||||
|
|
||||||
- name: "Setup Go"
|
- name: "Setup Go"
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ steps.goversion.outputs.GOVER }}
|
go-version: ${{ steps.goversion.outputs.GOVER }}
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
mkdir -p out/coverage
|
mkdir -p out/coverage
|
||||||
COVERAGE_DIR=$PWD/out/coverage make system-test
|
COVERAGE_DIR=$PWD/out/coverage make system-test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: system-tests-coverage
|
name: system-tests-coverage
|
||||||
path: out/
|
path: out/
|
||||||
@@ -123,15 +123,15 @@ jobs:
|
|||||||
- test
|
- test
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: "Download Unit Test Coverage"
|
- name: "Download Unit Test Coverage"
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: unit-tests-coverage
|
name: unit-tests-coverage
|
||||||
|
|
||||||
- name: "Download System Test Coverage"
|
- name: "Download System Test Coverage"
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: system-tests-coverage
|
name: system-tests-coverage
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
name: ["Debian 13/trixie", "Debian 12/bookworm", "Debian 11/bullseye", "Ubuntu 26.04", "Ubuntu 24.04", "Ubuntu 22.04", "Ubuntu 20.04"]
|
name: ["Debian 13/trixie", "Debian 12/bookworm", "Ubuntu 26.04", "Ubuntu 24.04", "Ubuntu 22.04", "Ubuntu 20.04"]
|
||||||
arch: ["amd64", "i386" , "arm64" , "armhf"]
|
arch: ["amd64", "i386" , "arm64" , "armhf"]
|
||||||
include:
|
include:
|
||||||
- name: "Debian 13/trixie"
|
- name: "Debian 13/trixie"
|
||||||
@@ -167,9 +167,6 @@ jobs:
|
|||||||
- name: "Debian 12/bookworm"
|
- name: "Debian 12/bookworm"
|
||||||
suite: bookworm
|
suite: bookworm
|
||||||
image: debian:bookworm-slim
|
image: debian:bookworm-slim
|
||||||
- name: "Debian 11/bullseye"
|
|
||||||
suite: bullseye
|
|
||||||
image: debian:bullseye-slim
|
|
||||||
- name: "Ubuntu 26.04"
|
- name: "Ubuntu 26.04"
|
||||||
suite: resolute
|
suite: resolute
|
||||||
image: ubuntu:26.04
|
image: ubuntu:26.04
|
||||||
@@ -199,7 +196,7 @@ jobs:
|
|||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
# fetch the whole repo for `git describe` to work
|
# fetch the whole repo for `git describe` to work
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -212,7 +209,7 @@ jobs:
|
|||||||
id: goversion
|
id: goversion
|
||||||
|
|
||||||
- name: "Setup Go"
|
- name: "Setup Go"
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ steps.goversion.outputs.GOVER }}
|
go-version: ${{ steps.goversion.outputs.GOVER }}
|
||||||
|
|
||||||
@@ -268,7 +265,7 @@ jobs:
|
|||||||
|
|
||||||
- name: "Upload CI Artifacts"
|
- name: "Upload CI Artifacts"
|
||||||
if: github.ref != 'refs/heads/master' && !startsWith(github.event.ref, 'refs/tags')
|
if: github.ref != 'refs/heads/master' && !startsWith(github.event.ref, 'refs/tags')
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.suite }}_${{ matrix.arch }}
|
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.suite }}_${{ matrix.arch }}
|
||||||
path: build/
|
path: build/
|
||||||
@@ -290,7 +287,7 @@ jobs:
|
|||||||
goarch: arm
|
goarch: arm
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
# fetch the whole repo for `git describe` to work
|
# fetch the whole repo for `git describe` to work
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -301,7 +298,7 @@ jobs:
|
|||||||
id: goversion
|
id: goversion
|
||||||
|
|
||||||
- name: "Setup Go"
|
- name: "Setup Go"
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ steps.goversion.outputs.GOVER }}
|
go-version: ${{ steps.goversion.outputs.GOVER }}
|
||||||
|
|
||||||
@@ -328,7 +325,7 @@ jobs:
|
|||||||
make binaries GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }}
|
make binaries GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }}
|
||||||
|
|
||||||
- name: "Upload Artifacts"
|
- name: "Upload Artifacts"
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
if: startsWith(github.event.ref, 'refs/tags')
|
||||||
with:
|
with:
|
||||||
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
@@ -336,7 +333,7 @@ jobs:
|
|||||||
compression-level: 0 # no compression
|
compression-level: 0 # no compression
|
||||||
|
|
||||||
- name: "Upload CI Artifacts"
|
- name: "Upload CI Artifacts"
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: "!startsWith(github.event.ref, 'refs/tags')"
|
if: "!startsWith(github.event.ref, 'refs/tags')"
|
||||||
with:
|
with:
|
||||||
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
name: aptly_${{ steps.releaseversion.outputs.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
@@ -352,7 +349,7 @@ jobs:
|
|||||||
if: startsWith(github.event.ref, 'refs/tags')
|
if: startsWith(github.event.ref, 'refs/tags')
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: "Get aptly version"
|
- name: "Get aptly version"
|
||||||
env:
|
env:
|
||||||
@@ -364,7 +361,7 @@ jobs:
|
|||||||
id: releaseversion
|
id: releaseversion
|
||||||
|
|
||||||
- name: "Download Artifacts"
|
- name: "Download Artifacts"
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
path: out/
|
path: out/
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
name: lint
|
name: lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: "Read go version from go.mod"
|
- name: "Read go version from go.mod"
|
||||||
run: |
|
run: |
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
id: goversion
|
id: goversion
|
||||||
|
|
||||||
- name: "Setup Go"
|
- name: "Setup Go"
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ steps.goversion.outputs.GOVER }}
|
go-version: ${{ steps.goversion.outputs.GOVER }}
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,10 @@ GUI for aptly API:
|
|||||||
|
|
||||||
- `Python aptly GUI (via pyqt5) <https://github.com/chnyda/python-aptly-gui>`_ by Cedric Hnyda
|
- `Python aptly GUI (via pyqt5) <https://github.com/chnyda/python-aptly-gui>`_ by Cedric Hnyda
|
||||||
|
|
||||||
|
Repository management:
|
||||||
|
|
||||||
|
- `AptlyPilot <https://github.com/mmayabi/AptlyPilot>`_ by Maryam Mayabi - Web-based management platform for Aptly repositories with Repository as Code workflows and lifecycle automation.
|
||||||
|
|
||||||
Scala sbt:
|
Scala sbt:
|
||||||
|
|
||||||
- `sbt aptly plugin <https://github.com/amalakar/sbt-aptly>`_ by Arup Malakar
|
- `sbt aptly plugin <https://github.com/amalakar/sbt-aptly>`_ by Arup Malakar
|
||||||
|
|||||||
+1
-1
@@ -141,7 +141,7 @@ func apiGPGAddKey(c *gin.Context) {
|
|||||||
// @Description Returns all public keys currently installed in the aptly GPG keyring.
|
// @Description Returns all public keys currently installed in the aptly GPG keyring.
|
||||||
// @Description
|
// @Description
|
||||||
// @Tags Mirrors
|
// @Tags Mirrors
|
||||||
// @Param keyring query string false "Keyring file to list keys from (default: trustedkeys.gpg)" example(trustedkeys.gpg)
|
// @Param keyring query string false "Keyring file to list keys from (default: trustedkeys.gpg)"
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} gpgKeyListResponse "OK"
|
// @Success 200 {object} gpgKeyListResponse "OK"
|
||||||
// @Failure 400 {object} Error "Bad Request"
|
// @Failure 400 {object} Error "Bad Request"
|
||||||
|
|||||||
@@ -597,7 +597,6 @@ func apiMirrorsUpdate(c *gin.Context) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return &task.ProcessReturnValue{Code: http.StatusConflict, Value: nil}, fmt.Errorf("unable to rename: mirror %s already exists", b.Name)
|
return &task.ProcessReturnValue{Code: http.StatusConflict, Value: nil}, fmt.Errorf("unable to rename: mirror %s already exists", b.Name)
|
||||||
}
|
}
|
||||||
remote.Name = b.Name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
downloader := context.NewDownloader(out)
|
downloader := context.NewDownloader(out)
|
||||||
|
|||||||
Vendored
+11
-12
@@ -185,18 +185,6 @@ filesystem_publish_endpoints:
|
|||||||
# # * size (compare file size)
|
# # * size (compare file size)
|
||||||
# verify_method: md5
|
# verify_method: md5
|
||||||
|
|
||||||
# S3 Endpoint Support
|
|
||||||
#
|
|
||||||
# cloud storage). First, publishing
|
|
||||||
# endpoints should be described in aptly configuration file. Each endpoint has name
|
|
||||||
# and associated settings.
|
|
||||||
#
|
|
||||||
# In order to publish to S3, specify endpoint as `s3:endpoint-name:` before
|
|
||||||
# publishing prefix on the command line, e.g.:
|
|
||||||
#
|
|
||||||
# `aptly publish snapshot wheezy-main s3:test:`
|
|
||||||
#
|
|
||||||
|
|
||||||
# JFrog Artifactory Endpoint Support
|
# JFrog Artifactory Endpoint Support
|
||||||
#
|
#
|
||||||
# aptly can be configured to publish repositories directly to JFrog Artifactory. First,
|
# aptly can be configured to publish repositories directly to JFrog Artifactory. First,
|
||||||
@@ -225,6 +213,17 @@ jfrog_publish_endpoints:
|
|||||||
# api_key: api_key
|
# api_key: api_key
|
||||||
# access_token: access_token
|
# access_token: access_token
|
||||||
|
|
||||||
|
# S3 Endpoint Support
|
||||||
|
#
|
||||||
|
# cloud storage). First, publishing
|
||||||
|
# endpoints should be described in aptly configuration file. Each endpoint has name
|
||||||
|
# and associated settings.
|
||||||
|
#
|
||||||
|
# In order to publish to S3, specify endpoint as `s3:endpoint-name:` before
|
||||||
|
# publishing prefix on the command line, e.g.:
|
||||||
|
#
|
||||||
|
# `aptly publish snapshot wheezy-main s3:test:`
|
||||||
|
#
|
||||||
s3_publish_endpoints:
|
s3_publish_endpoints:
|
||||||
# # Endpoint Name
|
# # Endpoint Name
|
||||||
# test:
|
# test:
|
||||||
|
|||||||
@@ -279,78 +279,6 @@ class MirrorsAPITestEditArchiveURL(APITest):
|
|||||||
self.check_equal(resp.json()['ArchiveRoot'], 'http://repo.aptly.info/system-tests/ftp.ch.debian.org/debian/')
|
self.check_equal(resp.json()['ArchiveRoot'], 'http://repo.aptly.info/system-tests/ftp.ch.debian.org/debian/')
|
||||||
|
|
||||||
|
|
||||||
class MirrorsAPITestRename(APITest):
|
|
||||||
"""
|
|
||||||
PUT /api/mirrors/:name - Rename mirror via update endpoint
|
|
||||||
"""
|
|
||||||
def check(self):
|
|
||||||
mirror_name = self.random_name()
|
|
||||||
mirror_desc = {'Name': mirror_name,
|
|
||||||
'ArchiveURL': 'http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/',
|
|
||||||
'IgnoreSignatures': True,
|
|
||||||
'Distribution': 'wheezy',
|
|
||||||
'Components': ['main'],
|
|
||||||
'Architectures': ['amd64']}
|
|
||||||
|
|
||||||
resp = self.post("/api/mirrors", json=mirror_desc)
|
|
||||||
self.check_equal(resp.status_code, 201)
|
|
||||||
|
|
||||||
# Rename the mirror via PUT
|
|
||||||
new_name = self.random_name()
|
|
||||||
resp = self.put_task("/api/mirrors/" + mirror_name, json={'Name': new_name, 'IgnoreSignatures': True})
|
|
||||||
self.check_task(resp)
|
|
||||||
|
|
||||||
# Old name should no longer exist
|
|
||||||
resp = self.get("/api/mirrors/" + mirror_name)
|
|
||||||
self.check_equal(resp.status_code, 404)
|
|
||||||
|
|
||||||
# New name should exist with correct data
|
|
||||||
resp = self.get("/api/mirrors/" + new_name)
|
|
||||||
self.check_equal(resp.status_code, 200)
|
|
||||||
self.check_subset({'Name': new_name,
|
|
||||||
'ArchiveRoot': 'http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/',
|
|
||||||
'Distribution': 'wheezy'}, resp.json())
|
|
||||||
|
|
||||||
|
|
||||||
class MirrorsAPITestRenameConflict(APITest):
|
|
||||||
"""
|
|
||||||
PUT /api/mirrors/:name - Rename mirror to an already existing name should fail with 409
|
|
||||||
"""
|
|
||||||
def check(self):
|
|
||||||
mirror_name_a = self.random_name()
|
|
||||||
mirror_name_b = self.random_name()
|
|
||||||
|
|
||||||
mirror_desc_a = {'Name': mirror_name_a,
|
|
||||||
'ArchiveURL': 'http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/',
|
|
||||||
'IgnoreSignatures': True,
|
|
||||||
'Distribution': 'wheezy',
|
|
||||||
'Components': ['main'],
|
|
||||||
'Architectures': ['amd64']}
|
|
||||||
|
|
||||||
mirror_desc_b = {'Name': mirror_name_b,
|
|
||||||
'ArchiveURL': 'http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/',
|
|
||||||
'IgnoreSignatures': True,
|
|
||||||
'Distribution': 'wheezy',
|
|
||||||
'Components': ['main'],
|
|
||||||
'Architectures': ['amd64']}
|
|
||||||
|
|
||||||
resp = self.post("/api/mirrors", json=mirror_desc_a)
|
|
||||||
self.check_equal(resp.status_code, 201)
|
|
||||||
|
|
||||||
resp = self.post("/api/mirrors", json=mirror_desc_b)
|
|
||||||
self.check_equal(resp.status_code, 201)
|
|
||||||
|
|
||||||
# Try to rename mirror A to mirror B's name — should fail with 409
|
|
||||||
resp = self.put("/api/mirrors/" + mirror_name_a, json={'Name': mirror_name_b, 'IgnoreSignatures': True})
|
|
||||||
self.check_equal(resp.status_code, 409)
|
|
||||||
self.check_in('unable to rename', resp.json()['error'])
|
|
||||||
|
|
||||||
# Mirror A should still exist under its original name
|
|
||||||
resp = self.get("/api/mirrors/" + mirror_name_a)
|
|
||||||
self.check_equal(resp.status_code, 200)
|
|
||||||
self.check_subset({'Name': mirror_name_a}, resp.json())
|
|
||||||
|
|
||||||
|
|
||||||
class MirrorsAPITestEditFlatMirrorUdebs(APITest):
|
class MirrorsAPITestEditFlatMirrorUdebs(APITest):
|
||||||
"""
|
"""
|
||||||
POST /api/mirrors/{name} - Edit flat mirror with udebs (should fail)
|
POST /api/mirrors/{name} - Edit flat mirror with udebs (should fail)
|
||||||
|
|||||||
Reference in new issue
Block a user