forked from osl-incubator/makim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add working-directory to the target, group and global scope (os…
- Loading branch information
1 parent
58a6567
commit 3fbd61e
Showing
8 changed files
with
574 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Makim Features | ||
|
||
## Working Directory Feature | ||
|
||
The working-directory feature in Makim allows users to define the directory | ||
from which commands associated with specific targets or groups are executed. | ||
This provides greater flexibility and control over the execution environment. | ||
|
||
### Attribute: working-directory | ||
|
||
The `working-directory` attribute can be specified at three different | ||
scopes: global, group, and target. It allows users to set the working | ||
directory for a specific target, a group of targets, or globally. | ||
|
||
### Syntax and Scopes | ||
The working-directory attribute can be applied to three different scopes: | ||
|
||
- #### **Global Scope** | ||
Setting the global working directory impacts all targets and groups in | ||
the Makim configuration. | ||
|
||
```yaml | ||
version: 1.0 | ||
working-directory: /path/to/global/directory | ||
|
||
# ... other configuration ... | ||
``` | ||
|
||
- #### Group Scope | ||
|
||
Setting the working directory at the group scope affects all targets within | ||
that group. | ||
|
||
```yaml | ||
version: 1.0 | ||
groups: | ||
my-group: | ||
working-directory: /path/to/group/directory | ||
targets: | ||
target-1: | ||
run: | | ||
# This target will run with the working directory set to | ||
# /path/to/group/directory | ||
``` | ||
|
||
- #### Target Scope | ||
|
||
Setting the working directory at the target scope allows for fine grained | ||
control over individual targets. | ||
|
||
```yaml | ||
version: 1.0 | ||
groups: | ||
my-group: | ||
targets: | ||
my-target: | ||
working-directory: /path/to/target/directory | ||
run: | | ||
# This target will run with the working directory set to | ||
# /path/to/target/directory | ||
``` | ||
|
||
## Example | ||
|
||
```yaml | ||
version: 1.0 | ||
working-directory: /project-root | ||
groups: | ||
backend: | ||
working-directory: backend | ||
targets: | ||
build: | ||
help: Build the backend services | ||
working-directory: services | ||
run: | | ||
echo "Building backend services..." | ||
# Additional build commands specific to the backend | ||
test: | ||
help: Run backend tests | ||
working-directory: tests | ||
run: | | ||
echo "Running backend tests..." | ||
# Additional test commands specific to the backend | ||
frontend: | ||
working-directory: frontend | ||
targets: | ||
build: | ||
help: Build the frontend application | ||
run: | | ||
echo "Building frontend application..." | ||
# Additional build commands specific to the frontend | ||
test: | ||
help: Run frontend tests | ||
run: | | ||
echo "Running frontend tests..." | ||
# Additional test commands specific to the frontend | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.