vercel-azure-devops-extension icon indicating copy to clipboard operation
vercel-azure-devops-extension copied to clipboard

Custom environment options

Open silvertech-daniel opened this issue 9 months ago • 1 comments

I want to use this but my understanding from https://github.com/vercel/vercel-azure-devops-extension/blob/d23aa660e6d1bd4638107ed417cc86906453a493/vercel-deployment-task-source/src/index.ts#L184 is that there is no corresponding option to ensure that the vercel pull environment is the same as the target.

I think there should there be 4 variables (production, environment, pullEnvironment, and target):

  • with production treated as a shortcut to set environment to "production"
    • throw an error if production and any of the other variables are set at the same time
  • pullEnvironment/target default to environment
  • --prod set if target resolves to "production"

The interactions between this task's options and the vercel cli's options are confusing to me, so let me know if this doesn't make sense.

Extracted into a new issue from https://github.com/vercel/vercel-azure-devops-extension/issues/46#issuecomment-2654191690

silvertech-daniel avatar Feb 19 '25 16:02 silvertech-daniel

The updated readme from @phidol's commit detail how to do this.

For example, if you had a custom environment "custom-test", you could set target: custom-test as a task input and it will deploy to the custom-test environment (set production: false)

general-adhoc avatar Mar 04 '25 03:03 general-adhoc