Skip to content

Commit 5e66874

Browse files
committed
Added Company development documentation.
1 parent 0ef49da commit 5e66874

File tree

4 files changed

+92
-12
lines changed

4 files changed

+92
-12
lines changed

00-docs/src/docs/company/development.md

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,68 @@ To update this project, use `cd ..` and then `./helperCompany init` - see [Init
1414
@:@
1515

1616
## publish
17-
TODO
18-
## prepareDocs
19-
TODO
20-
## publishDocs
21-
TODO
17+
18+
Creates a new Release for the Company project (`company-camundala`) and publishes to the repository(e.g. Artifactory)
19+
20+
Usage:
21+
```
22+
./helper.scala publish <VERSION>
23+
```
24+
25+
Example:
26+
```
27+
./helper.scala publish 0.2.5
28+
```
29+
The same steps are executed as for the `publish` command in any project.
30+
See [project publish](../development/projectDev.md#publish).
31+
32+
## Company Documentation
33+
This is a semi-automatic process. This should be done either to prepare a Release or after a Release.
34+
35+
@:callout(info)
36+
At the moment this is based on using **Postman** and a **WebDAV** server.
37+
38+
So get in touch if you have a different setup.
39+
@:@
40+
41+
Do the following steps:
42+
43+
- Open the `company-camundala` project in your IDE.
44+
- Configure the Release - edit `00-docs/CONFIG.conf`.
45+
- Copy the actual Production Versions of the Release (`00-docs/VERSIONS.conf`) to `00-docs/VERSIONS_PREVIOUS.conf` from [Postman].
46+
- Copy the new Versions of the Release to `00-docs/VERSIONS.conf` from [Postman].
47+
```
48+
// START VERSIONS
49+
// Workers
50+
companyAccountingWorkerVersion = "1.8.11"
51+
...
52+
// Project
53+
companyAccountingVersion = "0.8.11"
54+
...
55+
56+
// END VERSIONS
57+
```
58+
See [Deploy the Projects]
59+
60+
### prepareDocs
61+
Prepare the company documentation.
62+
63+
```bash
64+
./helper.scala prepareDocs
65+
```
66+
@:callout(warning)
67+
Be aware that this overwrites `release.md`
68+
@:@
69+
70+
- Manually adjust the Release Notes _release.md_.
71+
- You can check the result, using the _Sbt_ command _laikaPreview_ on [localhost](http://localhost:4242/index.html)
72+
- If you change the Versions you need to reload _SBT_.
73+
74+
### publishDocs
75+
Release the company documentation.
76+
77+
```bash
78+
./helper.scala publishDocs
79+
```
80+
81+
- Check the result on your Company Documentation Page.

00-docs/src/docs/company/postman.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,28 @@ We use postman to test the APIs and deploy our projects.
33

44
## Test the APIs
55

6-
TODO
6+
In the process of publishing the APIs, we also create a Postman Collection.
7+
8+
You find the Postman Collection in the `projectBaseDir/03-api/PostmanOpenApi.yml` directory of the project.
79

810
## Deploy the Projects
911

10-
TODO
12+
This is used when you deploy the projects to the camunda Engine.
13+
14+
You need a folder in a Postman Collection. The folder name is `deploy_manifest`.
15+
16+
This folder will be run from top to bottom. So you need to:
17+
- authenticate to the [Camunda REST API](https://docs.camunda.org/rest/camunda-bpm-platform/7.22/#tag/Deployment)
18+
- configure the deployment for the local environment
19+
- call the Camunda REST API to deploy the project
20+
- test the deployment with another call to the API.
21+
22+
You need to provide the following configuration:
23+
24+
```scala
25+
case class PostmanConfig(
26+
collectionId: String,
27+
localDevEnvId: String,
28+
envApiKey: String = "POSTMAN_API_KEY"
29+
)
30+
```

04-helper/src/main/scala/camundala/helper/dev/company/CompanyScriptCreator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ case class CompanyScriptCreator()(using config: DevConfig):
2222
s"""#!/usr/bin/env -S scala shebang
2323
|$helperCompanyDoNotAdjustText
2424
|
25-
|//> using dep valiant::${config.companyName}-camundala-helper:${config.versionConfig.companyCamundalaVersion}
25+
|//> using dep ${config.companyName}::${config.companyName}-camundala-helper:${config.versionConfig.companyCamundalaVersion}
2626
|
2727
|import ${config.companyName}.camundala.helper.*
2828
|

04-helper/src/main/scala/camundala/helper/dev/deploy/DeployHelper.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import os.proc
55

66
import java.util.Date
77

8-
case class DeployHelper(deployConfig: PostmanConfig) extends Helpers:
8+
case class DeployHelper(postmanConfig: PostmanConfig) extends Helpers:
99

10-
val collectionId = deployConfig.collectionId
11-
val envId = deployConfig.localDevEnvId
12-
val postmanApiKey = sys.env(deployConfig.envApiKey)
10+
val collectionId = postmanConfig.collectionId
11+
val envId = postmanConfig.localDevEnvId
12+
val postmanApiKey = sys.env(postmanConfig.envApiKey)
1313

1414
def deploy(integrationTest: Option[String] = None): Unit =
1515
println(s"Publishing Project locally")

0 commit comments

Comments
 (0)