gcp
This module lets you push a container into Google Artifact Registry, automating the tedious manual steps of setting up a service account for the docker credentialInstallation
dagger install github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264cEntrypoint
Return Type
Gcp Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
func (m *MyModule) Example() *dagger.Gcp {
return dag.
Gcp()
}@function
def example() -> dagger.Gcp:
return (
dag.gcp()
)@func()
example(): Gcp {
return dag
.gcp()
}Types
Gcp 🔗
getSecret() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
get-secret --gcp-credentials file:pathfunc (m *MyModule) Example(ctx context.Context, gcpCredentials *dagger.File) string {
return dag.
Gcp().
GetSecret(ctx, gcpCredentials)
}@function
async def example(gcp_credentials: dagger.File) -> str:
return await (
dag.gcp()
.get_secret(gcp_credentials)
)@func()
async example(gcpCredentials: File): Promise<string> {
return dag
.gcp()
.getSecret(gcpCredentials)
}withGcpSecret() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
with-gcp-secret --ctr IMAGE:TAG --gcp-credentials file:pathfunc (m *MyModule) Example(ctr *dagger.Container, gcpCredentials *dagger.File) *dagger.Container {
return dag.
Gcp().
WithGcpSecret(ctr, gcpCredentials)
}@function
def example(ctr: dagger.Container, gcp_credentials: dagger.File) -> dagger.Container:
return (
dag.gcp()
.with_gcp_secret(ctr, gcp_credentials)
)@func()
example(ctr: Container, gcpCredentials: File): Container {
return dag
.gcp()
.withGcpSecret(ctr, gcpCredentials)
}gcloudCli() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| project | String ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
gcloud-cli --project string --gcp-credentials file:pathfunc (m *MyModule) Example(project string, gcpCredentials *dagger.File) *dagger.Container {
return dag.
Gcp().
GcloudCli(project, gcpCredentials)
}@function
def example(project: str, gcp_credentials: dagger.File) -> dagger.Container:
return (
dag.gcp()
.gcloud_cli(project, gcp_credentials)
)@func()
example(project: string, gcpCredentials: File): Container {
return dag
.gcp()
.gcloudCli(project, gcpCredentials)
}list() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| account | String ! | - | No description provided |
| project | String ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
list --account string --project string --gcp-credentials file:pathfunc (m *MyModule) Example(ctx context.Context, account string, project string, gcpCredentials *dagger.File) string {
return dag.
Gcp().
List(ctx, account, project, gcpCredentials)
}@function
async def example(account: str, project: str, gcp_credentials: dagger.File) -> str:
return await (
dag.gcp()
.list(account, project, gcp_credentials)
)@func()
async example(account: string, project: string, gcpCredentials: File): Promise<string> {
return dag
.gcp()
.list(account, project, gcpCredentials)
}garEnsureServiceAccountKey() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| account | String ! | - | No description provided |
| region | String ! | - | No description provided |
| project | String ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
gar-ensure-service-account-key --account string --region string --project string --gcp-credentials file:pathfunc (m *MyModule) Example(ctx context.Context, account string, region string, project string, gcpCredentials *dagger.File) string {
return dag.
Gcp().
GarEnsureServiceAccountKey(ctx, account, region, project, gcpCredentials)
}@function
async def example(account: str, region: str, project: str, gcp_credentials: dagger.File) -> str:
return await (
dag.gcp()
.gar_ensure_service_account_key(account, region, project, gcp_credentials)
)@func()
async example(account: string, region: string, project: string, gcpCredentials: File): Promise<string> {
return dag
.gcp()
.garEnsureServiceAccountKey(account, region, project, gcpCredentials)
}garPushExample() 🔗
Push ubuntu:latest to GAR under existing repo
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| account | String ! | - | No description provided |
| region | String ! | - | No description provided |
| project | String ! | - | No description provided |
| repo | String ! | - | No description provided |
| image | String ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
gar-push-example --account string --region string --project string --repo string --image string --gcp-credentials file:pathfunc (m *MyModule) Example(ctx context.Context, account string, region string, project string, repo string, image string, gcpCredentials *dagger.File) string {
return dag.
Gcp().
GarPushExample(ctx, account, region, project, repo, image, gcpCredentials)
}@function
async def example(account: str, region: str, project: str, repo: str, image: str, gcp_credentials: dagger.File) -> str:
return await (
dag.gcp()
.gar_push_example(account, region, project, repo, image, gcp_credentials)
)@func()
async example(account: string, region: string, project: string, repo: string, image: string, gcpCredentials: File): Promise<string> {
return dag
.gcp()
.garPushExample(account, region, project, repo, image, gcpCredentials)
}cleanupServiceAccountKey() 🔗
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| account | String ! | - | No description provided |
| region | String ! | - | No description provided |
| project | String ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
| keyId | String ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
cleanup-service-account-key --account string --region string --project string --gcp-credentials file:path --key-id stringfunc (m *MyModule) Example(ctx context.Context, account string, region string, project string, gcpCredentials *dagger.File, keyId string) {
return dag.
Gcp().
CleanupServiceAccountKey(ctx, account, region, project, gcpCredentials, keyId)
}@function
async def example(account: str, region: str, project: str, gcp_credentials: dagger.File, key_id: str) -> None:
return await (
dag.gcp()
.cleanup_service_account_key(account, region, project, gcp_credentials, key_id)
)@func()
async example(account: string, region: string, project: string, gcpCredentials: File, keyId: string): Promise<void> {
return dag
.gcp()
.cleanupServiceAccountKey(account, region, project, gcpCredentials, keyId)
}garPush() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pushCtr | Container ! | - | No description provided |
| account | String ! | - | No description provided |
| region | String ! | - | No description provided |
| project | String ! | - | No description provided |
| repo | String ! | - | No description provided |
| image | String ! | - | No description provided |
| gcpCredentials | File ! | - | No description provided |
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@8481a74e3d0701f8fc20c880d2840cfae4a2264c call \
gar-push --push-ctr IMAGE:TAG --account string --region string --project string --repo string --image string --gcp-credentials file:pathfunc (m *MyModule) Example(ctx context.Context, pushCtr *dagger.Container, account string, region string, project string, repo string, image string, gcpCredentials *dagger.File) string {
return dag.
Gcp().
GarPush(ctx, pushCtr, account, region, project, repo, image, gcpCredentials)
}@function
async def example(push_ctr: dagger.Container, account: str, region: str, project: str, repo: str, image: str, gcp_credentials: dagger.File) -> str:
return await (
dag.gcp()
.gar_push(push_ctr, account, region, project, repo, image, gcp_credentials)
)@func()
async example(pushCtr: Container, account: string, region: string, project: string, repo: string, image: string, gcpCredentials: File): Promise<string> {
return dag
.gcp()
.garPush(pushCtr, account, region, project, repo, image, gcpCredentials)
}