Ignore Build Step via REST API

Hey all,

we’re trying to update our deployment pipeline to accommodate for deploying some projects only with certain Github PRs. For this, we’re currently using Github label that triggers and runs and action that triggers these builds via Vercel REST API. That part we got working pretty smoothly.

However, we do have an ignored build step on these projects to only build production code by default, which we’re hoping to overwrite with this push, but in the API documentation, we’re not finding any option to overwrite this (similar to unticking the check when doing this from the GUI).

The ignore build step is defined as if [ "$VERCEL_ENV" == "production" ]; then exit 1; else exit 0; fi

Our “ideas” include:

  • defining this in the API call, if anyone can help us find this property?
  • adjusting the ignore build step, so that it takes in the label from Github, but for that, we haven’t succeeded with finding the “how”
  • any other suggestions you can think of?

Has anyone come across something similar? What was your experience/solution? :pray:

Any help appreciated
Best, Petr

Hey @petrmrkvicka. Would you be able to include a vercel.json file in the project and set your preferred ignoreCommand there?

Thanks @amyegan, would that overwrite the default script in the GUI? I’d assume I could put a similar command there? (We have 2 deployments of the same project :thinking:)

Yes, you could add the command in Project Settings. An ignoreCommand in a vercel.json file would override that Ignored Build Step setting.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.