stdlib: Add GCS support

The interface and behavior is identical to S3.

Signed-off-by: Scott Lewis-Kelly <slewiskelly@slewiskel.ly>
This commit is contained in:
Scott Lewis-Kelly
2021-06-30 14:31:23 +10:00
committed by Andrea Luzzardi
parent c821622628
commit 635b9306b8
11 changed files with 274 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
- [docker/compose](./docker/compose.md) - Docker-compose operations
- [gcp](./gcp/README.md) - Google Cloud Platform
- [gcp/gcr](./gcp/gcr.md) - Google Container Registry
- [gcp/gcs](./gcp/gcs.md) - Google Cloud Storage
- [gcp/gke](./gcp/gke.md) - Google Kubernetes Engine
- [git](./git.md) - Git operations
- [go](./go.md) - Go build operations

View File

@@ -0,0 +1,34 @@
---
sidebar_label: gcs
---
# alpha.dagger.io/gcp/gcs
Google Cloud Storage
```cue
import "alpha.dagger.io/gcp/gcs"
```
## gcs.#Object
GCS Bucket object(s) sync
### gcs.#Object Inputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*config.region* | `string` |GCP region |
|*config.project* | `string` |GCP project |
|*config.serviceKey* | `dagger.#Secret` |GCP service key |
|*source* | `dagger.#Artifact` |Source Artifact to upload to GCS |
|*target* | `string` |Target GCS URL (eg. gs://\<bucket-name\>/\<path\>/\<sub-path\>) |
|*delete* | `*false \| true` |Delete files that already exist on remote destination |
|*contentType* | `*"" \| string` |Object content type |
|*always* | `*true \| false` |Always write the object to GCS |
### gcs.#Object Outputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*url* | `string` |URL of the uploaded GCS object |