@@ -68,7 +68,7 @@ The S3 template uses some global configuration used throughout all jobs.
| :lock: `S3_ACCESS_KEY` | Default S3 service Access Key | **has to be defined** |
| :lock: `S3_SECRET_KEY` | Default S3 service Secret Key | **has to be defined** |
| `S3_BASE_BUCKET_NAME` | Base bucket name | `$CI_PROJECT_NAME` ([see GitLab doc](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)) |
| `S3_ROOT_PATH` | Default root path where files will be uploaded in the S3 bucket (:warning: don't forget the starting `/`) | _none_ |
| `S3_ROOT_PATH` | Default root path (_prefix_) where files will be uploaded in the S3 bucket (:warning: don't forget the starting `/`) | _none_ |
### Secrets management
@@ -176,6 +176,52 @@ Here are variables supported to configure the production environment:
| `AUTODEPLOY_TO_PROD` | Set this variable to auto-deploy to production. If not set deployment to production will be `manual` (default behaviour). | _none_ (disabled) |
| `S3_PROD_ROOT_PATH` | S3 bucket root path (prefix) for `production` env _(only define if different from default)_ | `S3_ROOT_PATH` |
### Buckets namespacing
In its default configuration, the template manages (create/sync/delete) one S3 bucket per environment.
But you may also configure it to implement other policies. Here are several examples of alternate policies.
#### A single bucket with separate prefixes for each env
Here the `.gitlab-ci.yml` configuration for one shared bucket for all envs, each separated by prefix: