How to use the @atomist/sdm.getGoalDefinitionFrom function in @atomist/sdm

To help you get started, we’ve selected a few @atomist/sdm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atomist / sdm-pack-spring / lib / java / deploy / MavenPerBranchDeployment.ts View on Github external
constructor(goalDetailsOrUniqueName: FulfillableGoalDetails | string
                    = DefaultGoalNameGenerator.generateName("maven-per-branch-deploy")) {

        super({
            ...ManvePerBranchSpringBootDeploymentDefinition,
            ...getGoalDefinitionFrom(goalDetailsOrUniqueName, DefaultGoalNameGenerator.generateName("maven-per-branch-deploy")),
            displayName: "maven per branch deployment",
        });

        const fulfillment: Implementation = {
            name: `MavenPerBranchDeployment`,
            goalExecutor: async (invocation: GoalInvocation) => {
                if (this.registrations.length === 0) {
                    logger.info("No deployment registrations found, using defaults");
                    return executeMavenPerBranchSpringBootDeploy({})(invocation);
                } else {
                    if (this.registrations.length > 1) {
                        logger.warn("Multiple deployment registrations are not yet support, only the first will be taken into account");
                    }
                    return executeMavenPerBranchSpringBootDeploy(_.head(this.registrations))(invocation);
                }
            },
github atomist / sdm-core / lib / goal / common / Tag.ts View on Github external
constructor(goalDetailsOrUniqueName: FulfillableGoalDetails | string = DefaultGoalNameGenerator.generateName("tag"), ...dependsOn: Goal[]) {
        super({
            workingDescription: "Tagging",
            completedDescription: "Tagged",
            failedDescription: "Failed to create Tag",
            ...getGoalDefinitionFrom(goalDetailsOrUniqueName, DefaultGoalNameGenerator.generateName("tag")),
            displayName: "tag",
        }, ...dependsOn);
    }
github atomist / sdm-core / lib / goal / container / container.ts View on Github external
constructor(details: ContainerGoalDetails = {}, ...dependsOn: Goal[]) {
        const prefix = "container" + (details.displayName ? `-${details.displayName}` : "");
        const detailsToUse = { ...details, isolate: true };
        super(getGoalDefinitionFrom(detailsToUse, DefaultGoalNameGenerator.generateName(prefix)), ...dependsOn);
        this.details = detailsToUse;
    }
github atomist / sdm-core / lib / goal / container / buildingContainer.ts View on Github external
constructor(details: ContainerGoalDetails = {},
                registration: ContainerRegistration,
                ...dependsOn: Goal[]) {
        const prefix = "building-container" + (details.displayName ? `-${details.displayName}` : "");
        const detailsToUse = { ...details, isolate: true };
        super(getGoalDefinitionFrom(detailsToUse, DefaultGoalNameGenerator.generateName(prefix)), ...dependsOn);
        this.details = detailsToUse;
        this.registration = registration;

        let scheduler: "k8s" | "docker";

        if (!this.details.scheduler) {
            if (runningInK8s()) {
                scheduler = "k8s";
            } else {
                scheduler = "docker";
            }
        }

        this.addFulfillment({
            progressReporter: ContainerProgressReporter,
            goalExecutor: async gi => {
github atomist / sdm-core / lib / goal / common / Version.ts View on Github external
constructor(goalDetailsOrUniqueName: FulfillableGoalDetails | string = DefaultGoalNameGenerator.generateName("version"),
                ...dependsOn: Goal[]) {

        super({
            workingDescription: "Calculating project version",
            completedDescription: "Versioned",
            ...getGoalDefinitionFrom(goalDetailsOrUniqueName, DefaultGoalNameGenerator.generateName("version")),
            displayName: "version",
        }, ...dependsOn);
    }
github atomist / sdm-pack-spring / lib / gradle / deploy / GradlePerBranchSpringBootDeploymentGoal.ts View on Github external
constructor(protected readonly goalDetailsOrUniqueName: FulfillableGoalDetails | string = DefaultGoalNameGenerator.generateName("gradle-branch-deployment")) {
        super({
            ...GradlePerBranchSpringBootDeploymentGoal.definition,
            ...getGoalDefinitionFrom(goalDetailsOrUniqueName, DefaultGoalNameGenerator.generateName("gradle-branch-deployment")),
            displayName: "deploy",
        });
    }