From 4034cc0b32cdc5558e1a73df70b4ca0448f50c06 Mon Sep 17 00:00:00 2001 From: Vitaliy Gulyy Date: Tue, 8 Feb 2022 16:18:47 +0200 Subject: [PATCH] chore: use PROJECT_SOURCE instead of PROJECTS_ROOT Signed-off-by: Vitaliy Gulyy --- devfile.yaml | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/devfile.yaml b/devfile.yaml index 422af07..81edec8 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -2,9 +2,9 @@ schemaVersion: 2.1.0 metadata: name: react-web-app components: - - name: nodejs + - name: tools container: - image: quay.io/devfile/universal-developer-image:ubi8-3735d4f + image: quay.io/devfile/universal-developer-image:ubi8-0e189d9 endpoints: - exposure: public name: nodejs @@ -12,47 +12,42 @@ components: targetPort: 3000 memoryLimit: 1G mountSources: true + commands: - - id: yarn - exec: - label: "Install Yarn 2" - component: nodejs - workingDir: ${PROJECTS_ROOT}/react-web-app - commandLine: "yarn set version 1.22.5" - group: - kind: build - isDefault: true - - id: dependencies + - id: install-dependencies exec: label: "Install all required dependencies" - component: nodejs - workingDir: ${PROJECTS_ROOT}/react-web-app + component: tools + workingDir: ${PROJECT_SOURCE} commandLine: "yarn install" group: kind: build isDefault: true + - id: build exec: label: "Build the app" - component: nodejs - workingDir: ${PROJECTS_ROOT}/react-web-app + component: tools + workingDir: ${PROJECT_SOURCE} commandLine: "yarn build" group: kind: build isDefault: true - - id: runapp + + - id: run exec: label: "Run the web app" - component: nodejs - workingDir: ${PROJECTS_ROOT}/react-web-app + component: tools + workingDir: ${PROJECT_SOURCE} commandLine: "yarn start" group: kind: run + - id: test exec: label: "Launch tests" - component: nodejs - workingDir: ${PROJECTS_ROOT}/react-web-app + component: tools + workingDir: ${PROJECT_SOURCE} commandLine: "yarn test" group: kind: test