Skip to content

Commit 65a41e8

Browse files
authored
Merge pull request #15 from Bielik20/ADEN-10699
feat: deploy ad-engine for feature branch
2 parents 196430d + 8a5c429 commit 65a41e8

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

src/commands/run/jobs-builder/deploy-job-builder.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ interface DeployJobMobileWikiParams {
1919
crowdin_branch: string;
2020
}
2121

22+
interface DeployPlatformsParams {
23+
BRANCH: string;
24+
}
25+
2226
type DeployProject = Project | 'app-ucp';
2327

2428
export class DeployJobBuilder {
@@ -27,6 +31,7 @@ export class DeployJobBuilder {
2731
['ucp', 'mediawiki-deploy-sandbox-ucp'],
2832
['app', 'mediawiki-deploy-sandbox-ucp'],
2933
['mobile-wiki', 'mobile-wiki-deploy-sandbox'],
34+
['platforms', 'ad_engine_platforms_deploy_branch'],
3035
]);
3136

3237
build(projects: Project[], params: ParamsResult): JobDescriptor[] {
@@ -57,7 +62,7 @@ export class DeployJobBuilder {
5762
private mapProjectParams(
5863
project: DeployProject,
5964
input: ParamsResult,
60-
): DeployJobAppAndUcpParams | DeployJobMobileWikiParams {
65+
): DeployJobAppAndUcpParams | DeployJobMobileWikiParams | DeployPlatformsParams {
6166
switch (project) {
6267
case 'app-ucp':
6368
return {
@@ -99,6 +104,11 @@ export class DeployJobBuilder {
99104
dc: input.datacenter,
100105
crowdin_branch: input.crowdinBranch,
101106
};
107+
108+
case 'platforms':
109+
return {
110+
BRANCH: input.platformsBranch,
111+
};
102112
}
103113

104114
console.log('Aborting - Trying to build DeployJob with unknown Project');

src/commands/run/questions/param-questions.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ export interface ParamsResult {
1111
fandomEnvironment?: string;
1212
extension?: string;
1313
name?: string;
14+
platformsBranch?: string;
1415
}

src/commands/run/questions/param-questions.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const questions: FilterParamQuestion[] = [
6060
default: currentBranch,
6161
destined: {
6262
jobs: ['update', 'deploy'],
63-
projects: availableProjects,
63+
projects: availableProjects.filter(project => project !== 'platforms'),
6464
extended: false,
6565
},
6666
},
@@ -186,4 +186,16 @@ const questions: FilterParamQuestion[] = [
186186
extended: false,
187187
},
188188
},
189+
{
190+
name: 'platformsBranch',
191+
message: 'Platform branch',
192+
validate: requiredInput,
193+
filter: adenToUpper,
194+
transformer: adenToUpper,
195+
destined: {
196+
jobs: ['deploy'],
197+
projects: ['platforms'],
198+
extended: false,
199+
},
200+
},
189201
];

src/commands/run/questions/project-questions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as inquirer from 'inquirer';
22
import { filterList } from '../../../utils/filter-list';
33

4-
export type Project = 'ucp' | 'app' | 'mobile-wiki' | 'f2';
5-
export const availableProjects: Project[] = ['ucp', 'app', 'mobile-wiki', 'f2'];
4+
export type Project = 'ucp' | 'app' | 'mobile-wiki' | 'f2' | 'platforms';
5+
export const availableProjects: Project[] = ['ucp', 'app', 'mobile-wiki', 'f2', 'platforms'];
66

77
export async function verifyProjects(projects: string[]): Promise<Project[]> {
88
return filterList(projects, availableProjects, () => askForProjects());

0 commit comments

Comments
 (0)