Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: delete expired docker promo
  • Loading branch information
lili2311 committed May 31, 2019
1 parent aa4d81a commit d82df40
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 216 deletions.
7 changes: 1 addition & 6 deletions src/cli/commands/monitor.ts
Expand Up @@ -14,7 +14,6 @@ import * as spinner from '../../lib/spinner';
import * as detect from '../../lib/detect';
import * as plugins from '../../lib/plugins';
import {ModuleInfo} from '../../lib/module-info'; // TODO(kyegupov): fix import
import * as docker from '../../lib/docker-promotion';
import {SingleDepRootResult, MultiDepRootsResult, isMultiResult, MonitorError } from '../../lib/types';

const SEPARATOR = '\n-------------------------------------------------------\n';
Expand Down Expand Up @@ -234,7 +233,7 @@ function formatMonitorOutput(
) {
const issues = res.licensesPolicy ? 'issues' : 'vulnerabilities';
const humanReadableName = subProjectName ? `${res.path} (${subProjectName})` : res.path;
let strOutput = chalk.bold.white('\nMonitoring ' + humanReadableName + '...\n\n') +
const strOutput = chalk.bold.white('\nMonitoring ' + humanReadableName + '...\n\n') +
(packageManager === 'yarn' ?
'A yarn.lock file was detected - continuing as a Yarn project.\n' : '') +
'Explore this snapshot at ' + res.uri + '\n\n' +
Expand All @@ -253,10 +252,6 @@ function formatMonitorOutput(
'View plans here: ' + manageUrl + '\n\n') :
'');

if (docker.shouldSuggestDocker(options)) {
strOutput += chalk.bold.white(docker.suggestionText);
}

return options.json ?
JSON.stringify(_.assign({}, res, {
manageUrl,
Expand Down
11 changes: 2 additions & 9 deletions src/cli/commands/test.ts
Expand Up @@ -7,7 +7,6 @@ import * as config from '../../lib/config';
import {isCI} from '../../lib/is-ci';
import {exists as apiTokenExists} from '../../lib/api-token';
import {SEVERITIES, WIZARD_SUPPORTED_PMS} from '../../lib/snyk-test/common';
import * as docker from '../../lib/docker-promotion';
import * as Debug from 'debug';
import {TestOptions} from '../../lib/types';
import {isLocalFolder} from '../../lib/detect';
Expand Down Expand Up @@ -238,11 +237,6 @@ function displayResult(res, options: TestOptions & OptionsAtDisplayStage) {
}
const testedInfoText = `Tested ${pathOrDepsText} for known ${issuesText}`;

let dockerSuggestion = '';
if (docker.shouldSuggestDocker(options)) {
dockerSuggestion += chalk.bold.white(docker.suggestionText);
}

let multiProjAdvice = '';

if (options.advertiseSubprojectsCount) {
Expand All @@ -267,8 +261,7 @@ function displayResult(res, options: TestOptions & OptionsAtDisplayStage) {
prefix + meta + summaryOKText + multiProjAdvice + (
isCI() ? '' :
dockerAdvice +
nextStepsText +
dockerSuggestion)
nextStepsText)
);
}

Expand Down Expand Up @@ -299,7 +292,7 @@ function displayResult(res, options: TestOptions & OptionsAtDisplayStage) {
if (options.canSuggestRemediation && WIZARD_SUPPORTED_PMS.indexOf(packageManager) > -1) {
summary += chalk.bold.green('\n\nRun `snyk wizard` to address these issues.');
}

let dockerSuggestion = '';
if (options.docker &&
(config.disableSuggestions !== 'true')) {
const optOutSuggestions =
Expand Down
27 changes: 0 additions & 27 deletions src/lib/docker-promotion.js

This file was deleted.

174 changes: 0 additions & 174 deletions test/acceptance/docker-promotion.test.js

This file was deleted.

0 comments on commit d82df40

Please sign in to comment.