Skip to content

Commit c01494d

Browse files
authored
Merge pull request #2364 from buildkite/build-export-gcs
Update build_exports to bring visibility on IAM conditions and connectivity tests
2 parents 057c4f1 + 7d27b50 commit c01494d

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

pages/pipelines/build_exports.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,20 @@ Your Buildkite Organization ID (UUID) can be found on the settings page describe
8686
### Prepare your Google Cloud Storage bucket
8787

8888
* Read and understand [Google Cloud Storage security best practices](https://cloud.google.com/security/best-practices) and [Best practices for Cloud Storage](https://cloud.google.com/storage/docs/).
89-
* Your bucket must have a policy allowing our Buildkite service-account access as described here and demonstrated in the example below¹.
89+
* Your bucket must have a policy allowing our Buildkite service-account access as described here.
9090
- Assign Buildkite's service-account `buildkite-production-aws@buildkite-pipelines.iam.gserviceaccount.com` the `"Storage Object Creator"`.
91-
- Scope the `"Storage Object Creator"` role using IAM Conditions to limit access to objects matching the prefix `buildkite/build-exports/org=YOUR-BUILDKITE-ORGANIZATION-UUID/*`¹.
91+
- Scope the `"Storage Object Creator"` role using IAM Conditions to limit access to objects matching the prefix `buildkite/build-exports/org=YOUR-BUILDKITE-ORGANIZATION-UUID/*`.
92+
- Your IAM Conditions should look like this, with `YOUR-BUCKET-NAME-HERE` and `YOUR-BUILDKITE-ORGANIZATION-UUID` substituted with your details:
93+
94+
```json
95+
{
96+
"expression": "resource.name.startsWith('projects/_/buckets/YOUR-BUCKET-NAME-HERE/objects/buildkite/build-exports/org=YOUR-BUILDKITE-ORGANIZATION-UUID/')",
97+
"title": "Scope build exports prefix",
98+
"description": "Allow Buildkite's service-account to create objects only within the build exports prefix",
99+
}
100+
```
101+
102+
Your Buildkite Organization ID (UUID) can be found on the [organization's pipeline settings](https://buildkite.com/organizations/~/pipeline-settings).
92103
* Your bucket must grant our Buildkite service-account (`buildkite-production-aws@buildkite-pipelines.iam.gserviceaccount.com`) `storage.objects.create` permission.
93104
* Your bucket should use modern Google Cloud Storage security features and configurations, for example (but not limited to):
94105
- [Public access prevention](https://cloud.google.com/storage/docs/public-access-prevention) to prevent accidental misconfiguration leading to data exposure.
@@ -97,18 +108,6 @@ Your Buildkite Organization ID (UUID) can be found on the settings page describe
97108
- [Object versioning](https://cloud.google.com/storage/docs/object-versioning) to help recover objects from accidental deletion or overwrite.
98109
* You may want to use [GCS Object Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) to manage storage class and object expiry.
99110

100-
¹ Your IAM Conditions should look like this, with `YOUR-BUCKET-NAME-HERE` and `YOUR-BUILDKITE-ORGANIZATION-UUID` substituted with your details:
101-
102-
```json
103-
{
104-
"expression": "resource.name.startsWith('projects/_/buckets/YOUR-BUCKET-NAME-HERE/objects/buildkite/build-exports/org=YOUR-BUILDKITE-ORGANIZATION-UUID')",
105-
"title": "Scope build exports prefix",
106-
"description": "Allow Buildkite's service-account to create objects only within the build exports prefix",
107-
}
108-
```
109-
110-
Your Buildkite Organization ID (UUID) can be found on the settings page described in the next section.
111-
112111
### Enable build exports
113112

114113
To enable build exports:
@@ -117,3 +116,7 @@ To enable build exports:
117116
1. In the _Exporting historical build data_ section, select your build export strategy (S3 or GCS).
118117
1. Enter your bucket name.
119118
1. Select _Enable Export_.
119+
120+
Once _Enable Export_ is selected, we perform validation to ensure we can connect to the bucket provided for export. If there are any issues with connectivity export will not get enabled and you will see an error in the UI.
121+
122+
Second part of validation is we upload a test file "deliverability-test.txt" to your build export bucket. Please note that this test file may not appear right away in your build export bucket as there is an internal process that needs to kick off for this to happen.

0 commit comments

Comments
 (0)