-
-
Notifications
You must be signed in to change notification settings - Fork 236
feat: Support missing calls with multi-project the options #3001
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -144,5 +144,45 @@ describe('SentryCli releases', () => { | |||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| describe('newDeploy', () => { | ||||||||||||||||||||||||||||||||||||||||||
| test('without projects', async () => { | ||||||||||||||||||||||||||||||||||||||||||
| await cli.releases.newDeploy('my-version', { env: 'production' }); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| expect(mockExecute).toHaveBeenCalledWith( | ||||||||||||||||||||||||||||||||||||||||||
| ['releases', 'deploys', 'my-version', 'new', '--env', 'production'], | ||||||||||||||||||||||||||||||||||||||||||
| null, | ||||||||||||||||||||||||||||||||||||||||||
| false, | ||||||||||||||||||||||||||||||||||||||||||
| undefined, | ||||||||||||||||||||||||||||||||||||||||||
| { silent: false } | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| test('with projects', async () => { | ||||||||||||||||||||||||||||||||||||||||||
| await cli.releases.newDeploy('my-version', { | ||||||||||||||||||||||||||||||||||||||||||
| env: 'production', | ||||||||||||||||||||||||||||||||||||||||||
| projects: ['proj-a', 'proj-b'], | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| expect(mockExecute).toHaveBeenCalledWith( | ||||||||||||||||||||||||||||||||||||||||||
| [ | ||||||||||||||||||||||||||||||||||||||||||
| 'releases', | ||||||||||||||||||||||||||||||||||||||||||
| 'deploys', | ||||||||||||||||||||||||||||||||||||||||||
| '-p', | ||||||||||||||||||||||||||||||||||||||||||
| 'proj-a', | ||||||||||||||||||||||||||||||||||||||||||
| '-p', | ||||||||||||||||||||||||||||||||||||||||||
| 'proj-b', | ||||||||||||||||||||||||||||||||||||||||||
| 'my-version', | ||||||||||||||||||||||||||||||||||||||||||
| 'new', | ||||||||||||||||||||||||||||||||||||||||||
| '--env', | ||||||||||||||||||||||||||||||||||||||||||
| 'production', | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+169
to
+178
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: we should use
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||
| null, | ||||||||||||||||||||||||||||||||||||||||||
| false, | ||||||||||||||||||||||||||||||||||||||||||
| undefined, | ||||||||||||||||||||||||||||||||||||||||||
| { silent: false } | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -203,6 +203,7 @@ export class Releases { | |||||||||||||
| * time: 1295, // deployment duration in seconds. This can be specified alternatively to `started` and `finished` | ||||||||||||||
| * name: 'PickleRick', // human readable name for this deployment | ||||||||||||||
| * url: 'https://example.com', // URL that points to the deployment | ||||||||||||||
| * projects: ['project1', 'project2'], // list of projects to deploy to | ||||||||||||||
| * }); | ||||||||||||||
| * | ||||||||||||||
| * @param release Unique name of the release. | ||||||||||||||
|
|
@@ -213,7 +214,9 @@ export class Releases { | |||||||||||||
| if (!options || !options.env) { | ||||||||||||||
| throw new Error('options.env must be a valid name'); | ||||||||||||||
| } | ||||||||||||||
| const args = ['releases', 'deploys', release, 'new']; | ||||||||||||||
| const args = ['releases', 'deploys'] | ||||||||||||||
| .concat(helper.getProjectFlagsFromOptions(options)) | ||||||||||||||
| .concat([release, 'new']); | ||||||||||||||
|
Comment on lines
+217
to
+219
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: I am pretty sure this will get the result we want with using
Suggested change
|
||||||||||||||
| return this.execute(helper.prepareCommand(args, DEPLOYS_OPTIONS, options), null); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -167,6 +167,10 @@ export type SentryCliNewDeployOptions = { | |||||
| * URL that points to the deployment. | ||||||
| */ | ||||||
| url?: string; | ||||||
| /** | ||||||
| * The projects to deploy the release to. If not provided, the deployment will be created for the default project. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You missed this comment @JPeer264 😄 |
||||||
| */ | ||||||
| projects?: string[]; | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
|
|
||||||
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.
m:
releases deploysis a soft-deprecated alias todeploys. This would be the preferred way to invoke the command: