Skip to content

Commit d19f7ab

Browse files
Merge branch 'main' into feature/wikiRunnerAddSetupScript
2 parents 96875d5 + d258978 commit d19f7ab

22 files changed

Lines changed: 520 additions & 166 deletions

File tree

.github/workflows/syncDocs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,21 @@ jobs:
6363
if: ${{ env.TO_BE_CANCELLED == 'false' }}
6464
run: |
6565
cd ${REPO_COMPILER_DEST}
66+
git checkout master
6667
git status
6768
git add .
6869
git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER"
6970
git remote add origin-wiki "https://${BUILD_USER}:${BUILD_USER_PASSWD}@github.com/${ORG}/${REPO_COMPILER_DEST}.git"
70-
git push origin-wiki main
71+
git push origin-wiki master
7172
- name: Sync Wiki ${REPO_TUTORIAL_DEST} Repository
7273
if: ${{ env.TO_BE_CANCELLED == 'false' }}
7374
run: |
7475
cd ${REPO_TUTORIAL_DEST}
76+
git checkout master
77+
git pull
7578
git status
7679
git add .
7780
git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER"
7881
git remote add origin-wiki "https://${BUILD_USER}:${BUILD_USER_PASSWD}@github.com/${ORG}/${REPO_TUTORIAL_DEST}.git"
79-
git push origin-wiki main
82+
git push origin-wiki master
8083

