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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f
Entrypoint
Return Type
Gcp
Example
dagger -m github.com/vikram-dagger/gcp-for-dagger@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
func (m *myModule) example() *Gcp {
return dag.
Gcp()
}
@function
def example() -> dag.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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
get-secret --gcp-credentials file:path
func (m *myModule) example(ctx context.Context, gcpCredentials *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
with-gcp-secret --ctr IMAGE:TAG --gcp-credentials file:path
func (m *myModule) example(ctr *Container, gcpCredentials *File) *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
gcloud-cli --project string --gcp-credentials file:path
func (m *myModule) example(project string, gcpCredentials *File) *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
list --account string --project string --gcp-credentials file:path
func (m *myModule) example(ctx context.Context, account string, project string, gcpCredentials *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
gar-ensure-service-account-key --account string --region string --project string --gcp-credentials file:path
func (m *myModule) example(ctx context.Context, account string, region string, project string, gcpCredentials *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
gar-push-example --account string --region string --project string --repo string --image string --gcp-credentials file:path
func (m *myModule) example(ctx context.Context, account string, region string, project string, repo string, image string, gcpCredentials *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
cleanup-service-account-key --account string --region string --project string --gcp-credentials file:path --key-id string
func (m *myModule) example(ctx context.Context, account string, region string, project string, gcpCredentials *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@a92dbf1c7266e9ec9d57559f6202ad47fa03795f call \
gar-push --push-ctr IMAGE:TAG --account string --region string --project string --repo string --image string --gcp-credentials file:path
func (m *myModule) example(ctx context.Context, pushCtr *Container, account string, region string, project string, repo string, image string, gcpCredentials *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)
}