Skip to content
Open
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
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ List of contributors, in chronological order:
* Zhang Xiao (https://github.com/xzhang1)
* Tom Nguyen (https://github.com/lecafard)
* Philip Cramer (https://github.com/PhilipCramer)
* mmxxixx (https://github.com/mmxxixx)
18 changes: 18 additions & 0 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,24 @@ func (context *AptlyContext) PackagePool() aptly.PackagePool {
if err != nil {
Fatal(err)
}
} else if storageConfig.S3 != nil {
var err error
context.packagePool, err = s3.NewPackagePool(
storageConfig.S3.AccessKeyID,
storageConfig.S3.SecretAccessKey,
storageConfig.S3.SessionToken,
storageConfig.S3.Bucket,
storageConfig.S3.Prefix,
storageConfig.S3.ACL,
storageConfig.S3.StorageClass,
storageConfig.S3.EncryptionMethod,
storageConfig.S3.Region,
storageConfig.S3.Endpoint,
storageConfig.S3.ForceVirtualHostedStyle,
storageConfig.S3.Debug)
if err != nil {
Fatal(err)
}
} else {
poolRoot := context.config().PackagePoolStorage.Local.Path
if poolRoot == "" {
Expand Down
19 changes: 19 additions & 0 deletions debian/aptly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ azure_publish_endpoints:
# Type must be one of:
# * local
# * azure
# * s3
packagepool_storage:
# Local Pool
type: local
Expand All @@ -425,3 +426,21 @@ packagepool_storage:
# # defaults to "https://<accountName>.blob.core.windows.net"
# endpoint: ""

# # S3 Object Storage Pool
# type: s3
# # S3 bucket to store the pool in
# bucket: pool1
# # Prefix (optional)
# # Store the pool under specified prefix in the bucket, defaults to no prefix (bucket root)
# prefix: ""
# # Region (i.e. us-east-1)
# region: ""
# # Credentials (optional)
# # empty credentials use the standard AWS credential chain (env vars, shared credentials file, IAM role)
# access_key_id: ""
# secret_access_key: ""
# session_token: ""
# # Endpoint URL (optional)
# # for S3-compatible object stores (MinIO, etc.), defaults to AWS S3
# endpoint: ""

23 changes: 23 additions & 0 deletions man/aptly.1
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ The legacy json configuration is still supported (and also supports comments):
// Type must be one of:
// * local
// * azure
// * s3
"packagePoolStorage": {
// Local Pool
"type": "local",
Expand All @@ -463,6 +464,28 @@ The legacy json configuration is still supported (and also supports comments):
// // See: Azure documentation https://docs\.microsoft\.com/en\-us/azure/storage/common/storage\-configure\-connection\-string
// // defaults to "https://<accountName>\.blob\.core\.windows\.net"
// "endpoint": ""

// // S3 Object Storage Pool
// "type": "s3",
// // S3 bucket to store the pool in
// "bucket": "pool1",

// // Prefix (optional)
// // Store the pool under specified prefix in the bucket, defaults to no prefix (bucket root)
// "prefix": "",

// // Region (i\.e\. us\-east\-1)
// "region": "",

// // Credentials (optional)
// // empty credentials use the standard AWS credential chain (env vars, shared credentials file, IAM role)
// "awsAccessKeyID": "",
// "awsSecretAccessKey": "",
// "awsSessionToken": "",

// // Endpoint URL (optional)
// // for S3\-compatible object stores (MinIO, etc\.), defaults to AWS S3
// "endpoint": ""
}

// End of config
Expand Down
23 changes: 23 additions & 0 deletions man/aptly.1.ronn.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ The legacy json configuration is still supported (and also supports comments):
// Type must be one of:
// * local
// * azure
// * s3
"packagePoolStorage": {
// Local Pool
"type": "local",
Expand All @@ -475,6 +476,28 @@ The legacy json configuration is still supported (and also supports comments):
// // See: Azure documentation https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string
// // defaults to "https://<accountName>.blob.core.windows.net"
// "endpoint": ""

// // S3 Object Storage Pool
// "type": "s3",
// // S3 bucket to store the pool in
// "bucket": "pool1",

// // Prefix (optional)
// // Store the pool under specified prefix in the bucket, defaults to no prefix (bucket root)
// "prefix": "",

// // Region (i.e. us-east-1)
// "region": "",

// // Credentials (optional)
// // empty credentials use the standard AWS credential chain (env vars, shared credentials file, IAM role)
// "awsAccessKeyID": "",
// "awsSecretAccessKey": "",
// "awsSessionToken": "",

// // Endpoint URL (optional)
// // for S3-compatible object stores (MinIO, etc.), defaults to AWS S3
// "endpoint": ""
}

// End of config
Expand Down
Loading
Loading