Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CHE-7 stack for C# with samples #13294

Merged
merged 3 commits into from
May 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions ide/che-core-ide-stacks/src/main/resources/stacks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2781,5 +2781,81 @@
"name": "type-che7.svg",
"mediaType": "image/svg+xml"
}
},
{
"id": "dotnet",
"name": ".NET Core with Theia IDE",
"creator": "Valerii Svydenko",
"tags": [
"Theia",
"Debian",
"Dotnet",
"C#"
],
"scope": "general",
"description": "Default stack with .Net 2.2.105 and Theia IDE",
"components": [
{
"version": "9",
"name": "Debian"
},
{
"version": "2.2.105",
"name": ".Net Core SDK"
}
],
"workspaceConfig": {
"environments": {
"default": {
"recipe": {
"content": "mcr.microsoft.com/dotnet/core/sdk:2.2-stretch",
"type": "dockerimage"
},
"machines": {
"dotnet": {
"servers": {
"5000/tcp": {
"attributes": {},
"protocol": "http",
"port": "5000"
}
},
"env": {
"PS1": "$(echo ${0})\\$ ",
"HOME": "/home/user"
},
"volumes": {
"projects": {
"path": "/projects"
},
"dotnet": {
"path": "/home/user"
}
},
"installers": [],
"attributes": {
"memoryLimitBytes": "512000000",
"containerCommand": "['sleep']",
"containerArgs": "['infinity']"
}
}
}
}
},
"name": "default",
"defaultEnv": "default",
"description": null,
"attributes": {
"sidecar.redhat-developer/che-omnisharp-plugin.memory_limit": "1024Mi",
"sidecar.redhat-developer/netcoredbg-theia-plugin.memory_limit": "512Mi",
"editor": "eclipse/che-theia/next",
"plugins": "eclipse/che-machine-exec-plugin/0.0.1,redhat-developer/che-omnisharp-plugin/0.0.1,redhat-developer/netcoredbg-theia-plugin/0.0.1"
},
"links": []
},
"stackIcon": {
"name": "type-che7.svg",
"mediaType": "image/svg+xml"
}
}
]
58 changes: 56 additions & 2 deletions ide/che-core-ide-templates/src/main/resources/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@
{
"name": "update dependencies",
"type": "custom",
"commandLine": "cd ${current.project.path} \ndotnet restore",
"commandLine": "cd ${CHE_PROJECTS_ROOT}/dotnet-web-simple \ndotnet restore",
"attributes": {
"previewUrl": "",
"goal": "Build"
Expand All @@ -854,7 +854,7 @@
{
"name": "run",
"type": "custom",
"commandLine": "cd ${current.project.path} \ndotnet run",
"commandLine": "cd ${CHE_PROJECTS_ROOT}/dotnet-web-simple \ndotnet run",
"attributes": {
"previewUrl": "${server.dotnet}",
"goal": "Run"
Expand All @@ -867,6 +867,60 @@
"Dotnet"
]
},
{
"name": "aspnetcore-realworld-example-app",
"displayName": "aspnetcore-realworld-example-app",
"path": "/aspnetcore-realworld-example-app",
"description": "ASP.NET Core backend implementation for RealWorld https://realworld.io",
"projectType": "csharp",
"mixins": [],
"attributes": {
"language": [
"dotnet"
]
},
"modules": [],
"problems": [],
"source": {
"type": "git",
"location": "https://github.com/gothinkster/aspnetcore-realworld-example-app.git",
"parameters": {}
},
"commands": [
{
"name": "install cake",
"type": "custom",
"commandLine": "cd ${CHE_PROJECTS_ROOT}/aspnetcore-realworld-example-app && dotnet tool install -g Cake.Tool",
"attributes": {
"previewUrl": "",
"goal": "Build"
}
},
{
"name": "run cake",
"type": "custom",
"commandLine": "export PATH=\"$PATH:/home/user/.dotnet/tools\" && cd ${CHE_PROJECTS_ROOT}/aspnetcore-realworld-example-app && dotnet cake build.cake --runtime=linux-x64",
"attributes": {
"previewUrl": "",
"goal": "Build"
}
},
{
"name": "run",
"type": "custom",
"commandLine": "cd ${CHE_PROJECTS_ROOT}/aspnetcore-realworld-example-app/publish && dotnet Conduit.dll",
"attributes": {
"previewUrl": "${server.5000/tcp}/swagger",
"goal": "Run"
}
}
],
"links": [],
"category": "Samples",
"tags": [
"Dotnet"
]
},
{
"name": "typescript-greeter",
"displayName": "typescript-greeter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public enum Stack {
BLANK("blank-default"),
JAVA("java-default"),
JAVA_MYSQL("java-mysql"),
DOT_NET("dotnet-default"),
DOT_NET_DEFAULT("dotnet-default"),
DOT_NET("dotnet"),
ANDROID("android-default"),
CPP("cpp-default"),
CAMEL_SPRINGBOOT("apache-camel-springboot"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.CHE_7_THEIA_DEV;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.CPP;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.DOT_NET;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.DOT_NET_DEFAULT;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.ECLIPSE_CHE;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.ECLIPSE_VERTX;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.GO;
Expand Down Expand Up @@ -85,6 +86,7 @@ public class NewWorkspacePageTest {
asList(
BLANK,
JAVA,
DOT_NET_DEFAULT,
DOT_NET,
ANDROID,
CPP,
Expand All @@ -107,6 +109,7 @@ public class NewWorkspacePageTest {
asList(
BLANK,
JAVA,
DOT_NET_DEFAULT,
DOT_NET,
ANDROID,
CPP,
Expand All @@ -130,6 +133,7 @@ public class NewWorkspacePageTest {
BLANK,
JAVA,
JAVA_MYSQL,
DOT_NET_DEFAULT,
DOT_NET,
ANDROID,
CPP,
Expand All @@ -149,6 +153,7 @@ public class NewWorkspacePageTest {
asList(
BLANK,
JAVA,
DOT_NET_DEFAULT,
DOT_NET,
ANDROID,
CAMEL_SPRINGBOOT,
Expand Down Expand Up @@ -180,6 +185,7 @@ public class NewWorkspacePageTest {
asList(
BLANK,
JAVA,
DOT_NET_DEFAULT,
DOT_NET,
ANDROID,
CAMEL_SPRINGBOOT,
Expand Down Expand Up @@ -211,6 +217,7 @@ public class NewWorkspacePageTest {
asList(
BLANK,
JAVA,
DOT_NET_DEFAULT,
DOT_NET,
ANDROID,
CAMEL_SPRINGBOOT,
Expand Down Expand Up @@ -265,7 +272,8 @@ public class NewWorkspacePageTest {
CHE_7_PREVIEW,
CPP,
ANDROID,
DOT_NET);
DOT_NET,
DOT_NET_DEFAULT);

private static final List<NewWorkspace.Stack> EXPECTED_K8S_QUICK_START_STACKS_REVERSE_ORDER =
asList(
Expand All @@ -287,7 +295,8 @@ public class NewWorkspacePageTest {
CHE_7_PREVIEW,
CPP,
ANDROID,
DOT_NET);
DOT_NET,
DOT_NET_DEFAULT);

private static final List<NewWorkspace.Stack> EXPECTED_DOCKER_QUICK_START_STACKS_REVERSE_ORDER =
asList(
Expand All @@ -307,7 +316,8 @@ public class NewWorkspacePageTest {
ECLIPSE_CHE,
CPP,
ANDROID,
DOT_NET);
DOT_NET,
DOT_NET_DEFAULT);

private static final List<NewWorkspace.Stack> EXPECTED_OPENSHIFT_JAVA_STACKS =
asList(JAVA, ANDROID, ECLIPSE_CHE, JAVA_MYSQL_THEIA_ON_KUBERNETES);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import static org.eclipse.che.selenium.core.constant.TestIntelligentCommandsConstants.CommandItem.UPDATE_DEPENDENCIES_COMMAND_ITEM;
import static org.eclipse.che.selenium.core.constant.TestProjectExplorerContextMenuConstants.ContextMenuCommandGoals.BUILD_GOAL;
import static org.eclipse.che.selenium.core.constant.TestProjectExplorerContextMenuConstants.ContextMenuCommandGoals.RUN_GOAL;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.DOT_NET;
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.DOT_NET_DEFAULT;

import com.google.inject.Inject;
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClient;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void checkWorkspaceCreationFromNETStack() {
// possible to read logs in case of test failure
testWorkspace =
createWorkspaceHelper.createWorkspaceFromStackWithProject(
DOT_NET, WORKSPACE_NAME, PROJECT_NAME);
DOT_NET_DEFAULT, WORKSPACE_NAME, PROJECT_NAME);

ide.switchToIdeAndWaitWorkspaceIsReadyToUse();

Expand Down