From 167b71868ed15d1fe788356c3d40e42d0e3d5797 Mon Sep 17 00:00:00 2001 From: Maximiliano Pizarro Date: Thu, 12 Sep 2024 16:44:01 +0000 Subject: [PATCH] add hash, rm dockerfile and divide command in steps --- stacks/jhipster-online/2.33.0/devfile.yaml | 51 ++++++++++++++----- .../jhipster-online/2.33.0/docker/Dockerfile | 3 -- 2 files changed, 38 insertions(+), 16 deletions(-) delete mode 100644 stacks/jhipster-online/2.33.0/docker/Dockerfile diff --git a/stacks/jhipster-online/2.33.0/devfile.yaml b/stacks/jhipster-online/2.33.0/devfile.yaml index d30ba577..8ebf7747 100644 --- a/stacks/jhipster-online/2.33.0/devfile.yaml +++ b/stacks/jhipster-online/2.33.0/devfile.yaml @@ -12,7 +12,7 @@ metadata: - Angular - Spring language: Java - projectType: 'springboot' + projectType: springboot projects: - name: jhipster-online git: @@ -23,7 +23,7 @@ projects: components: - name: tools container: - image: 'quay.io/maximilianopizarro/jhipster-devspace' + image: 'quay.io/maximilianopizarro/jhipster-devspace@sha256:c27aefcf6ce158479bafae63758c1f0993c430a6ee15f76cf369fc889e54eae5' mountSources: true cpuLimit: '4' cpuRequest: '1' @@ -41,18 +41,18 @@ components: name: backend protocol: https targetPort: 8080 - - exposure: none + - exposure: public name: debug targetPort: 4200 - - exposure: none + - exposure: public name: frontend protocol: https targetPort: 9000 - - exposure: none + - exposure: public name: debug-frontend protocol: https targetPort: 9001 - - exposure: none + - exposure: public name: browser-sync protocol: https targetPort: 3001 @@ -73,21 +73,46 @@ components: volume: size: 512Mi commands: - - id: build-jh-studio + - id: kubectl-add-mysql + exec: + label: 'Kubernetes apply MariaDB Instance (Kubernetes cluster)' + component: tools + workingDir: ${PROJECT_SOURCE} + commandLine: 'kubectl apply -f src/main/kubernetes/mysql.yaml' + - id: oc-add-mysql + exec: + label: 'OpenShift apply MariaDB Instance (OpenShift cluster)' + component: tools + workingDir: ${PROJECT_SOURCE} + commandLine: 'oc apply -f src/main/kubernetes/mysql.yaml' + - id: yarn-install + exec: + label: 'Package the application' + component: tools + workingDir: ${PROJECT_SOURCE} + commandLine: 'yarn install' + group: + kind: build + isDefault: true + - id: start-frontend exec: - label: 'Package the application with yarn and create MariaDB Instance' + label: 'Start Frontend' component: tools workingDir: ${PROJECT_SOURCE} - commandLine: 'oc apply -f src/main/kubernetes/mysql.yaml && yarn install && chmod 777 ./mvnw && echo "do not kill this task, run ./mvnw in other tasks" && yarn start' - - id: run-jh-studio + commandLine: 'yarn start' + group: + kind: run + isDefault: true + - id: start-backend exec: - label: 'Run ./mvnw' + label: 'Start JHipster Online' component: tools workingDir: ${PROJECT_SOURCE} - commandLine: './mvnw' + commandLine: 'chmod 777 ./mvnw && ./mvnw' group: kind: run isDefault: true events: postStart: - - build-jh-studio + - oc-add-mysql + - yarn-install diff --git a/stacks/jhipster-online/2.33.0/docker/Dockerfile b/stacks/jhipster-online/2.33.0/docker/Dockerfile deleted file mode 100644 index 2fc9d24f..00000000 --- a/stacks/jhipster-online/2.33.0/docker/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM quay.io/devfile/universal-developer-image@sha256:1b84280bea96228affa7ecedd7347e6801f6e369bdfa7e40dabfc4fa99f9cad6 - -RUN npm install -y -g generator-jhipster@8.1.0 \ No newline at end of file