pivotal-cf / pivnet-resource

Concourse Resource to interact with the Tanzu Network API V2 interface.
Apache License 2.0
29 stars 37 forks source link

Can't set End of General support date with metadata #142

Closed mrosecrance closed 3 years ago

mrosecrance commented 3 years ago

This would be great to set automatically. Our current attempts to use copy_metadata somehow seem to leave EOGS empty - we're not sure which release it is copying metadata from.

At the moment we're curling pivnet and updating it programmatically with this jq block but it's pretty unideal:

pivnet --format=json releases --product-slug=$PRODUCT_SLUG \
    | jq -r ".[]|select(.version|startswith(\"$VERSION.\")) | select(.release_type| ( test(\"Security Release\") or test(\"Minor\"))) |.id" \
    | xargs -I{} pivnet curl -X PATCH /products/$PRODUCT_ID/releases/{}  -d "{\"release\":{\"end_of_support_date\":\"$EOGS_DATE\"}}"\
    | jq '.| "\(.release.version) end_of_support_date:\(.release.end_of_support_date)  status:\(.status) message:\(.message)"'; 

Is there a better way to do this?

mrosecrance commented 3 years ago

Just found there's a metadata field that some others are using