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 go, cpp, python devfiles #174

Merged
merged 3 commits into from
Oct 10, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
57 changes: 57 additions & 0 deletions dependencies/che-devfile-registry/devfiles/cpp/devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
apiVersion: 1.0.0
metadata:
generateName: cpp-
projects:
-
name: cpp-hello-world
source:
type: git
location: 'https://github.com/che-samples/cpp-hello-world'
components:
-
type: chePlugin
id: che-incubator/cpptools/latest
alias: cpp-plugin
preferences:
clangd.path: /usr/bin/clangd
cdt.clangd.binaries.enable: false
-
type: dockerimage
alias: cpp-dev
image: registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8
nickboldt marked this conversation as resolved.
Show resolved Hide resolved
command: ['sleep']
args: ['infinity']
memoryLimit: 512Mi
mountSources: true
commands:
-
name: build
actions:
- type: exec
component: cpp-dev
command: g++ -g hello.cpp -o hello.out && echo "Build complete"
workdir: ${CHE_PROJECTS_ROOT}/cpp-hello-world
-
name: run
actions:
- type: exec
component: cpp-dev
command: ./hello.out
workdir: ${CHE_PROJECTS_ROOT}/cpp-hello-world
-
name: debug
actions:
- type: vscode-launch
referenceContent: >
{
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"name": "Debug c++ application",
"request": "launch",
"program": "/projects/cpp-hello-world/hello.out"
}
]
}
6 changes: 6 additions & 0 deletions dependencies/che-devfile-registry/devfiles/cpp/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
displayName: C/C++
description: C and C++ Developer Tools stack
tags: ["c", "c++", "clang", "g++", "make", "cmake"]
icon: https://raw.githubusercontent.com/redhat-developer/codeready-workspaces/master/ide/codeready-ide-stacks/src/main/resources/stacks-images/type-cpp.svg
nickboldt marked this conversation as resolved.
Show resolved Hide resolved
globalMemoryLimit: 1686Mi
79 changes: 79 additions & 0 deletions dependencies/che-devfile-registry/devfiles/go/devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
apiVersion: 1.0.0
metadata:
generateName: golang-
projects:
-
name: example
source:
type: git
location: https://github.com/golang/example.git
clonePath: src/github.com/golang/example/
components:
-
type: chePlugin
id: ms-vscode/go/latest
alias: go-plugin
memoryLimit: 512Mi
-
type: dockerimage
image: registry.redhat.io/codeready-workspaces/stacks-golang-rhel8
alias: go-cli
env:
- name: GOPATH
# replicate the GOPATH from the plugin
value: /go:$(CHE_PROJECTS_ROOT)
- name: GOCACHE
# replicate the GOCACHE from the plugin, even though the cache is not shared
# between the two
value: /tmp/.cache
endpoints:
- name: '8080/tcp'
port: 8080
memoryLimit: 512Mi
mountSources: true
commands:
-
name: run outyet
actions:
- type: exec
component: go-cli
command: go get -d && go run main.go
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/golang/example/outyet
nickboldt marked this conversation as resolved.
Show resolved Hide resolved
-
name: stop outyet
actions:
- type: exec
component: go-cli
command: kill $(pidof go)
-
name: test outyet
actions:
- type: exec
component: go-cli
command: go test
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/golang/example/outyet
-
name: run current file
actions:
- type: exec
component: go-cli
command: go get -d && go run ${file}
workdir: ${fileDirname}
-
name: Debug current file
actions:
- type: vscode-launch
referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug current file",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
},
]
}
6 changes: 6 additions & 0 deletions dependencies/che-devfile-registry/devfiles/go/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
displayName: Go
description: Stack with Go 1.11.5
tags: ["Go"]
icon: https://raw.githubusercontent.com/redhat-developer/codeready-workspaces/master/ide/codeready-ide-stacks/src/main/resources/stacks-images/type-go.svg
globalMemoryLimit: 1686Mi
nickboldt marked this conversation as resolved.
Show resolved Hide resolved
30 changes: 30 additions & 0 deletions dependencies/che-devfile-registry/devfiles/python/devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
apiVersion: 1.0.0
metadata:
generateName: python-
projects:
-
name: python-hello-world
source:
type: git
location: "https://github.com/che-samples/python-hello-world.git"
components:
-
type: chePlugin
id: ms-python/python/latest
memoryLimit: 512Mi
-
type: dockerimage
alias: python
image: registry.redhat.io/codeready-workspaces/stacks-python-rhel8
memoryLimit: 512Mi
mountSources: true
commands:
-
name: run
actions:
-
type: exec
component: python
command: "python hello-world.py"
workdir: ${CHE_PROJECTS_ROOT}/python-hello-world
6 changes: 6 additions & 0 deletions dependencies/che-devfile-registry/devfiles/python/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
displayName: Python
description: Python Stack with Python 3.6
tags: ["Python", "pip"]
icon: https://raw.githubusercontent.com/redhat-developer/codeready-workspaces/master/ide/codeready-ide-stacks/src/main/resources/stacks-images/type-python.svg
globalMemoryLimit: 1686Mi