From 9d7a4b76690b72550a2caa04accf667e86719857 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 25 Nov 2023 00:05:25 +0100 Subject: [PATCH] update app.cfg.example + README to mention that bucket_name can also be a mapping of target repo id to bucket name --- README.md | 18 ++++++++++++++++-- app.cfg.example | 5 ++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 317dc921..5a601279 100644 --- a/README.md +++ b/README.md @@ -402,10 +402,24 @@ endpoint_url = URL_TO_S3_SERVER ``` `endpoint_url` provides an endpoint (URL) to a server hosting an S3 bucket. The server could be hosted by a commercial cloud provider like AWS or Azure, or running in a private environment, for example, using Minio. The bot uploads tarballs to the bucket which will be periodically scanned by the ingestion procedure at the Stratum 0 server. + +```ini +# example: same bucket for all target repos +bucket_name = "eessi-staging" ``` -bucket_name = eessi-staging +```ini +# example: bucket to use depends on target repo +bucket_name = { + "eessi-pilot-2023.06": "eessi-staging-2023.06", + "eessi.io-2023.06": "software.eessi.io-2023.06", +} ``` -`bucket_name` is the name of the bucket used for uploading of tarballs. The bucket must be available on the default server (`https://${bucket_name}.s3.amazonaws.com`), or the one provided via `endpoint_url`. + +`bucket_name` is the name of the bucket used for uploading of tarballs. +The bucket must be available on the default server (`https://${bucket_name}.s3.amazonaws.com`), or the one provided via `endpoint_url`. + +`bucket_name` can be specified as a string value to use the same bucket for all target repos, or it can be mapping from target repo id to bucket name. + ``` upload_policy = once diff --git a/app.cfg.example b/app.cfg.example index 922df7ae..7d647980 100644 --- a/app.cfg.example +++ b/app.cfg.example @@ -123,7 +123,10 @@ tarball_upload_script = PATH_TO_EESSI_BOT/scripts/eessi-upload-to-staging # - The latter variant is used for AWS S3 services. endpoint_url = URL_TO_S3_SERVER -# bucket name +# bucket name: +# can be a string value, to always use same bucket regardless of target repo, +# or can be a mapping of target repo id (see also repo_target_map) to bucket name +# like: bucket_name = {"eessi-pilot-2023.06": "eessi-staging-pilot-2023.06", "eessi.io-2023.06": "software.eessi.io-2023.06"} bucket_name = eessi-staging # upload policy: defines what policy is used for uploading built artefacts