Files
odo/tests/examples/source/devfiles/nodejs/devfile-with-sparseCheckoutDir.yaml
Girish Ramnani f40bf97099 List created components for devfile v2 (#3505)
* initial work on adding AppName

* completed the implementation and tests

* resolved failing tests

* reverting an un-necessary change

* dryed the tests

* added test for having both devfile and s2i together

* uncommented some stuff

* skip s2i test on kuberenetes

* resolved charlie's comments

* addressed mrinal's comments

* resolved the panic

* use client and dc support for specific cases

* resolved final tests and odo list now worked for unpushed components

* resolved failing unit tests

* update the component adapter in other places

* resolved all comments

* removed the created context at the end of the test

* addressed tomas's comment

* resolved all comments

* updated all devfiles with proper name

* resolved rebase

* addressed a missed error and more validation in the tests

* use random cmpName for tests
2020-07-22 15:38:38 +02:00

48 lines
1.1 KiB
YAML

apiVersion: 1.0.0
metadata:
name: nodejs
projects:
-
name: nodejs-starter
source:
type: git
location: "https://github.com/che-samples/web-nodejs-sample.git"
sparseCheckoutDir: /app/
components:
- type: dockerimage
image: registry.access.redhat.com/ubi8/nodejs-12:1-36
endpoints:
- name: "3000/tcp"
port: 3000
alias: runtime
env:
- name: FOO
value: "bar"
memoryLimit: 1024Mi
mountSources: true
commands:
- name: build
actions:
- type: exec
component: runtime
command: npm install
workdir: ${CHE_PROJECTS_ROOT}/nodejs-starter
- name: devbuild
actions:
- type: exec
component: runtime
command: npm install
workdir: ${CHE_PROJECTS_ROOT}/nodejs-starter
- name: run
actions:
- type: exec
component: runtime
command: npm start
workdir: ${CHE_PROJECTS_ROOT}/nodejs-starter
- name: devrun
actions:
- type: exec
component: runtime
command: npm start
workdir: ${CHE_PROJECTS_ROOT}/nodejs-starter