Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Kerr committed Sep 17, 2019
1 parent 070ec01 commit c303491
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 71 deletions.
126 changes: 63 additions & 63 deletions index.ts
Expand Up @@ -22,8 +22,8 @@ import {
ToDefaultBranch,
} from "@atomist/sdm";
import {
AllGoals,
configure,
DeliveryGoals,
isInLocalMode,
} from "@atomist/sdm-core";
import {
Expand Down Expand Up @@ -57,7 +57,7 @@ import { startEmbeddedPostgres } from "./lib/util/postgres";

const virtualProjectFinder: VirtualProjectFinder = DefaultVirtualProjectFinder;

interface TestGoals extends AllGoals {
interface TestGoals extends DeliveryGoals {
build: Build;
pushImpact: PushImpact;
}
Expand All @@ -67,69 +67,69 @@ const undesirableUsageChecker: UndesirableUsageChecker = demoUndesirableUsageChe

export const configuration: Configuration = configure<TestGoals>(async sdm => {

// Create goals that compute fingerprints during delivery
const pushImpact = new PushImpact();

const build: Build = new Build()
.with({
...MavenDefaultOptions,
builder: mavenBuilder(),
});

const store = new PostgresProjectAnalysisResultStore(sdmConfigClientFactory(sdm.configuration));
sdm.addCommand(addSuggestedFingerprintCommand(
isInLocalMode() ? storeFingerprintsFor(store) : undefined,
));

sdm.addExtensionPacks(
aspectSupport({
aspects: aspects(),

scorers: {
all: scorers(undesirableUsageChecker),
commitRisk: [
commonCommitRiskScorers.fileChangeCount({ limitTo: 2 }),
commonCommitRiskScorers.pomChanged(),
],
},

taggers: taggers({}).concat(combinationTaggers({})),

goals: {
// This enables fingerprints to be computed on push
pushImpact,

// This enables demonstrating a build aspect
build,
},

undesirableUsageChecker,
virtualProjectFinder,

// In local mode, publish fingerprints to the local PostgreSQL
// instance, not the Atomist service
publishFingerprints:
isInLocalMode() ? storeFingerprints(store) : undefined,
instanceMetadata: metadata(),
}),
);

// Return the goals that this SDM will calculate in response to events
// Add your goals. See the Atomist samples organization at
// https://github.com/atomist/samples
return {
// Fingerprint every push to default branch
fingerprint: {
test: ToDefaultBranch,
goals: pushImpact,
// Create goals that compute fingerprints during delivery
const pushImpact = new PushImpact();

const build: Build = new Build()
.with({
...MavenDefaultOptions,
builder: mavenBuilder(),
});

const store = new PostgresProjectAnalysisResultStore(sdmConfigClientFactory(sdm.configuration));
sdm.addCommand(addSuggestedFingerprintCommand(
isInLocalMode() ? storeFingerprintsFor(store) : undefined,
));

sdm.addExtensionPacks(
aspectSupport({
aspects: aspects(),

scorers: {
all: scorers(undesirableUsageChecker),
commitRisk: [
commonCommitRiskScorers.fileChangeCount({ limitTo: 2 }),
commonCommitRiskScorers.pomChanged(),
],
},
// We know how to build Maven projects
build: {
test: anySatisfied(IsMaven),
goals: build,

taggers: taggers({}).concat(combinationTaggers({})),

goals: {
// This enables fingerprints to be computed on push
pushImpact,

// This enables demonstrating a build aspect
build,
},
};
},

undesirableUsageChecker,
virtualProjectFinder,

// In local mode, publish fingerprints to the local PostgreSQL
// instance, not the Atomist service
publishFingerprints:
isInLocalMode() ? storeFingerprints(store) : undefined,
instanceMetadata: metadata(),
}),
);

// Return the goals that this SDM will calculate in response to events
// Add your goals. See the Atomist samples organization at
// https://github.com/atomist/samples
return {
// Fingerprint every push to default branch
fingerprint: {
test: ToDefaultBranch,
goals: pushImpact,
},
// We know how to build Maven projects
build: {
test: anySatisfied(IsMaven),
goals: build,
},
};
},
{
name: "Org Visualizer",
preProcessors: [startEmbeddedPostgres],
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -23,7 +23,7 @@
"@atomist/automation-client": "^1.7.0",
"@atomist/microgrammar": "^1.2.1",
"@atomist/sdm": "^1.7.0",
"@atomist/sdm-core": "^1.7.0",
"@atomist/sdm-core": "^1.7.1-master.20190916023230",
"@atomist/sdm-pack-aspect": "^1.0.0-master.20190917171204",
"@atomist/sdm-pack-build": "^1.0.6",
"@atomist/sdm-pack-clojure": "2.0.1-master.20190903063949",
Expand Down

0 comments on commit c303491

Please sign in to comment.