Skip to content

Commit 22b7d85

Browse files
committed
2 parents a17f25c + da3e9aa commit 22b7d85

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Various GitLab hooks. For more information please read a series of articles on C
66
- [Part II: GitLab workflow](https://community.intersystems.com/post/continuous-delivery-your-intersystems-solution-using-gitlab-part-ii-gitlab-workflow)
77
- [Part III: GitLab installation and configuration](https://community.intersystems.com/post/continuous-delivery-your-intersystems-solution-using-gitlab-part-iii-gitlab-installation-and)
88
- [Part IV: CD configuration](https://community.intersystems.com/post/continuous-delivery-your-intersystems-solution-using-gitlab-part-iv-cd-configuration)
9+
- [Part V: Why containers?](https://community.intersystems.com/post/continuous-delivery-your-intersystems-solution-using-gitlab-part-v-why-containers)
910

1011
# Installation
1112

@@ -24,8 +25,36 @@ Available settings:
2425
| Setting | Sample Value | Description |
2526
|---------|------------------------|-------------------------------------------------------------------------------------------------|
2627
| ext | $lb("xml") | List of files extensions to load and compile. |
27-
| tests | MyApp/Tests | Path relative from the repo root to the test suite. |
28+
| tests | MyApp/Tests | Path relative from the repo root to the test suite. |
2829
| commit | | Do not set. Current commit hash. |
29-
| init | Package.Class:Method | Code called before loading files. |
30+
| hooks | MyApp/Hooks/ | Path relative from the repo root to the hooks. |
3031
| delete | Package.Class:Method | Code called to delete files from project. Should accept one argument - list of files to delete. |
3132
| url | http://127.0.0.1:57772 | Server root. |
33+
34+
35+
## Hooks
36+
37+
There are two types of hooks available:
38+
39+
- **Global** - executed each time the CI is run. Extend `isc.git.hook.Global`.
40+
- **Local** - executed once. Extend `isc.git.hook.Local`.
41+
42+
Hooks of the same type are executed in collation order. To create a hook extend either or `isc.git.hook.Global` or `isc.git.hook.Local` and implement `onBefore` and/or `onAfter` methods.
43+
44+
### Execution order:
45+
46+
1. Global hooks, before.
47+
2. Local hooks, before.
48+
3. Code load and compile.
49+
4. Local hooks, after.
50+
5. Global hooks, after.
51+
52+
## Tips & Tricks
53+
54+
Various tricks for GitLab CI.
55+
56+
### Namespaces
57+
58+
Use `CI_COMMIT_REF_NAME` (resolves to branch) environment variable to use several namespaces on one server.
59+
60+
I.e. `csession ensemble -U ${CI_COMMIT_REF_NAME} "##class(isc.git.GitLab).loadDiff()"`

0 commit comments

Comments
 (0)