You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is similar to [installDevonfwIde](#installDevonfwIde) function but the difference between the two functions is that restoreDevonfwIde installs the ide through a script in the background and the Katacoda user will already have an installed version of devonfw-ide at the start of the tutorial.
54
55
#### parameter
55
-
1. The tools you want to install within the devonfw ide: string array
56
-
2. Optional: The version of the ide to install
56
+
This function consist of two parameters.
57
+
58
+
1. First parameter:
59
+
-**Required**
60
+
-**Type**- Array of String.
61
+
-**Description**- The tools you want to install within the devonfw-ide. You can pass every tool that can be installed with the devonfw-ide. In this parameter, based on requirement the tools you can pass are: java, mvn, node, npm, gradle, ionic jasypt, jenkins, ng, sonar and yarn.
62
+
63
+
2. Second parameter:
64
+
-**Optional**
65
+
-**Type**- String
66
+
-**Description**- Devonfw-ide version that will be installed. If this parameter is omitted, it will install the newest devonfw-ide release.
67
+
57
68
#### example
58
69
restoreDevonfwIde(["java","mvn"], "2020.08.001")
59
-
#### details
60
-
In the Katacoda environment the installation of the devonfw IDE is executed in a startup script.
70
+
71
+
Note:
72
+
1. In the Katacoda environment the installation of the devonfw-ide is executed in a startup script. Katacoda user don't have to manually execute it.
73
+
74
+
2. It should be used when you don't have to show the Katacoda user how to install the devonfw-ide because some other tutorials are predecessors for this tutorial and the user already knows the process.
This function is used to clone an existing GitHub repository to the working directory of the tutorial. It can be used to continue the tutorial with the state of a previous tutorial located in the repository to be cloned.
65
80
#### parameter
66
81
1. (Optional) Name of the workspace repository {"workspace": string} (Default is the playbook-name)
67
82
@@ -143,14 +158,36 @@ Note: No background scripts are running and Katacoda user don't have to manually
143
158
***
144
159
145
160
### executeCommand <aname="executeCommand"></a>
161
+
This function is used when you want to use a bash (or powershell/cmd on windows) command.
162
+
146
163
#### parameter
147
-
1. The command that will be executed on Windows
148
-
2. The command that will be executed on Linux
149
-
3. Json-object with optional fields
150
-
* (Optional) Directory where the command will be executed, if not in current directory (relative to workspace){"dir": string}
151
-
* (Optional) Synchronous or asynchronous process. Use asynchronous when starting a server. Default is synchronous. {"asynchronous": boolean}
152
-
* (Optional) Array of arguments {"args": string[]}
153
-
4. Assert information needed if you start a server to check server availability. Only required when you start a asynchronous server.
164
+
This function consists of four parameters.
165
+
166
+
1. First parameter:
167
+
-**Required**
168
+
-**Type**- String
169
+
-**Description**-It contains the input which is a command. The command that will be executed on Windows.
170
+
171
+
2. Second parameter:
172
+
-**Required**
173
+
-**Type**- String
174
+
-**Description**-It contains the input which is a command. The command that will be executed on Linux.
175
+
176
+
3. Third parameter:
177
+
-**Required**
178
+
-**Type**- JSON object
179
+
-**Description**- JSON object with optional fields
180
+
***First attribute**: (Optional) Directory where the command will be executed, if not in current directory (relative to workspace)
181
+
Example: {"dir": string}
182
+
***Second attribute**: (Optional) Synchronous or asynchronous process. Use asynchronous when starting a server. Default is synchronous.
183
+
Example: {"asynchronous": boolean}
184
+
***Third attribute**: (Optional) Array of arguments
185
+
Example: {"args": string[]}
186
+
187
+
4. Fourth parameter:
188
+
-**Required**
189
+
-**Type**- JSON object
190
+
-**Description**-Assertion information needed if you start a server to check server availability. Only required when you start a asynchronous server. This parameter is only needed when the command is an asynchronous command.
154
191
155
192
#### Commands
156
193
It is needed to pass a command for Windows and also for Linux-based systems because both systems will always be tested.
@@ -167,13 +204,13 @@ interval: The availability of the server is checked in the given interval
Will create a command to execute the script in the directory with the parameter --params 5 and in the current command prompt. The command prompt will be blocked until you stop the script.
Starting a server in a new terminal. You have to specify the port for testing, the other parameters are optional. The startupTime can specify how long the runner will wait for a response from the server process and with interval you can set the frequenzy for the server testing. The path is the subpath from your server that should be reached.
178
215
179
216
***
@@ -190,6 +227,7 @@ Note:
190
227
1. The command for execution will be generated by Katacoda runner, so user will have to execute this command manually.
191
228
192
229
2. To execute this function, devonfw-ide must be installed.
230
+
193
231
***
194
232
195
233
### cobiGenJava <aname="cobiGenJava"></a>
@@ -394,9 +432,17 @@ Note:
394
432
395
433
396
434
### runServerJava <aname="runServerJava"></a>
435
+
This function will run your Java application on server.Parameter and assertion information you need to use properly, which is mentioned below.In Katacoda the command will be executed in a new terminal.
397
436
#### parameter
398
-
1. Path to the server directory within the java project.
399
-
2. Assertion information. Only needed for the console runner to check if the server was started properly.
437
+
This functions consists of two parameters.
438
+
1. 1st Parameter:
439
+
-**Required**
440
+
-**Type**- String
441
+
-**Description**- Path to the server directory within the Java project.
442
+
2. 2nd Parameter:
443
+
-**Required**
444
+
-**Type**- JSON object
445
+
-**Description**- Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -406,6 +452,9 @@ port: Port on which the server is running
406
452
path: The URL path on which is checked if the server is running
407
453
408
454
If the tutorial should be tested on the console environment, you have to specify a port.
455
+
456
+
Note: For this command the devonfw-ide is not necessarily needed. Maven has to be installed. So if someone installs Maven before (e.g. with a setup script), then the command should also work.The command uses the Spring Boot Maven Plugin to run the Java application. So at the moment only Spring applications are supported.
457
+
409
458
***
410
459
411
460
### npmInstall <aname="npmInstall"></a>
@@ -436,11 +485,12 @@ In second parameter, you can add 3 attributes.
436
485
-**Third attribute**: It is optional and it is the array of npm arguments.
will run 'npm install -g --save-dev @angular/cli' in the directory 'jump-the-queue/angular'.
442
492
443
-
*npmInstall("my-thai-star/angular")
493
+
npmInstall("my-thai-star/angular")
444
494
will run 'npm install' in the directory 'my-thai-star/angular'
445
495
446
496
Note:
@@ -556,20 +606,28 @@ If the tutorial should be tested on the console environment, you have to specify
556
606
***
557
607
558
608
### displayContent <aname="displayContent"></a>
609
+
This function is only used when you want to display content such as text, image or any file content in your tutorial.
610
+
559
611
#### parameter
560
-
1. The title of the step.
561
-
2. An array of json objects with files, content, or images to be rendered within the Katacoda step. The use for this function is to display an image and some descriptive text. No Katacoda syntax is allowed in the files or the content!
562
-
3. (Optional) Path to the current directory where the user is located (relative to the workspace directory). Only needed if the directory is changed within this step.
563
-
#### example
564
-
display("Step title", [{ "file": "files/description.asciidoc" }, { "content": "This is just plain content." }, { "image": "files/image.png" }])
612
+
This function consists of two parameters.
565
613
566
-
#### Details
567
-
Available attributes in the json objects:
614
+
1. First parameter:
615
+
-**Required**
616
+
-**Type**- String
617
+
-**Description**- The title of the step.
568
618
569
-
1. file: Path to a file whose content is to be displayed in the Katacoda step (e.g. .asciidoc or .txt file). The file should be following the formating of asciidoc files.
570
-
2. content: Plain text to be displayed in the Katacoda step. This Text should be following the formating of asciidoc files.
571
-
3. image: Path to an image to be displayed in the Katacoda step.
619
+
Note: The title should never be empty and it is of type string.
572
620
621
+
2. Second parameter:
622
+
-**Required**
623
+
-**Type**- Array of JSON objects with files, content, or images to be rendered within the Katacoda step.
624
+
-**Description**-This function consists of three attributes. The use for this function is to display an image and some descriptive text. No Katacoda syntax is allowed in the files or the content!
625
+
* 1st attribute i.e. "file": Path to a file whose content is to be displayed in the Katacoda step (e.g. .asciidoc or .txt file). The file should be following the formating of asciidoc files.
626
+
* 2nd attribute i.e. "content": Plain text to be displayed in the Katacoda step. This Text should be following the formating of asciidoc files.
627
+
* 3rd attribute i.e. "image": Path to an image to be displayed in the Katacoda step. It should be placed under subfolder of the playbook directory.
628
+
629
+
#### example
630
+
displayContent("Step title", [{ "file": "files/description.asciidoc" }, { "content": "This is just plain content." }, { "image": "files/image.png" }])
573
631
574
632
#### Formatting rules for content and .asciidoc or .txt files.
575
633
* You can add headers to structure your text. The generated headers are shown in the examples below. The headers should fit into the overall structure of the generated wiki so level 1 header are not allowed, but the other header can be used at your judgement.
@@ -597,6 +655,10 @@ Link:
597
655
The tutorials repository can be found https://github.com/devonfw-tutorials/tutorials/issues[here].
598
656
```
599
657
658
+
Note:
659
+
660
+
1. You should avoid using any command inside any text file for which you want to display content. This will cause problems with the console runner and the tests.
0 commit comments