.moon/workspace.* file configures projects and services in the workspace. This file is required.
File Location
- Path:
.moon/workspace.ymlor.moon/workspace.json - Format: YAML or JSON
- Required: Yes
Configuration Options
extends
Defines one or many external .moon/workspace.*’s to extend and inherit settings from. Perfect for reusability and sharing configuration across repositories and projects.
.moon/workspace.yml
Settings will be merged recursively for blocks, with values defined in the local configuration taking precedence over those defined in the extended configuration. However, the
projects setting does not merge!projects (required)
Defines the location of all projects within the workspace. Supports either a manual map of projects (default), a list of globs in which to automatically locate projects, or both.
Using a map
When using a map, each project must be manually configured and requires a unique name as the map key..moon/workspace.yml
Using globs
Provide a list of globs to automatically locate all project folders..moon/workspace.yml
Using both map and globs
.moon/workspace.yml
.moon/workspace.yml
defaultProject
Defines the default project to focus on when no project scope is specified on the command line for task targets.
.moon/workspace.yml
codeowners
Configures code owners (CODEOWNERS) integration across the entire workspace.
globalPaths
globalPaths
Defines file patterns and their owners at the workspace-level.
.moon/workspace.yml
orderBy
orderBy
The order in which code owners are listed in the CODEOWNERS file. Accepts “file-source” (default) or “project-id”.
.moon/workspace.yml
sync
sync
Automatically generate a CODEOWNERS file by aggregating and syncing all project owners. Defaults to
false..moon/workspace.yml
constraints
Configures constraints between projects that are enforced during project graph generation.
enforceLayerRelationships
enforceLayerRelationships
Enforces allowed relationships between a project and its dependencies based on the project’s layer and stack settings.
| Layer | Description |
|---|---|
automation | An automated testing suite, like E2E, integration, or visual tests. |
application | An application of any kind. |
tool | An internal tool, CLI, one-off script, etc. |
library | A self-contained, shareable, and publishable set of code. |
scaffolding | Templates or generators for scaffolding. |
configuration | Configuration files or infrastructure. |
unknown | When not configured. |
.moon/workspace.yml
tagRelationships
tagRelationships
Enforces allowed relationships between a project and its dependencies based on the project’s tags setting.
.moon/workspace.yml
docker
Configures Docker integration for the entire workspace.
prune settings
prune settings
deleteVendorDirectories: Automatically delete vendor directories (package manager dependencies, build targets, etc) while pruning. Defaults to true..moon/workspace.yml
installToolchainDependencies: Automatically install production dependencies for all required toolchains. Defaults to true..moon/workspace.yml
scaffold settings
scaffold settings
configsPhaseGlobs: List of globs to copy additional workspace-relative files into the .moon/docker/workspace skeleton..moon/workspace.yml
experiments
Enable or disable experiments that alter core functionality.
.moon/workspace.yml
generator
Configures aspects of the template generator.
.moon/workspace.yml
hasher
Configures aspects of the smart hashing layer.
ignoreMissingPatterns
ignoreMissingPatterns
List of glob patterns to filter and ignore files when warnings are logged for missing inputs.
.moon/workspace.yml
ignorePatterns
ignorePatterns
List of glob patterns used to filter and ignore files during the inputs hashing process.
.moon/workspace.yml
optimization
optimization
Determines the optimization level when hashing content.
accuracy(default) - Use resolved value in the lockfileperformance- Use value defined in the manifest
.moon/workspace.yml
walkStrategy
walkStrategy
Defines the file system walking strategy.
glob- Walks using glob patternsvcs(default) - Calls out to VCS to extract files
.moon/workspace.yml
warnOnMissingInputs
warnOnMissingInputs
Log warnings when attempting to hash an input that does not exist. Defaults to
true..moon/workspace.yml
notifier
Configures how moon notifies and interacts with a developer or an external system.
.moon/workspace.yml
pipeline
Configures aspects of task running and the action pipeline.
autoCleanCache
autoCleanCache
Automatically cleans cached artifacts older than
cacheLifetime. Defaults to true..moon/workspace.yml
cacheLifetime
cacheLifetime
The maximum lifetime of cached artifacts. Defaults to “7 days”.
.moon/workspace.yml
installDependencies
installDependencies
Runs install actions within the pipeline before running an applicable task. Defaults to
true..moon/workspace.yml
syncProjects
syncProjects
Runs the SyncProject action within the pipeline. Defaults to
true..moon/workspace.yml
syncWorkspace
syncWorkspace
Runs the SyncWorkspace action within the pipeline. Defaults to
true..moon/workspace.yml
remote
Configures a remote service, primarily for cloud-based caching of artifacts.
.moon/workspace.yml
vcs
Configures the version control system to utilize within the workspace.
.moon/workspace.yml
versionConstraint
Defines a version requirement for the currently running moon binary.
.moon/workspace.yml
telemetry
When enabled, will check for a newer moon version and send anonymous usage data. Defaults to true.
.moon/workspace.yml
Complete Example
.moon/workspace.yml