Skip to content
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

implement a multi project release manager #40

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,32 @@ Here is a sample configuration with one project:
}
```


### 8. Configure multiple project releases

Releases management can be configured in `config/homer/projects.json`.
Here is a sample configuration with one project:

```json
{
"projects": [
{
"description": "project_example",
"notificationChannelIds": ["C0XXXXXXXXX"],
"projectId": 1148,
"releaseChannelId": "C0XXXXXXXXX",
"releaseManager": {
"type": "multipleProjectReleaseManager",
"appNameDefault": "defaultAppName",
"appName": "appName",
"appNameOther": "other"
},
"releaseTagManager": "stableDateReleaseTagManager"
}
]
}
```

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).
34 changes: 34 additions & 0 deletions __tests__/release/utils/configBuilder.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defaultReleaseManager } from '@/release/commands/create/managers/defaultReleaseManager';
import { federationReleaseTagManager } from '@/release/commands/create/managers/federationReleaseTagManager';
import { multipleProjectReleaseManager } from '@/release/commands/create/managers/multipleProjectReleaseManager';
import { buildProjectReleaseConfigs } from '@/release/utils/configBuilder';

describe('configBuilder', () => {
Expand Down Expand Up @@ -63,4 +64,37 @@ describe('configBuilder', () => {
'The config file should contain an array of valid project configurations'
);
});
it('should build a multiple project config', () => {
const projects = [
{
releaseManager: {
type: 'multipleProjectReleaseManager' as const,
config: {
appNameDefault: 'defaultName',
appName: 'appName',
appNameOther: 'otherName',
},
},
releaseTagManager: 'federationReleaseTagManager',
notificationChannelIds: ['C678'],
projectId: 123,
releaseChannelId: 'C456',
},
];
expect(
buildProjectReleaseConfigs(
{ projects },
{ defaultReleaseManager },
{ federationReleaseTagManager }
)
).toEqual([
{
notificationChannelIds: ['C678'],
projectId: 123,
releaseChannelId: 'C456',
releaseManager: multipleProjectReleaseManager,
releaseTagManager: federationReleaseTagManager,
},
]);
});
});
Loading
Loading