Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public with(registration: GradlePerBranchDeploymentRegistration): this {
const deploymentOptions: GradleDeployerOptions = {
lowerPort: registration.lowerPort,
successPatterns: registration.successPatterns,
commandLineArgumentsFor: !!registration.commandLineArgumentsFor ? registration.commandLineArgumentsFor : springBootGradleArgs,
baseUrl: !!registration.baseUrl ? registration.baseUrl : "http://127.0.0.1",
maxConcurrentDeployments: !!registration.maxConcurrentDeployments ? registration.maxConcurrentDeployments : 5,
};
this.addFulfillment({
name: DefaultGoalNameGenerator.generateName("deployer"),
goalExecutor: executeGradlePerBranchSpringBootDeploy(deploymentOptions),
...registration as ImplementationRegistration,
});
return this;
}
}
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);
}
public with(registration: TagRegistration = {}): this {
const name = registration.name || DefaultGoalNameGenerator.generateName((registration.goalExecutor) ? "custom-tag" : "prerelease-tag");
const goalExecutor = registration.goalExecutor || executeTag();
super.addFulfillment({ name, goalExecutor });
return this;
}
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");
public withVersioner(versioner: ProjectVersioner): this {
this.with({
name: DefaultGoalNameGenerator.generateName("versioner"),
pushTest: AnyPush,
versioner,
});
return this;
}
}