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

Update commands' names #328

Merged
merged 3 commits into from
Jul 30, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,42 @@ components:
containerPath: /home/jboss/.m2
commands:
-
name: build
name: 1. Build
actions:
-
type: exec
component: maven
command: "MAVEN_OPTS='-Xmx200m' && mvn clean install -DskipTests"
workdir: ${CHE_PROJECTS_ROOT}/rest-http-redhat
-
name: run
name: 2. Run
actions:
-
type: exec
component: maven
command: "MAVEN_OPTS='-Xmx200m' && mvn clean install -DskipTests && java -jar target/*.jar -Djava.net.preferIPv4Stack=true"
workdir: ${CHE_PROJECTS_ROOT}/rest-http-redhat
-
name: debug
name: 3. Run in debug mode
actions:
-
type: exec
component: maven
command: "MAVEN_OPTS='-Xmx200m' && mvn clean install -DskipTests && java -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n -jar target/*.jar -Djava.net.preferIPv4Stack=true"
workdir: ${CHE_PROJECTS_ROOT}/rest-http-redhat
-
name: 4. Log into deployment cluster
actions:
- workdir: "${CHE_PROJECTS_ROOT}/rest-http-redhat"
type: exec
command: |
echo
echo "Before you can deploy this application to an openshift cluster,"
echo "you must run 'oc login ...' in the maven terminal."
echo
component: maven
-
name: deploy to OpenShift
name: 5. Deploy to OpenShift
actions:
-
type: exec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,36 +42,47 @@ components:
containerPath: /home/jboss/.m2
commands:
-
name: build
name: 1. Build
actions:
-
type: exec
component: maven
command: "MAVEN_OPTS='-Xmx200m' && mvn clean package"
workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse"
-
name: run app
name: 2. Run
actions:
-
type: exec
component: maven
command: "mvn spring-boot:run"
workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse"
-
name: deploy to OpenShift
name: 3. Run in debug mode
actions:
-
type: exec
component: maven
command: "mvn fabric8:deploy -Popenshift -DskipTests"
command: "mvn spring-boot:run -Drun.jvmArguments=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005\""
workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse"
-
name: 4. Log into deployment cluster
actions:
- workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse"
type: exec
command: |
echo
echo "Before you can deploy this application to an openshift cluster,"
echo "you must run 'oc login ...' in the maven terminal."
echo
component: maven
-
name: debug
name: 5. Deploy to OpenShift
actions:
-
type: exec
component: maven
command: "mvn spring-boot:run -Drun.jvmArguments=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005\""
command: "mvn fabric8:deploy -Popenshift -DskipTests"
workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse"
-
name: Debug remote java application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,48 @@ components:
port: 8080
commands:
-
name: Build
name: 1. Build
actions:
-
type: exec
component: maven
command: "mvn clean install"
workdir: ${CHE_PROJECTS_ROOT}/vertx-health-checks-example-redhat
-
name: Build and run
name: 2. Build and run
actions:
-
type: exec
component: maven
command: "mvn clean install && mvn -Dvertx.disableDnsResolver=true vertx:run"
workdir: ${CHE_PROJECTS_ROOT}/vertx-health-checks-example-redhat
-
name: Run in debug mode
name: 3. Run in debug mode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-health-checks-example-redhat'
type: exec
command: "mvn -DskipTests vertx:debug"
component: maven
-
name: Run tests
name: 4. Run tests
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-health-checks-example-redhat'
type: exec
command: "mvn verify"
component: maven
-
name: Deploy to OpenShift
name: 5. Log into deployment cluster
actions:
- workdir: "${CHE_PROJECTS_ROOT}/vertx-health-checks-example-redhat"
type: exec
command: |
echo
echo "Before you can deploy this application to an openshift cluster,"
echo "you must run 'oc login ...' in the maven terminal."
echo
component: maven
-
name: 6. Deploy to OpenShift
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-health-checks-example-redhat'
type: exec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ components:
mountSources: true
commands:
-
name: Build
name: 1. Build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/validating-form-input/complete'
type: exec
command: gradle build
component: gradle
-
name: Debug application
name: 2. Run application
actions:
- workdir: '${CHE_PROJECTS_ROOT}/validating-form-input/complete'
type: exec
command: gradle bootRun --debug-jvm
command: gradle bootRun
component: gradle
-
name: Run application
name: 3. Run in debug mode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/validating-form-input/complete'
type: exec
command: gradle bootRun
command: gradle bootRun --debug-jvm
component: gradle
-
name: Run tests
name: 4. Run tests
actions:
- workdir: '${CHE_PROJECTS_ROOT}/validating-form-input/complete'
type: exec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ components:
path: /hello/greeting/che-user
commands:
-
name: Package the application
name: 1. Package the application
actions:
-
type: exec
component: maven
command: "mvn package"
workdir: ${CHE_PROJECTS_ROOT}/quarkus-quickstarts/getting-started
-
name: Start Quarkus in devmode (hot deploy + debug)
name: 2. Start Quarkus in devmode (hot deploy + debug)
actions:
-
type: exec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,52 +35,62 @@ components:
- value: $(JAVA_OPTS)
name: MAVEN_OPTS
commands:
- name: build
- name: 1. Build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster'
type: exec
command: >-
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests clean
install
component: maven
- name: Debug remote java application
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 5005
}]
}
type: vscode-launch
- name: run
- name: 2. Run
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster'
type: exec
command: MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} spring-boot:run
component: maven
- name: debug
- name: 3. Run in debug mode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster'
type: exec
command: >-
mvn -Duser.home=${HOME} spring-boot:run -Drun.jvmArguments="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
component: maven
- name: test
- name: 4. Run tests
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster'
type: exec
command: MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} verify
component: maven
- name: deploy to OpenShift
- name: 5. Log into deployment cluster
actions:
- workdir: "${CHE_PROJECTS_ROOT}/spring-boot-http-booster"
type: exec
command: |
echo
echo "Before you can deploy this application to an openshift cluster,"
echo "you must run 'oc login ...' in the maven terminal."
echo
component: maven
- name: 6. Deploy to OpenShift
actions:
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster'
type: exec
command: 'mvn fabric8:deploy -Popenshift -DskipTests'
component: maven
- name: Debug remote java application
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 5005
}]
}
type: vscode-launch
Original file line number Diff line number Diff line change
Expand Up @@ -35,56 +35,66 @@ components:
- value: $(JAVA_OPTS)
name: MAVEN_OPTS
commands:
- name: build
- name: 1. Build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-http-booster'
type: exec
command: >-
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTestsclean
install
component: maven
- name: Debug remote java application
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 5005
}]
}
type: vscode-launch
- name: run
- name: 2. Run
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-http-booster'
type: exec
command: >-
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME}
-Dvertx.disableDnsResolver=true vertx:run
component: maven
- name: debug
- name: 3. Run in debug mode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-http-booster'
type: exec
command: >-
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests
vertx:debug
component: maven
- name: test
- name: 4. Run tests
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-http-booster'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests verify '
component: maven
- name: deploy to OpenShift
- name: 5. Log into deployment cluster
actions:
- workdir: "${CHE_PROJECTS_ROOT}/vertx-http-booster"
type: exec
command: |
echo
echo "Before you can deploy this application to an openshift cluster,"
echo "you must run 'oc login ...' in the maven terminal."
echo
component: maven
- name: 6. deploy to OpenShift
nickboldt marked this conversation as resolved.
Show resolved Hide resolved
actions:
- workdir: '${CHE_PROJECTS_ROOT}/vertx-http-booster'
type: exec
command: >-
MAVEN_OPTS="-Xmx200m" && mvn fabric8:deploy -Popenshift -DskipTests
-Dvertx.disableDnsResolver=true
component: maven
- name: Debug remote java application
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 7. Debug...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickboldt I didn't edit debug configuration commands because they aren't displayed in workspace view, so i don't see any reason to make them numbered

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it for Che commands which are displayed in workspace view:
screenshot-codeready-crw-operatorhub-tls-oauth apps ocp44 crw-qe com-2020 07 30-10_06_09
The command which describes debug configuration has type vscode-launch which means that this configuration will be added into /projects/.theia/launch.json (it is NOT executable command)
screenshot-codeready-crw-operatorhub-tls-oauth apps ocp44 crw-qe com-2020 07 30-10_06_39
And the name of this command is displayed only in devfile, it is not visible in workspace.
Could you explain what is the reason to have

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, apologies -- misunderstanding on my part w.r.t. command vs. config. :D

actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 5005
}]
}
type: vscode-launch