-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New cli command to manage deployment previews configuration #3541
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 7f7ca83 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks a lot for picking this up and taking the first steps! ❤️
Looks good overall, I left some minor suggestions / comments.
packages/mc-scripts/src/cli.ts
Outdated
@@ -197,6 +198,43 @@ async function run() { | |||
} | |||
); | |||
|
|||
// Command: deployment-previews:push | |||
const usageDeploymentPreviewsPush = | |||
'Creates or updates a deployment preview for the customization application.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Only Custom Applications support deployment previews. We can maybe be more specific.
'Creates or updates a deployment preview for the customization application.'; | |
'Creates or updates a deployment preview for the Custom Application.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was intentionally general because I think we need to to support deployment previews in Custom Views as well.
That's something we had in that's feature plan but left out of the first iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a separate discussion about this as I'm not sure it's something we can easily support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message updated here: e624165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one hasn't been updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about it.
Updated here: adf3d47
This PR is missing a Jira ticket reference in the title or description. |
🥷 Code experts: no user matched threshold 10 See detailsTo learn more about /:\ gitStream - Visit our Docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to go from side 🙌
Please also provide a changeset 🙏
packages/mc-scripts/src/cli.ts
Outdated
@@ -197,6 +198,43 @@ async function run() { | |||
} | |||
); | |||
|
|||
// Command: deployment-previews:push | |||
const usageDeploymentPreviewsPush = | |||
'Creates or updates a deployment preview for the customization application.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one hasn't been updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 🙇♂️
I pulled the changes and tested them locally. Both creating and updating a deployment preview using deployment-previews:set
work perfectly.
Summary
Start work towards improving the Custom Applications deployment previews feature by adding a new command which will allow consumers to create/update deployments previews from the command line using our existing
mc-scripts
cli.Description
There are internal teams with some challenges that could greatly benefit of having a better non-human interaction integration with Custom Applications deployment previews.
We do currently support this feature by manually adjusting some configuration in the Merchant Center UI, but it would be great if that configuration could be automatically updated from CI when a new feature-branch in created in a repository.
In order to achieve that we need to tackle different things but, as part of our X&X days, I wanted to start with this one which would allow for a logged-in user to create or update a new Custom Application deployment preview using the CLI:
# mc-scripts deployment-previews:set --alias my-alias --url https://www.nowhere.com
(if the arguments are not provided, the command will prompt for them)
This could allow consumers to automatically trigger from their CI the creation/update of a Custom Application deployment preview for any given created branch without human intervention.
This steps still required a CLI logged-in user to run this command, but it's a first step towards the end goal.