Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
},
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);
}
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;
}
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 => {
constructor(goalDetailsOrUniqueName: FulfillableGoalDetails | string = DefaultGoalNameGenerator.generateName("version"),
...dependsOn: Goal[]) {
super({
workingDescription: "Calculating project version",
completedDescription: "Versioned",
...getGoalDefinitionFrom(goalDetailsOrUniqueName, DefaultGoalNameGenerator.generateName("version")),
displayName: "version",
}, ...dependsOn);
}
constructor(protected readonly goalDetailsOrUniqueName: FulfillableGoalDetails | string = DefaultGoalNameGenerator.generateName("gradle-branch-deployment")) {
super({
...GradlePerBranchSpringBootDeploymentGoal.definition,
...getGoalDefinitionFrom(goalDetailsOrUniqueName, DefaultGoalNameGenerator.generateName("gradle-branch-deployment")),
displayName: "deploy",
});
}