documentation/Assertions.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
## Assertions
22
The following assertions are already implemented:
3-
* directoryExist
4-
* directoryNotEmpty
5-
* fileExist
6-
* fileContains
7-
* noErrorCode
8-
* noException
9-
* repositoryIsClean
10-
* serverIsReachable
3+
* [directoryExist](#directoryExist)
4+
* [directoryNotEmpty](#directoryNotEmpty)
5+
* [fileExist](#fileExist)
6+
* [fileContains](#fileContains)
7+
* [noErrorCode](#noErrorCode)
8+
* [noException](#noExceptions)
9+
* [repositoryIsClean](#repositoryIsClean)
10+
* [serverIsReachable](#serverIsReachable)
1111

1212
***
1313

14-
### directoryExist
14+
### directoryExist <a name="directoryExist"></a>
1515
#### description
1616
Checks if a given path leads to an existing directory.
1717
#### parameter
1818
1. Path as a string, which should lead to an existing directory.
1919

2020
***
2121

22-
### directoryNotEmpty
22+
### directoryNotEmpty <a name="directoryNotEmpty"></a>
2323
#### description
2424
Checks if a given directory contain at least one file or subdirectory.
2525
#### parameter
2626
1. Path as a string of a directory.
2727

2828
***
2929

30-
### fileExist
30+
### fileExist <a name="fileExist"></a>
3131
#### description
3232
Checks if a given path leads to an existing file.
3333
#### parameter
3434
1. Path as a string
3535

3636
***
3737

38-
### fileContains
38+
### fileContains <a name="fileContains"></a>
3939
#### description
4040
Checks if content is included in a file
4141
#### parameter
@@ -44,31 +44,31 @@ Checks if content is included in a file
4444

4545
***
4646

47-
### noErrorCode
47+
### noErrorCode <a name="noErrorCode"></a>
4848
#### description
4949
Checks if the given RunResult has an returnCode of 0 otherwise throwing Error.
5050
#### parameter
5151
1. RunResult
5252

5353
***
5454

55-
### noException
55+
### noException <a name="noException"></a>
5656
#### description
5757
Checks if the given RunResult's exception Array is empty otherwise throwing Error.
5858
#### parameter
5959
1. RunResult
6060

6161
***
6262

63-
### repositoryIsClean
63+
### repositoryIsClean <a name="repositoryIsClean"></a>
6464
#### description
6565
Checks if the given directory is a git repository and is clean, meaning there are no uncommited changes.
6666
#### parameter
6767
1. Path of a directory as a string.
6868

6969
***
7070

71-
### serverIsReachable
71+
### serverIsReachable <a name="serverIsReachable"></a>
7272
#### description
7373
Checks if a server is available on localhost.
7474
#### parameter

documentation/Development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure
66

77
### How to create a playbook
88
The playbooks for the tutorial-compiler are contained in the tutorials repository. There you will find a description of how to create your own playbook.
9-
https://github.com/devonfw-tutorials/tutorials/wiki/Development
9+
https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Tutorials
1010

1111
### How to create your own command
1212
To create a new command you can use in your playbooks, you have to implement a new function for this command in all runner class you want to support this command. If you want to use the command only in katacoda tutorials for example, you have to implement the function only in the katacoda runner class.

documentation/Functions.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
## Functions
22
The following functions are already implemented:
3-
* installDevonfwIde
4-
* restoreDevonfwIde
5-
* restoreWorkspace
6-
* changeWorkspace
7-
* executeCommand
8-
* installCobiGen
9-
* cobiGenJava
10-
* createDevon4jProject
11-
* buildJava
12-
* createFile
13-
* changeFile
14-
* createFolder
15-
* cloneRepository
16-
* runServerJava
17-
* buildNg
18-
* npmInstall
19-
* dockerCompose
20-
* downloadFile
21-
* nextKatacodaStep
22-
* adaptTemplatesCobiGen
23-
* createDevon4ngProject
24-
* addSetupScript
3+
* [installDevonfwIde](#installDevonfwIde)
4+
* [restoreDevonfwIde](#restoreDevonfwIde)
5+
* [restoreWorkspace](#restoreWorkspace)
6+
* [changeWorkspace](#changeWorkspace)
7+
* [executeCommand](#executeCommand)
8+
* [installCobiGen](#installCobiGen)
9+
* [cobiGenJava](#cobiGenJava)
10+
* [createDevon4jProject](#createDevon4jProject)
11+
* [buildJava](#buildJava)
12+
* [createFile](#createFile)
13+
* [changeFile](#changeFile)
14+
* [createFolder](#createFolder)
15+
* [cloneRepository](#cloneRepository)
16+
* [runServerJava](#runServerJava)
17+
* [buildNg](#buildNg)
18+
* [npmInstall](#npmInstall)
19+
* [dockerCompose](#dockerCompose)
20+
* [downloadFile](#downloadFile)
21+
* [nextKatacodaStep](#nextKatacodaStep)
22+
* [adaptTemplatesCobiGen](#adaptTemplatesCobiGen)
23+
* [createDevon4ngProject](#createDevon4ngProject)
24+
* [addSetupScript](#addSetupScript)
2525

2626
***
2727

28-
### installDevonfwIde
28+
### installDevonfwIde <a name="installDevonfwIde"></a>
2929
#### parameter
3030
1. The tools you want to install within the devonfw ide: string array
3131
2. Optional: The version of the ide to install
@@ -34,7 +34,7 @@ installDevonfwIde(["java","mvn"], "2020.08.001")
3434

3535
***
3636

37-
### restoreDevonfwIde
37+
### restoreDevonfwIde <a name="restoreDevonfwIde"></a>
3838
#### parameter
3939
1. The tools you want to install within the devonfw ide: string array
4040
2. Optional: The version of the ide to install
@@ -44,7 +44,7 @@ restoreDevonfwIde(["java","mvn"], "2020.08.001")
4444
In the Katacoda environment the installation of the devonfw IDE is executed in a startup script.
4545
***
4646

47-
### restoreWorkspace
47+
### restoreWorkspace <a name="restoreWorkspace"></a>
4848
#### parameter
4949
1. (Optional) Name of the workspace repository {"workspace": string} (Default is the playbook-name)
5050

@@ -106,7 +106,7 @@ will run "git clone https://github.com/[GitHub-name]/[playbook-name]" and checko
106106
Learn more about the workspace directory and working directory on [Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure)
107107

108108
109-
### changeWorkspace
109+
### changeWorkspace <a name="changeWorkspace"></a>
110110
#### parameter
111111
1. path to a new workspace (relative to working directory)
112112
#### example
@@ -115,7 +115,7 @@ will set the workspace directory to "[working directory]/devonfw/workspaces/proj
115115

116116
Learn more about the workspace directory and working directory on [Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure)
117117

118-
### executeCommand
118+
### executeCommand <a name="executeCommand"></a>
119119
#### parameter
120120
1. The command that will be executed on Windows
121121
2. The command that will be executed on Linux
@@ -150,15 +150,15 @@ executeCommand("someServerScript.ps1","bash someServerScript.sh", {"asynchronous
150150
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.
151151

152152

153-
### installCobiGen
153+
### installCobiGen <a name="installGobiGen"></a>
154154
#### parameter
155155
* No parameters
156156
#### example
157157
installCobiGen()
158158

159159
***
160160

161-
### cobiGenJava
161+
### cobiGenJava <a name="cobiGenJava"></a>
162162
#### parameter
163163
1. The path to the java file you want to generate code for: string
164164
2. The numbers that represent the templates that CobiGen uses to generate code: int array
@@ -175,7 +175,7 @@ cobiGenJava("path/to/java/file/MyEntity.java",[1,3,5,6,8])
175175

176176
***
177177

178-
### createDevon4jProject
178+
### createDevon4jProject <a name="createDevon4jProject"></a>
179179
#### parameter
180180
1. The base package name
181181
#### example
@@ -184,7 +184,7 @@ createDevon4jProject("com.mycustomer.myapplication")
184184

185185
***
186186

187-
### buildJava
187+
### buildJava <a name="buildJava"></a>
188188
#### parameter
189189
1. The project directory
190190
2. (Optional) Indicator whether tests should be run. Default is false.
@@ -193,7 +193,7 @@ buildJava("cobigenexample", true)
193193

194194
***
195195

196-
### createFile
196+
### createFile <a name="createFile"></a>
197197
#### parameter
198198
1. Path of the file to be created (relative path to the workspace directory)
199199
2. (Optional) Path of the file to get the content from. Relative to the playbook directory
@@ -202,7 +202,7 @@ createFile("cobigenexample/core/src/main/java/com/example/application/cobigenexa
202202

203203
***
204204

205-
### changeFile
205+
### changeFile <a name="changeFile"></a>
206206
#### parameter
207207
1. Path of the file to be changed (relative path to the workspace directory)
208208
2.
@@ -243,15 +243,15 @@ The option to insert at a linenumber uses a placeholder inserted by a script and
243243

244244
***
245245

246-
### createFolder
246+
### createFolder <a name="createFolder"></a>
247247
#### parameter
248248
1. Path of the folder to be created, relative to the workspace directory. Subdirectories are also created.
249249
#### example
250250
createFolder("directoryPath/subDirectory")
251251

252252
***
253253

254-
### cloneRepository
254+
### cloneRepository <a name="cloneRepository"></a>
255255
#### parameter
256256
1. Path into which the repository is to be cloned, relative to workspace.
257257
2. Git repository URL
@@ -265,7 +265,7 @@ Repository will be cloned into a newly created subdirectory devonfw-tutorials.
265265
***
266266

267267

268-
### runServerJava
268+
### runServerJava <a name="runServerJava"></a>
269269
#### parameter
270270
1. Path to the server directory within the java project.
271271
2. Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -280,7 +280,7 @@ path: The URL path on which is checked if the server is running
280280
If the tutorial should be tested on the console environment, you have to specify a port.
281281
***
282282

283-
### npmInstall
283+
### npmInstall <a name="npmInstall"></a>
284284
#### parameter
285285
1. Path to the project where the dependencies from the package.json file are to be installed.
286286
2. Json-object: Name of a package, global or local installation, or array of npm arguments
@@ -296,7 +296,7 @@ will run 'npm install' in the directory 'my-thai-star/angular'
296296

297297
***
298298

299-
### dockerCompose
299+
### dockerCompose <a name="dockerCompose"></a>
300300
#### parameter
301301
1. Path to the directory where the docker-compose.yml file is located, relative to workspace.
302302
2. Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -311,7 +311,7 @@ path: The URL path on which is checked if the server is running
311311
If the tutorial should be tested on the console environment, you have to specify a port.
312312
***
313313

314-
### downloadFile
314+
### downloadFile <a name="downloadFile"></a>
315315
#### parameter
316316
1. URL of the file to be downloaded.
317317
2. Name of file.
@@ -321,7 +321,7 @@ downloadFile("https://bit.ly/2BCkFa9", "file", "downloads")
321321

322322
***
323323

324-
### buildNg
324+
### buildNg <a name="buildNg"></a>
325325
#### parameter
326326
1. Path to the angular project relative to workspace
327327
2. (Optional) Custom output directory.
@@ -334,7 +334,7 @@ Will build the angular project to output directory testOutput.
334334

335335
***
336336

337-
### runClientNg
337+
### runClientNg <a name="runClientNg"></a>
338338
#### parameter
339339
1. Path to the angular project from which the frontend server is to be started.
340340
2. Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -349,7 +349,7 @@ path: The URL path on which is checked if the server is running
349349
If the tutorial should be tested on the console environment, you have to specify a port.
350350
***
351351

352-
### nextKatacodaStep
352+
### nextKatacodaStep <a name="nextKatacodaStep"></a>
353353
#### parameter
354354
1. The title of the step.
355355
2. An array of json objects with files, content, or images to be rendered within the katacoda step.
@@ -366,15 +366,15 @@ image: Path to an image to be displayed in the katacoda step.
366366

367367
***
368368

369-
### adaptTemplatesCobiGen
369+
### adaptTemplatesCobiGen <a name="adaptTemplatesCobiGen"></a>
370370
#### parameter
371371
* No parameters
372372
#### example
373373
adaptTemplatesCobiGen()
374374

375375
***
376376

377-
### createDevon4ngProject
377+
### createDevon4ngProject <a name="createDevon4ngProject"></a>
378378
#### parameter
379379
1. Name of the Project.
380380
2. Path to where the Project should be created (relative to workspace). Folder should exist.
@@ -391,7 +391,7 @@ This command also works if the devonfw IDE is not installed, but then you have t
391391

392392
***
393393

394-
### addSetupScript
394+
### addSetupScript <a name="addSetupScript"></a>
395395
#### parameter
396396
1. Path of the script (Linux). Relative to the playbook directory
397397
2. Path of the script (Windows). Relative to the playbook directory
@@ -401,7 +401,7 @@ addSetupScript("assets/createProjectScript.sh", "assets/createProjectScript.ps1"
401401

402402
***
403403

404-
### openFile
404+
### openFile <a name="openFile"></a>
405405
#### parameter
406406
1. Path of the file to be opened (relative path to the workspace directory)
407407

0 commit comments

Comments
 (0)