eager-wall-56838
02/26/2024, 5:03 PMeager-wall-56838
02/26/2024, 5:04 PMexport const dockerRegistry = new gcloud.artifactregistry.v1.Repository(
"registry",
{
project: config.projectId,
location: "us",
format: gcloud.artifactregistry.v1.RepositoryFormat.Docker,
repositoryId: dockerRegistryId,
// See <https://cloud.google.com/artifact-registry/docs/repositories/cleanup-policy#json>
cleanupPolicies: {
"delete-pull-request-images": JSON.stringify(
{
id: "delete-pull-request-images",
action: "DELETE",
condition: {
older_than: "432000s",
tag_prefixes: ["pr-"]
},
}
),
},
cleanupPolicyDryRun: true,
},
{
ignoreChanges: ["createTime", "updateTime"],
},
)
But you get a generic 400 error and can't tell what went wrong.