Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sdk/containerregistry/container-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,14 @@ async function main() {
// Delete images older than the first three.
for await (const manifest of imageManifests) {
if (imageCount++ > imagesToKeep) {
const image = repository.getArtifact(manifest.digest);
console.log(`Deleting image with digest ${manifest.digest}`);
console.log(` This image has the following tags:`);
console.log(` Deleting the following tags from the image:`);
for (const tagName of manifest.tags) {
console.log(` ${manifest.repositoryName}:${tagName}`);
image.deleteTag(tagName);
}
await repository.getArtifact(manifest.digest).delete();
await image.delete();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ async function main() {
// Delete images older than the first three.
for await (const manifest of imageManifests) {
if (imageCount++ > imagesToKeep) {
const image = repository.getArtifact(manifest.digest);
console.log(`Deleting image with digest ${manifest.digest}`);
console.log(` This image has the following tags:`);
console.log(` Deleting the following tags from the image:`);
for (const tagName of manifest.tags) {
console.log(` ${manifest.repositoryName}:${tagName}`);
image.deleteTag(tagName);
}
await repository.getArtifact(manifest.digest).delete();
await image.delete();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ async function main() {
// Delete images older than the first three.
for await (const manifest of imageManifests) {
if (imageCount++ > imagesToKeep) {
const image = repository.getArtifact(manifest.digest);
console.log(`Deleting image with digest ${manifest.digest}`);
console.log(` This image has the following tags:`);
console.log(` Deleting the following tags from the image:`);
for (const tagName of manifest.tags) {
console.log(` ${manifest.repositoryName}:${tagName}`);
image.deleteTag(tagName);
}
await repository.getArtifact(manifest.digest).delete();
await image.delete();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ async function main() {
// Delete images older than the first three.
for await (const manifest of imageManifests) {
if (imageCount++ > imagesToKeep) {
const image = repository.getArtifact(manifest.digest);
console.log(`Deleting image with digest ${manifest.digest}`);
console.log(` This image has the following tags:`);
console.log(` Deleting the following tags from the image:`);
for (const tagName of manifest.tags) {
console.log(` ${manifest.repositoryName}:${tagName}`);
image.deleteTag(tagName);
}
await repository.getArtifact(manifest.digest).delete();
await image.delete();
}
}
}
Expand Down