Skip to content

The Unified and Autonomous Development Platform

docs: clarify shell requirements for runtime images

Robin Shen6f4d256ef065
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java b/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java
index bf2cbfc429..ad024e6040 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java
@@ -205,8 +205,8 @@ public class Job implements NamedElement, Validatable {
@Editable(order=195, description="""
Specify the sandbox template image used to run this job. The image must \
- have Git and Python 3 installed. If the job runs Docker-related steps or \
- services, Docker must be configured in the image, and a non-root \
+ have shell, Git, and Python 3 installed. If the job runs Docker-related \
+ steps or services, Docker must be configured in the image, and a non-root \
default user must have passwordless sudo access.""")
@Interpolative(variableSuggester="suggestVariables")
@DependsOn(property="executeInSandbox")
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/CommandStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/CommandStep.java
index d24c9d2da6..8c964f2bff 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/CommandStep.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/CommandStep.java
@@ -64,7 +64,8 @@ public class CommandStep extends Step {
this.runInContainer = runInContainer;
}
- @Editable(order=100, name="container:image", description="Specify container image to execute commands inside")
+ @Editable(order=100, name="container:image", description="""
+ Specify container image to execute commands inside. The image must have shell installed""")
@DependsOn(property="runInContainer")
@Interpolative(variableSuggester="suggestDynamicVariables")
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/workspace/spec/WorkspaceSpec.java b/server-core/src/main/java/io/onedev/server/model/support/workspace/spec/WorkspaceSpec.java
index 3e89f35474..27b82fb409 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/workspace/spec/WorkspaceSpec.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/workspace/spec/WorkspaceSpec.java
@@ -166,7 +166,7 @@ public class WorkspaceSpec implements Serializable, Validatable {
@Editable(order = 60, name = "container:image", description = """
Specify container image to create workspace inside. This image must have \
- Git and tmux installed""")
+ shell, Git, and tmux installed""")
@Interpolative(variableSuggester="suggestVariables")
@DependsOn(property = "provisionMode", value = "DOCKER")
@NotEmpty
@@ -180,7 +180,7 @@ public class WorkspaceSpec implements Serializable, Validatable {
@Editable(order = 70, description = """
Specify sandbox template image to create workspace from. This image must \
- have Git, Python 3, and tmux installed""")
+ have shell, Git, Python 3, and tmux installed""")
@Interpolative(variableSuggester="suggestVariables")
@DependsOn(property = "provisionMode", value = "SANDBOX")
@NotEmpty
diff --git a/server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java b/server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
index c45d8e6a45..0372acbe3f 100644
--- a/server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
+++ b/server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
@@ -696,7 +696,7 @@ public class ServerDockerExecutor extends JobExecutor implements DockerAware, Te
private String dockerImage;
- @Editable
+ @Editable(description = "Specify a Docker image to test against. The image must have shell installed")
@OmitName
@NotEmpty
public String getDockerImage() {
diff --git a/server-plugin/server-plugin-executor-serversandbox/src/main/java/io/onedev/server/plugin/executor/serversandbox/ServerSandboxExecutor.java b/server-plugin/server-plugin-executor-serversandbox/src/main/java/io/onedev/server/plugin/executor/serversandbox/ServerSandboxExecutor.java
index e159f65498..a97411ce59 100644
--- a/server-plugin/server-plugin-executor-serversandbox/src/main/java/io/onedev/server/plugin/executor/serversandbox/ServerSandboxExecutor.java
+++ b/server-plugin/server-plugin-executor-serversandbox/src/main/java/io/onedev/server/plugin/executor/serversandbox/ServerSandboxExecutor.java
@@ -298,7 +298,7 @@ public class ServerSandboxExecutor extends JobExecutor implements SandboxAware,
@Editable(order=100, description="""
Specify a Docker sandbox shell template image to test against. This image must \
- have Git and Python3 installed. To also test container, Docker must be \
+ have shell, Git, and Python3 installed. To also test container, Docker must be \
configured in the image, and a non-root default user must have passwordless \
sudo access""")
@NotEmpty
@@ -319,7 +319,8 @@ public class ServerSandboxExecutor extends JobExecutor implements SandboxAware,
this.testContainer = testContainer;
}
- @Editable(order=300, name="container:image", description="Specify the container image to test against")
+ @Editable(order=300, name="container:image", description="""
+ Specify the container image to test against. The image must have shell installed""")
@DependsOn(property="testContainer")
@NotEmpty
public String getImage() {
diff --git a/server-plugin/server-plugin-provisioner-serverdocker/src/main/java/io/onedev/server/plugin/provisioner/serverdocker/ServerDockerProvisioner.java b/server-plugin/server-plugin-provisioner-serverdocker/src/main/java/io/onedev/server/plugin/provisioner/serverdocker/ServerDockerProvisioner.java
index 227a0d4346..b7c6d8b78f 100644
--- a/server-plugin/server-plugin-provisioner-serverdocker/src/main/java/io/onedev/server/plugin/provisioner/serverdocker/ServerDockerProvisioner.java
+++ b/server-plugin/server-plugin-provisioner-serverdocker/src/main/java/io/onedev/server/plugin/provisioner/serverdocker/ServerDockerProvisioner.java
@@ -290,7 +290,7 @@ public class ServerDockerProvisioner extends WorkspaceProvisioner implements Doc
private String dockerImage;
- @Editable(description="Specify a Docker image to test against. The image must have Git and tmux installed")
+ @Editable(description="Specify a Docker image to test against. The image must have shell, Git, and tmux installed")
@OmitName
@NotEmpty
public String getDockerImage() {
diff --git a/server-plugin/server-plugin-provisioner-serversandbox/src/main/java/io/onedev/server/plugin/provisioner/serversandbox/ServerSandboxProvisioner.java b/server-plugin/server-plugin-provisioner-serversandbox/src/main/java/io/onedev/server/plugin/provisioner/serversandbox/ServerSandboxProvisioner.java
index 0c6499c822..95145a73d6 100644
--- a/server-plugin/server-plugin-provisioner-serversandbox/src/main/java/io/onedev/server/plugin/provisioner/serversandbox/ServerSandboxProvisioner.java
+++ b/server-plugin/server-plugin-provisioner-serversandbox/src/main/java/io/onedev/server/plugin/provisioner/serversandbox/ServerSandboxProvisioner.java
@@ -177,7 +177,7 @@ public class ServerSandboxProvisioner extends WorkspaceProvisioner implements Te
@Editable(description="""
Specify a Docker sandbox template image to test against. The image must have \
- Git, Python 3, and tmux installed""")
+ shell, Git, Python 3, and tmux installed""")
@OmitName
@NotEmpty
public String getTemplate() {