@atomist/sample-sdm
Version:
Sample Atomist automation for software delivery
42 lines • 2.59 kB
JavaScript
;
/*
* Copyright © 2018 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const GitHubRepoRef_1 = require("@atomist/automation-client/operations/common/GitHubRepoRef");
const machineFactory_1 = require("@atomist/sdm/machine/machineFactory");
const tagRepo_1 = require("@atomist/sdm/util/github/tagRepo");
const nodeTagger_1 = require("@atomist/spring-automation/commands/tag/nodeTagger");
const springTagger_1 = require("@atomist/spring-automation/commands/tag/springTagger");
const nodeGenerator_1 = require("../pack/node/generators/nodeGenerator");
const springBootGenerator_1 = require("../pack/spring/generators/springBootGenerator");
const generatorConfig_1 = require("./generatorConfig");
/**
* Assemble a machine that performs only project creation and tagging,
* for Spring/Java and Node.
* See generatorConfig.ts to customize generation defaults.
* @return {SoftwareDeliveryMachine}
*/
function projectCreationMachine(configuration) {
const sdm = machineFactory_1.createSoftwareDeliveryMachine({ name: "Project creation machine", configuration });
sdm.addGenerators(springBootGenerator_1.springBootGenerator(Object.assign({}, generatorConfig_1.CommonJavaGeneratorConfig, { seed: new GitHubRepoRef_1.GitHubRepoRef("spring-team", "spring-rest-seed") }), { intent: "create spring",
}), nodeGenerator_1.nodeGenerator(Object.assign({}, generatorConfig_1.CommonGeneratorConfig, { seed: new GitHubRepoRef_1.GitHubRepoRef("spring-team", "typescript-express-seed") }), { intent: "create node",
}), nodeGenerator_1.nodeGenerator(Object.assign({}, generatorConfig_1.CommonGeneratorConfig, { seed: new GitHubRepoRef_1.GitHubRepoRef("spring-team", "minimal-node-seed") }), { intent: "create minimal node",
}))
.addNewRepoWithCodeActions(tagRepo_1.tagRepo(springTagger_1.springBootTagger), tagRepo_1.tagRepo(nodeTagger_1.nodeTagger));
return sdm;
}
exports.projectCreationMachine = projectCreationMachine;
//# sourceMappingURL=projectCreationMachine.js.map