Skip to content
Permalink
Browse files

Add uhura to seed list

[changelog:added]
  • Loading branch information...
cdupuis committed Mar 12, 2019
1 parent 569a08f commit a1609116f83031f3cdf6f65324016d1796755e3e
@@ -3,6 +3,9 @@

Choose `blank` for a new SDM to which you can add your own functionality.

Choose `uhura` for a new SDM that provides self service software delivery
for common project types.

Choose `spring` for a new SDM providing convenient creation and local CD
of Spring Boot applications.

@@ -11,4 +14,4 @@ applications and deploy those straight to a local or remote Kubernetes
cluster.

> If you're new to Atomist and have a JDK on your machine,
choose "spring" to see Atomist's capabilities quickly.
choose "spring" to see Atomist's capabilities quickly.
@@ -75,7 +75,7 @@ function addExtensionPackGenerator(yargs: YargBuilder) {
}

function addSdmGenerator(yargs: YargBuilder) {
const choices = ["blank", "spring", "spring to k8"];
const choices = ["blank", "uhura", "spring", "spring to k8"];
const typeDescription = "Type of SDM to create";
const name = "newSdm";
addEmbeddedCommand(yargs, {
@@ -112,18 +112,26 @@ function addSdmGenerator(yargs: YargBuilder) {
return sdm => {
sdm.addGeneratorCommand(nodeGenerator(name,
new GitHubRepoRef("atomist-seeds", "spring-sdm"),
[UpdatePackageJsonIdentification],
"spring"));
};
case "spring to k8":
return sdm => {
sdm.addGeneratorCommand(nodeGenerator(name,
GitHubRepoRef.from({ owner: "atomist-seeds", repo: "spring-sdm", branch: "kube" }),
[UpdatePackageJsonIdentification],
"spring"));
};
case "blank":
return sdm => sdm.addGeneratorCommand(nodeGenerator(name,
new GitHubRepoRef("atomist-seeds", "empty-sdm"),
[UpdatePackageJsonIdentification],
"blank"));
case "uhura":
return sdm => sdm.addGeneratorCommand(nodeGenerator(name,
new GitHubRepoRef("atomist", "uhura"),
[],
"uhura"));
default:
throw new Error("Unknown SDM type " + answers.type);
}
@@ -19,7 +19,10 @@ import {
RemoteRepoRef,
validationPatterns,
} from "@atomist/automation-client";
import { GeneratorRegistration } from "@atomist/sdm";
import {
CodeTransform,
GeneratorRegistration,
} from "@atomist/sdm";
import {
NodeProjectCreationParameters,
NodeProjectCreationParametersDefinition,
@@ -32,13 +35,14 @@ import { UpdatePackageJsonIdentification } from "./updatePackageJsonIdentificati
*/
export function nodeGenerator(name: string,
startingPoint: RemoteRepoRef,
transforms: CodeTransform<any>[] = [UpdatePackageJsonIdentification],
...tags: string[]): GeneratorRegistration<NodeProjectCreationParameters> {
return {
name,
startingPoint,
parameters: NodeProjectCreationParametersDefinition,
transform: [
UpdatePackageJsonIdentification,
...transforms,
],
tags,
};
Oops, something went wrong.

0 comments on commit a160911

Please sign in to comment.
You can’t perform that action at this time.