getConstraints() {
+ return Collections.unmodifiableList(constraints);
+ }
+
public int getIdleTerminationInMinutes() {
return idleTerminationInMinutes;
}
diff --git a/src/main/resources/org/jenkinsci/plugins/nomad/NomadConstraintTemplate/config.jelly b/src/main/resources/org/jenkinsci/plugins/nomad/NomadConstraintTemplate/config.jelly
new file mode 100644
index 00000000..09cf60fe
--- /dev/null
+++ b/src/main/resources/org/jenkinsci/plugins/nomad/NomadConstraintTemplate/config.jelly
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/org/jenkinsci/plugins/nomad/NomadSlaveTemplate/config.jelly b/src/main/resources/org/jenkinsci/plugins/nomad/NomadSlaveTemplate/config.jelly
index 1e702978..038b04bf 100644
--- a/src/main/resources/org/jenkinsci/plugins/nomad/NomadSlaveTemplate/config.jelly
+++ b/src/main/resources/org/jenkinsci/plugins/nomad/NomadSlaveTemplate/config.jelly
@@ -16,6 +16,12 @@
+
+
+
+
+
+
diff --git a/src/main/webapp/help-constraints.html b/src/main/webapp/help-constraints.html
new file mode 100644
index 00000000..0da393f1
--- /dev/null
+++ b/src/main/webapp/help-constraints.html
@@ -0,0 +1,3 @@
+
+ Read the JSON synax and Constraints API pages on nomadproject.io to see how to apply constraints (these apply on the Job level)
+
\ No newline at end of file
diff --git a/src/test/java/org/jenkinsci/plugins/nomad/NomadApiTest.java b/src/test/java/org/jenkinsci/plugins/nomad/NomadApiTest.java
index 1da06a2a..b172f590 100644
--- a/src/test/java/org/jenkinsci/plugins/nomad/NomadApiTest.java
+++ b/src/test/java/org/jenkinsci/plugins/nomad/NomadApiTest.java
@@ -6,6 +6,8 @@
import java.util.Collections;
import static org.junit.Assert.assertTrue;
+import java.util.List;
+import java.util.ArrayList;
/**
* @author Yegor Andreenko
@@ -13,9 +15,10 @@
public class NomadApiTest {
private NomadApi nomadApi = new NomadApi("http://localhost");
+ private List constraintTest = new ArrayList();
private NomadSlaveTemplate slaveTemplate = new NomadSlaveTemplate(
"300", "256", "100",
- null, "remoteFs", "3","1", Node.Mode.NORMAL,
+ null, constraintTest, "remoteFs", "3","1", Node.Mode.NORMAL,
"ams", "0", "image", "dc01", "", "", false, "bridge",""
);