From 98b16c766408a9765845ff4462bdada5895b6f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Die=C3=9Fner?= Date: Wed, 26 May 2021 16:25:46 +0200 Subject: [PATCH 1/6] changed to main to master --- .github/workflows/syncDocs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/syncDocs.yml b/.github/workflows/syncDocs.yml index 2cfae939..ba4d2e77 100644 --- a/.github/workflows/syncDocs.yml +++ b/.github/workflows/syncDocs.yml @@ -67,14 +67,16 @@ jobs: git add . git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER" git remote add origin-wiki "https://${BUILD_USER}:${BUILD_USER_PASSWD}@github.com/${ORG}/${REPO_COMPILER_DEST}.git" - git push origin-wiki main + git push origin-wiki master - name: Sync Wiki ${REPO_TUTORIAL_DEST} Repository if: ${{ env.TO_BE_CANCELLED == 'false' }} run: | cd ${REPO_TUTORIAL_DEST} + git checkout master + git pull git status git add . git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER" git remote add origin-wiki "https://${BUILD_USER}:${BUILD_USER_PASSWD}@github.com/${ORG}/${REPO_TUTORIAL_DEST}.git" - git push origin-wiki main + git push origin-wiki master \ No newline at end of file From 4f58a87dc80c921aa7878dff4a0a6137a3bde914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Die=C3=9Fner?= Date: Wed, 26 May 2021 16:37:19 +0200 Subject: [PATCH 2/6] Added Tutorials docu page --- documentation/Development.md | 2 +- documentation/Tutorials.md | 192 +++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 documentation/Tutorials.md diff --git a/documentation/Development.md b/documentation/Development.md index bc8c687b..0bc1337f 100644 --- a/documentation/Development.md +++ b/documentation/Development.md @@ -6,7 +6,7 @@ https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure ### How to create a playbook 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. -https://github.com/devonfw-tutorials/tutorials/wiki/Development +https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Tutorials ### How to create your own command 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. diff --git a/documentation/Tutorials.md b/documentation/Tutorials.md new file mode 100644 index 00000000..cb7c2c3a --- /dev/null +++ b/documentation/Tutorials.md @@ -0,0 +1,192 @@ +# Tutorials + +In this section we will describe how you can implement your own tutorials. + +### How to create a playbook +Every tutorial has three main parts +* title +* a description of the tutorial. Here you should tell the user what he is going to learn in this tutorial. +* at least one step +Additionally, there are optional parts +* a subtitle +* a conclusion of the tutorial. This will be shown at the last page and can be used to summarize the learned, to foreshadow the next steps on the learning path or to mention useful sources. + +The tutorials are written in asciidoc files. +To create a tutorial you have to create a new folder for your tutorial. In this new folder you have to create a file called index.asciidoc + +The three main parts and the optional parts of the tutorial will be written in this file. Put the title of the tutorial in the first line: +``` += Title +``` + +Optionally, you can add a subtitle for the tutorial in the second line: +``` +== Subtitle +``` +This should be a short description of the tutorial, which is shown together with the title on the overview page. + +In the next lines, you have to provide the description of the tutorial surrounded by ```====```. + +``` +==== +Description of the tutorial + +## Prerequisites +* First prerequisite +* Second prerequisite + +## Learning goals +Describe in few words what the user is going to learn in this tutorial. + +Some additional text... +==== +``` +The description must contain a '## Prerequisites' and a '## Learning goals' part. Otherwise pull requests will be automatically rejected by the GitHub action. + + +The description is followed by the steps. Every step has +* an explanation +* a function to execute (see the function list in this wiki) +* and an optional explanation of the results of the step. + +The easiest is a step without the optional explanation of the results of the step. This step is created by the following syntax block + +``` +The explanation for the step +[step] +-- +functionName(parameters) +-- +``` + +If you want to explain the results to the user use the following syntax block with the surrounding ```====```: + +``` +==== +The explanation for the step +[step] +-- +functionName(parameters) +-- +The explanation of the results +==== +``` + +You can also use mutliple functions in one step, so that they are show on one katacoda tutorial page. + +``` +The explanation for the step +[step] +-- +functionName1(parameters) +functionName2(parameters) +-- +``` +For this it's helpful to set a custom title for the page, to sum up all included functions in the step. Otherwise the headline of the first function is used. But this also works with only one function. + +``` +The explanation for the step +[step] +== Custom Title for the step +-- +functionName1(parameters) +functionName2(parameters) +-- +``` + +You can also add an optional conclusion text, which is shown on completion of the tutorial. Use this to summarize the important content of the tutorial, to point out what to learn next or to mention other useful informations. + +To do that, you have to provide the conclusion at the end of the tutorial (after the last step) surrounded by ```====```. + +``` +==== +Conclusion of the tutorial +==== +``` + + +These blocks are combined to a complete tutorial. + +``` += Title +== Subtitle +==== +Description of the tutorial +==== + +The explanation for the step 1 +[step] +-- +functionName1(parameters) +-- + +The explanation for the step 2 +[step] +-- +functionName2(parameters) +-- + +==== +The explanation for the step 3 +[step] +-- +functionName3(parameters) +-- +The explanation of the results +==== + +The explanation for the step 4 +[step] +== Custom Title for step 4 +-- +functionName4a(parameters) +functionName4b(parameters) +-- + +==== +The explanation for the step 5 +[step] +== Custom Title for step 5 +-- +functionName5(parameters) +-- +The explanation of the results +==== + +==== +Conclusion of the tutorial +==== +``` + +### Generate the tutorial +The easiest way to generate the tutorial is to create a pull request with your playbook in the tutorials repository. To do this, you need to fork this repository. The playbook in your pull request will be build automatically and published to https://katacoda.com/devonfw-dev.
+A tutorial which explains this process is available on the devonfw katacoda account (https://katacoda.com/devonfw/scenarios/tutorial-compiler). + +In advanced cases and for troubleshooting you can run the build on your local maschine. The generation of the tutorial is done by the tutorial-compiler (https://github.com/devonfw-tutorials/tutorial-compiler). You can find a description how to set up the compiler on your local machine in the tutorial-compiler repository.
+https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Setup
+ +### How to create a course +A course is created by a ```[course-folder-name]-pathway.json``` file. + +``` +{ + "title": "[Course-Name]", + "description": "[Course-Description]", + "icon": "fa-katacoda", + "courses": + [ + { + "course_id": "[playbook-folder-name-1]", + "title": "[playbook title]", + "description": "[playbook description]" + }, + { + "course_id": "[playbook-folder-name-2]", + "title": "[playbook title 2]" + } + ] + } + +``` + +The course will be generated automatically in the katacoda-scenario repository. \ No newline at end of file From fecf8b97a09a4fca9d6804015b21090775b08da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Die=C3=9Fner?= Date: Fri, 28 May 2021 09:22:41 +0200 Subject: [PATCH 3/6] added checkout to master --- .github/workflows/syncDocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/syncDocs.yml b/.github/workflows/syncDocs.yml index ba4d2e77..2b1e7f79 100644 --- a/.github/workflows/syncDocs.yml +++ b/.github/workflows/syncDocs.yml @@ -63,6 +63,7 @@ jobs: if: ${{ env.TO_BE_CANCELLED == 'false' }} run: | cd ${REPO_COMPILER_DEST} + git checkout master git status git add . git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER" From 4be33cbb2cbc16e05c43b6799ba66f51621c3472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Die=C3=9Fner?= Date: Fri, 28 May 2021 09:56:03 +0200 Subject: [PATCH 4/6] Updated wiki pages --- documentation/Assertions.md | 16 +++++++------- documentation/Functions.md | 44 ++++++++++++++++++------------------- documentation/Home.md | 8 ++++++- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/documentation/Assertions.md b/documentation/Assertions.md index eecb0381..623035a1 100644 --- a/documentation/Assertions.md +++ b/documentation/Assertions.md @@ -1,13 +1,13 @@ ## Assertions The following assertions are already implemented: -* directoryExist -* directoryNotEmpty -* fileExist -* fileContains -* noErrorCode -* noException -* repositoryIsClean -* serverIsReachable +* [directoryExist](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#directoryExist) +* [directoryNotEmpty](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#directoryNotEmpty) +* [fileExist](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#fileExist) +* [fileContains](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#fileContains) +* [noErrorCode](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#noErrorCode) +* [noException](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#noExceptions) +* [repositoryIsClean](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#repositoryIsClean) +* [serverIsReachable](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#serverIsReachable) *** diff --git a/documentation/Functions.md b/documentation/Functions.md index 6ba25b52..9b2c1bab 100644 --- a/documentation/Functions.md +++ b/documentation/Functions.md @@ -1,27 +1,27 @@ ## Functions The following functions are already implemented: -* installDevonfwIde -* restoreDevonfwIde -* restoreWorkspace -* changeWorkspace -* executeCommand -* installCobiGen -* cobiGenJava -* createDevon4jProject -* buildJava -* createFile -* changeFile -* createFolder -* cloneRepository -* runServerJava -* buildNg -* npmInstall -* dockerCompose -* downloadFile -* nextKatacodaStep -* adaptTemplatesCobiGen -* createDevon4ngProject -* addSetupScript +* [installDevonfwIde](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#installDevonfwIde) +* [restoreDevonfwIde](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#restoreDevonfwIde) +* [restoreWorkspace](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#restoreWorkspace) +* [changeWorkspace](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#changeWorkspace) +* [executeCommand](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#executeCommand) +* [installCobiGen](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#installCobiGen) +* [cobiGenJava](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#cobiGenJava) +* [createDevon4jProject](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createDevon4jProject) +* [buildJava](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#buildJava) +* [createFile](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createFile) +* [changeFile](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#changeFile) +* [createFolder](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createFolder) +* [cloneRepository](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#cloneRepository) +* [runServerJava](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#runServerJava) +* [buildNg](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#buildNg) +* [npmInstall](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#npmInstall) +* [dockerCompose](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#dockerCompose) +* [downloadFile](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#downloadFile) +* [nextKatacodaStep](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#nextKatacodaStep) +* [adaptTemplatesCobiGen](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#adaptTemplatesCobiGen) +* [createDevon4ngProject](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createDevon4ngProject) +* [addSetupScript](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#addSetupScript) *** diff --git a/documentation/Home.md b/documentation/Home.md index 1b8e6a77..7656bbd0 100644 --- a/documentation/Home.md +++ b/documentation/Home.md @@ -3,13 +3,19 @@ To download and setup the tutorial-compiler use the description in the setup section.
[Setup](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Setup) -If you want to implement your own tutorials the Development section may help you.
+The Development section may help you to contribute code to the tutorial-compiler.
[Development](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Development) +If you want to implement your own tutorials the Tutorials section may help you.
+[Tutorials](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Tutorials) + You find a list of functions which are already implemented in the Functions section.
[Functions](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions) Learn more about the project structure.
[Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure) +You find a List of Assertions which are already implemented in the Assertions section.
+[Assertions](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions) + From 7911eb5860f39051c02cc2404bcee32f2f02adf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Die=C3=9Fner?= Date: Fri, 28 May 2021 12:26:19 +0200 Subject: [PATCH 5/6] toc --- documentation/Assertions.md | 10 ++-------- documentation/Functions.md | 24 ++---------------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/documentation/Assertions.md b/documentation/Assertions.md index 623035a1..aa20b40a 100644 --- a/documentation/Assertions.md +++ b/documentation/Assertions.md @@ -1,13 +1,7 @@ ## Assertions The following assertions are already implemented: -* [directoryExist](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#directoryExist) -* [directoryNotEmpty](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#directoryNotEmpty) -* [fileExist](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#fileExist) -* [fileContains](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#fileContains) -* [noErrorCode](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#noErrorCode) -* [noException](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#noExceptions) -* [repositoryIsClean](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#repositoryIsClean) -* [serverIsReachable](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Assertions#serverIsReachable) +:toc: +:toc-title: *** diff --git a/documentation/Functions.md b/documentation/Functions.md index 9b2c1bab..21247d99 100644 --- a/documentation/Functions.md +++ b/documentation/Functions.md @@ -1,27 +1,7 @@ ## Functions The following functions are already implemented: -* [installDevonfwIde](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#installDevonfwIde) -* [restoreDevonfwIde](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#restoreDevonfwIde) -* [restoreWorkspace](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#restoreWorkspace) -* [changeWorkspace](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#changeWorkspace) -* [executeCommand](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#executeCommand) -* [installCobiGen](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#installCobiGen) -* [cobiGenJava](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#cobiGenJava) -* [createDevon4jProject](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createDevon4jProject) -* [buildJava](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#buildJava) -* [createFile](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createFile) -* [changeFile](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#changeFile) -* [createFolder](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createFolder) -* [cloneRepository](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#cloneRepository) -* [runServerJava](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#runServerJava) -* [buildNg](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#buildNg) -* [npmInstall](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#npmInstall) -* [dockerCompose](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#dockerCompose) -* [downloadFile](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#downloadFile) -* [nextKatacodaStep](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#nextKatacodaStep) -* [adaptTemplatesCobiGen](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#adaptTemplatesCobiGen) -* [createDevon4ngProject](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#createDevon4ngProject) -* [addSetupScript](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Functions#addSetupScript) +:toc: +:toc-title: *** From 7618cb6ce43d813a3e148e4d7c46638ee55262f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Die=C3=9Fner?= Date: Fri, 28 May 2021 12:47:39 +0200 Subject: [PATCH 6/6] refactored ToC --- documentation/Assertions.md | 26 ++++++++------ documentation/Functions.md | 72 +++++++++++++++++++++++-------------- 2 files changed, 62 insertions(+), 36 deletions(-) diff --git a/documentation/Assertions.md b/documentation/Assertions.md index aa20b40a..12c31c35 100644 --- a/documentation/Assertions.md +++ b/documentation/Assertions.md @@ -1,11 +1,17 @@ ## Assertions The following assertions are already implemented: -:toc: -:toc-title: +* [directoryExist](#directoryExist) +* [directoryNotEmpty](#directoryNotEmpty) +* [fileExist](#fileExist) +* [fileContains](#fileContains) +* [noErrorCode](#noErrorCode) +* [noException](#noExceptions) +* [repositoryIsClean](#repositoryIsClean) +* [serverIsReachable](#serverIsReachable) *** -### directoryExist +### directoryExist #### description Checks if a given path leads to an existing directory. #### parameter @@ -13,7 +19,7 @@ Checks if a given path leads to an existing directory. *** -### directoryNotEmpty +### directoryNotEmpty #### description Checks if a given directory contain at least one file or subdirectory. #### parameter @@ -21,7 +27,7 @@ Checks if a given directory contain at least one file or subdirectory. *** -### fileExist +### fileExist #### description Checks if a given path leads to an existing file. #### parameter @@ -29,7 +35,7 @@ Checks if a given path leads to an existing file. *** -### fileContains +### fileContains #### description Checks if content is included in a file #### parameter @@ -38,7 +44,7 @@ Checks if content is included in a file *** -### noErrorCode +### noErrorCode #### description Checks if the given RunResult has an returnCode of 0 otherwise throwing Error. #### parameter @@ -46,7 +52,7 @@ Checks if the given RunResult has an returnCode of 0 otherwise throwing Error. *** -### noException +### noException #### description Checks if the given RunResult's exception Array is empty otherwise throwing Error. #### parameter @@ -54,7 +60,7 @@ Checks if the given RunResult's exception Array is empty otherwise throwing Erro *** -### repositoryIsClean +### repositoryIsClean #### description Checks if the given directory is a git repository and is clean, meaning there are no uncommited changes. #### parameter @@ -62,7 +68,7 @@ Checks if the given directory is a git repository and is clean, meaning there ar *** -### serverIsReachable +### serverIsReachable #### description Checks if a server is available on localhost. #### parameter diff --git a/documentation/Functions.md b/documentation/Functions.md index 21247d99..69cb31a3 100644 --- a/documentation/Functions.md +++ b/documentation/Functions.md @@ -1,11 +1,31 @@ ## Functions The following functions are already implemented: -:toc: -:toc-title: +* [installDevonfwIde](#installDevonfwIde) +* [restoreDevonfwIde](#restoreDevonfwIde) +* [restoreWorkspace](#restoreWorkspace) +* [changeWorkspace](#changeWorkspace) +* [executeCommand](#executeCommand) +* [installCobiGen](#installCobiGen) +* [cobiGenJava](#cobiGenJava) +* [createDevon4jProject](#createDevon4jProject) +* [buildJava](#buildJava) +* [createFile](#createFile) +* [changeFile](#changeFile) +* [createFolder](#createFolder) +* [cloneRepository](#cloneRepository) +* [runServerJava](#runServerJava) +* [buildNg](#buildNg) +* [npmInstall](#npmInstall) +* [dockerCompose](#dockerCompose) +* [downloadFile](#downloadFile) +* [nextKatacodaStep](#nextKatacodaStep) +* [adaptTemplatesCobiGen](#adaptTemplatesCobiGen) +* [createDevon4ngProject](#createDevon4ngProject) +* [addSetupScript](#addSetupScript) *** -### installDevonfwIde +### installDevonfwIde #### parameter 1. The tools you want to install within the devonfw ide: string array 2. Optional: The version of the ide to install @@ -14,7 +34,7 @@ installDevonfwIde(["java","mvn"], "2020.08.001") *** -### restoreDevonfwIde +### restoreDevonfwIde #### parameter 1. The tools you want to install within the devonfw ide: string array 2. Optional: The version of the ide to install @@ -24,7 +44,7 @@ restoreDevonfwIde(["java","mvn"], "2020.08.001") In the Katacoda environment the installation of the devonfw IDE is executed in a startup script. *** -### restoreWorkspace +### restoreWorkspace #### parameter 1. (Optional) Name of the workspace repository {"workspace": string} (Default is the playbook-name) @@ -86,7 +106,7 @@ will run "git clone https://github.com/[GitHub-name]/[playbook-name]" and checko Learn more about the workspace directory and working directory on [Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure) -### changeWorkspace +### changeWorkspace #### parameter 1. path to a new workspace (relative to working directory) #### example @@ -95,7 +115,7 @@ will set the workspace directory to "[working directory]/devonfw/workspaces/proj Learn more about the workspace directory and working directory on [Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure) -### executeCommand +### executeCommand #### parameter 1. The command that will be executed on Windows 2. The command that will be executed on Linux @@ -130,7 +150,7 @@ executeCommand("someServerScript.ps1","bash someServerScript.sh", {"asynchronous 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. -### installCobiGen +### installCobiGen #### parameter * No parameters #### example @@ -138,7 +158,7 @@ installCobiGen() *** -### cobiGenJava +### cobiGenJava #### parameter 1. The path to the java file you want to generate code for: string 2. The numbers that represent the templates that CobiGen uses to generate code: int array @@ -155,7 +175,7 @@ cobiGenJava("path/to/java/file/MyEntity.java",[1,3,5,6,8]) *** -### createDevon4jProject +### createDevon4jProject #### parameter 1. The base package name #### example @@ -164,7 +184,7 @@ createDevon4jProject("com.mycustomer.myapplication") *** -### buildJava +### buildJava #### parameter 1. The project directory 2. (Optional) Indicator whether tests should be run. Default is false. @@ -173,7 +193,7 @@ buildJava("cobigenexample", true) *** -### createFile +### createFile #### parameter 1. Path of the file to be created (relative path to the workspace directory) 2. (Optional) Path of the file to get the content from. Relative to the playbook directory @@ -182,7 +202,7 @@ createFile("cobigenexample/core/src/main/java/com/example/application/cobigenexa *** -### changeFile +### changeFile #### parameter 1. Path of the file to be changed (relative path to the workspace directory) 2. @@ -223,7 +243,7 @@ The option to insert at a linenumber uses a placeholder inserted by a script and *** -### createFolder +### createFolder #### parameter 1. Path of the folder to be created, relative to the workspace directory. Subdirectories are also created. #### example @@ -231,7 +251,7 @@ createFolder("directoryPath/subDirectory") *** -### cloneRepository +### cloneRepository #### parameter 1. Path into which the repository is to be cloned, relative to workspace. 2. Git repository URL @@ -245,7 +265,7 @@ Repository will be cloned into a newly created subdirectory devonfw-tutorials. *** -### runServerJava +### runServerJava #### parameter 1. Path to the server directory within the java project. 2. Assertion information. Only needed for the console runner to check if the server was started properly. @@ -260,7 +280,7 @@ path: The URL path on which is checked if the server is running If the tutorial should be tested on the console environment, you have to specify a port. *** -### npmInstall +### npmInstall #### parameter 1. Path to the project where the dependencies from the package.json file are to be installed. 2. Json-object: Name of a package, global or local installation, or array of npm arguments @@ -276,7 +296,7 @@ will run 'npm install' in the directory 'my-thai-star/angular' *** -### dockerCompose +### dockerCompose #### parameter 1. Path to the directory where the docker-compose.yml file is located, relative to workspace. 2. Assertion information. Only needed for the console runner to check if the server was started properly. @@ -291,7 +311,7 @@ path: The URL path on which is checked if the server is running If the tutorial should be tested on the console environment, you have to specify a port. *** -### downloadFile +### downloadFile #### parameter 1. URL of the file to be downloaded. 2. Name of file. @@ -301,7 +321,7 @@ downloadFile("https://bit.ly/2BCkFa9", "file", "downloads") *** -### buildNg +### buildNg #### parameter 1. Path to the angular project relative to workspace 2. (Optional) Custom output directory. @@ -314,7 +334,7 @@ Will build the angular project to output directory testOutput. *** -### runClientNg +### runClientNg #### parameter 1. Path to the angular project from which the frontend server is to be started. 2. Assertion information. Only needed for the console runner to check if the server was started properly. @@ -329,7 +349,7 @@ path: The URL path on which is checked if the server is running If the tutorial should be tested on the console environment, you have to specify a port. *** -### nextKatacodaStep +### nextKatacodaStep #### parameter 1. The title of the step. 2. An array of json objects with files, content, or images to be rendered within the katacoda step. @@ -346,7 +366,7 @@ image: Path to an image to be displayed in the katacoda step. *** -### adaptTemplatesCobiGen +### adaptTemplatesCobiGen #### parameter * No parameters #### example @@ -354,7 +374,7 @@ adaptTemplatesCobiGen() *** -### createDevon4ngProject +### createDevon4ngProject #### parameter 1. Name of the Project. 2. Path to where the Project should be created (relative to workspace). Folder should exist. @@ -371,7 +391,7 @@ This command also works if the devonfw IDE is not installed, but then you have t *** -### addSetupScript +### addSetupScript #### parameter 1. Path of the script (Linux). Relative to the playbook directory 2. Path of the script (Windows). Relative to the playbook directory @@ -381,7 +401,7 @@ addSetupScript("assets/createProjectScript.sh", "assets/createProjectScript.ps1" *** -### openFile +### openFile #### parameter 1. Path of the file to be opened (relative path to the workspace directory)