Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Creating a script to delete datasets without user interaction for use in CI pipeline

4 replies
Last updated: May 14, 2020
Hi again! I want to create a script to delete datasets without user interaction and use it in my CI pipeline where I would like to create temporary datasets for our feature branches. Could not find any --force flag for
sanity dataset delete
. The issue is, how can I pass arguments to exec like this?
sanity exec scripts/deleteDataset.js helloworld
Do I have to pass it as an environment variable?
May 14, 2020, 10:36 AM
oh wait, If I use a plain node script instead of sanity exec this is not an issue..
May 14, 2020, 10:52 AM
self service support 😂
May 14, 2020, 10:52 AM
Nice one, Torbjørn 😄 I’ll make a note of this too just in case we publish some CI-related documentation. Thanks.
May 14, 2020, 1:12 PM
Nice one, Torbjørn 😄 I’ll make a note of this too just in case we publish some CI-related documentation. Thanks.
May 14, 2020, 1:12 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?