CDLUC3 / mrt-doc

Documentation and Information regarding the Merritt repository
8 stars 4 forks source link

CodeArtifact purge script #1989

Closed terrywbrady closed 5 days ago

terrywbrady commented 1 month ago

Will need to iterate over versions... or find out how to use the query parameter

bash-4.2$ aws codeartifact delete-package-versions --domain cdlib-uc3-mrt --repository uc3-mrt-java --package mrt-cloudconf --format maven --namespace org.cdlib.mrt --versions 3.0-SNAPSHOT --expected-status Unlisted
{
    "successfulVersions": {},
    "failedVersions": {
        "3.0-SNAPSHOT": {
            "errorCode": "MISMATCHED_STATUS",
            "errorMessage": "current status: Published, expected status: Unlisted"
        }
    }
}
terrywbrady commented 1 month ago

Ashley recommends writing a boto3 script for this purpose