Skip to content

feature(build) - add new --skip-tasks arg for bit build command #9196

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

Merged
merged 1 commit into from
Sep 16, 2024
Merged
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
11 changes: 11 additions & 0 deletions scopes/pipelines/builder/build.cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type BuildOpts = {
tasks: string;
listTasks?: string;
skipTests?: boolean;
skipTasks?: string;
failFast?: boolean;
includeSnap?: boolean;
includeTag?: boolean;
Expand Down Expand Up @@ -68,6 +69,12 @@ specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. te
'list tasks of an env or a component-id for each one of the pipelines: build, tag and snap',
],
['', 'skip-tests', 'skip running component tests during build process'],
[
'',
'skip-tasks <string>',
`skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`,
],
[
'',
'fail-fast',
Expand Down Expand Up @@ -107,6 +114,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
tasks,
listTasks,
skipTests,
skipTasks,
failFast,
includeSnap,
includeTag,
Expand All @@ -129,6 +137,8 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
);
}

const skipTasksParsed = skipTasks ? skipTasks.split(',').map((t) => t.trim()) : undefined;

const envsExecutionResults = await this.builder.build(
components,
{
Expand All @@ -146,6 +156,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
dev,
tasks: tasks ? tasks.split(',').map((task) => task.trim()) : [],
skipTests,
skipTasks: skipTasksParsed,
exitOnFirstFailedTask: failFast,
},
{
Expand Down