Skip to content

Commit

Permalink
chore: remove success on CI output for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Dec 13, 2024
1 parent fe0ec83 commit fcc83af
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/commands/project/delete/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ export class Source extends SfCommand<DeleteSourceJson> {
const stages = new DeployStages({
title: 'Deleting Metadata',
jsonEnabled: this.jsonEnabled(),
verbose: this.flags['verbose'],
});

const isRest = (await resolveApi()) === API['REST'];
Expand Down
1 change: 0 additions & 1 deletion src/commands/project/deploy/resume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export default class DeployMetadataResume extends SfCommand<DeployResultJson> {
new DeployStages({
title: 'Resuming Deploy',
jsonEnabled: this.jsonEnabled(),
verbose: flags.verbose,
}).start(
{
deploy,
Expand Down
1 change: 0 additions & 1 deletion src/commands/project/deploy/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ export default class DeployMetadata extends SfCommand<DeployResultJson> {
this.stages = new DeployStages({
title,
jsonEnabled: this.jsonEnabled(),
verbose: flags['verbose'],
});

this.deployUrl = buildDeployUrl(flags['target-org'], deploy.id);
Expand Down
1 change: 0 additions & 1 deletion src/commands/project/deploy/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export default class DeployMetadataValidate extends SfCommand<DeployResultJson>
new DeployStages({
title: 'Validating Deployment',
jsonEnabled: this.jsonEnabled(),
verbose: flags.verbose,
}).start(
{
deploy,
Expand Down
24 changes: 3 additions & 21 deletions src/utils/deployStages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import {
} from '@salesforce/source-deploy-retrieve';
import { SourceMemberPollingEvent } from '@salesforce/source-tracking';
import terminalLink from 'terminal-link';
import { ensureArray } from '@salesforce/kit';
import ansis from 'ansis';
import { testResultSort } from '../formatters/testResultsFormatter.js';
import { check, getZipFileSize } from './output.js';
import { getZipFileSize } from './output.js';
import { isTruthy } from './types.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
Expand All @@ -27,7 +26,6 @@ const mdTransferMessages = Messages.loadMessages('@salesforce/plugin-deploy-retr
type Options = {
title: string;
jsonEnabled: boolean;
verbose?: boolean;
};

type Data = {
Expand Down Expand Up @@ -64,7 +62,7 @@ export class DeployStages {
*/
private printedApexTestFailures: Set<string>;

public constructor({ title, jsonEnabled, verbose }: Options) {
public constructor({ title, jsonEnabled }: Options) {
this.printedApexTestFailures = new Set();
this.mso = new MultiStageOutput<Data>({
title,
Expand Down Expand Up @@ -149,8 +147,7 @@ export class DeployStages {
label: 'Successful',
get: (data): string | undefined =>
data?.mdapiDeploy?.numberTestsTotal && data?.mdapiDeploy?.numberTestsCompleted
? formatProgress(data?.mdapiDeploy?.numberTestsCompleted, data?.mdapiDeploy?.numberTestsTotal) +
(verbose && isCI() ? os.EOL + formatTestSuccesses(data) : '')
? formatProgress(data?.mdapiDeploy?.numberTestsCompleted, data?.mdapiDeploy?.numberTestsTotal)
: undefined,
stage: 'Running Tests',
type: 'dynamic-key-value',
Expand Down Expand Up @@ -287,21 +284,6 @@ export class DeployStages {
}
}

function formatTestSuccesses(data: Data): string {
const successes = ensureArray(data.mdapiDeploy.details.runTestResult?.successes).sort(testResultSort);

let output = '';

if (successes.length > 0) {
for (const test of successes) {
const testName = ansis.underline(`${test.name}.${test.methodName}`);
output += ` ${check} ${testName}${os.EOL}`;
}
}

return output;
}

function formatTestFailures(failuresData: Failures[]): string {
const failures = failuresData.sort(testResultSort);

Expand Down

0 comments on commit fcc83af

Please sign in to comment.