Skip to content

Commit

Permalink
Add the devfile to work with c/c++ stack (#73)
Browse files Browse the repository at this point in the history
* Add devfile for c++ Hello World Sample

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Fix

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Fix

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Fix

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Fix

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Fix

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
  • Loading branch information
tolusha authored and nickboldt committed Sep 26, 2019
1 parent 96cc07a commit 3caaf7c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
57 changes: 57 additions & 0 deletions 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: quay.io/eclipse/che-cpp-rhel7:nightly
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 devfiles/cpp/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
displayName: C/C++
description: Stack with C/C++ and Clang 8
tags: ["C/C++", "clang", "g++", "gdb"]
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
globalMemoryLimit: 1686Mi

0 comments on commit 3caaf7c

Please sign in to comment.