All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atlassian.bamboo.specs.builders.task.NodeTask Maven / Gradle / Ivy

There is a newer version: 10.1.0
Show newest version
package com.atlassian.bamboo.specs.builders.task;

import com.atlassian.bamboo.specs.api.validators.common.ImporterUtils;
import com.atlassian.bamboo.specs.model.task.NodeTaskProperties;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * Represents a generic task that executes a Node.js script.
 * 

* Bamboo provides additional tasks for more specific Node.js tools, which are suggested to use instead of this task for * convenience. For example: {@link NpmTask}, {@link GulpTask}. * * @see nodejs.org */ public class NodeTask extends BaseNodeTask { @NotNull private String script; @Nullable private String arguments; /** * Script to execute with node (e.g. 'server.js', 'application.js'). */ public NodeTask script(@NotNull String script) { ImporterUtils.checkNotNull("script", script); this.script = script; return this; } /** * Additional command line arguments to pass to node when executing the script. */ public NodeTask arguments(@Nullable String arguments) { this.arguments = arguments; return this; } @NotNull @Override protected NodeTaskProperties build() { return new NodeTaskProperties( description, taskEnabled, nodeExecutable, environmentVariables, workingSubdirectory, script, arguments, requirements, conditions); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy