Layered configuration in the Moderne CLI
One big challenge that comes with building LSTs for many repositories on many machines is configuration. What arguments do you need to build each repository? Are there Maven specific ones? Gradle specific ones? Do they change depending on the group of projects? How do you share these configurations with new people on the team?
JDK configuration in the Moderne CLI
By default, the Moderne CLI will try and detect what version of Java applies to a specific project and where the JDK is for said version. It will then pick the most optimal one when it goes to build each project.
How to install and configure the Moderne CLI in an air-gapped environment
If your company has restrictions on what you can access via the internet, you'll need to download and configure the Moderne CLI in a special way. This doc will walk you through everything you need to know for this. By the end, you will have the CLI downloaded and configured in your air-gapped environment.
How to execute user-supplied commands on a list of repositories
The Moderne CLI allows users to execute arbitrary commands on a list of repositories using the mod exec command. For example, the following CLI command will execute git status on each repository it finds under the current directory:
How to clone and synchronize organizations
If you've configured organizations in Moderne, you may find it useful to use the CLI to clone or synchronize them to your local machine.
On-prem source code management (SCM) server configuration
In order for Moderne to correctly map repository clone URLs to the right origin and path you will need to configure the base URL(s) for your SCM server. For SaaS SCM services like GitHub, GitLab, Bitbucket (cloud) and AzureDevOps – no extra configuration is required. For on-prem SCM servers, though, you will need to provide Moderne with additional information. Specifically the type, base URL, and any alternate URLs that are used to access the server.
Configuring build steps
Out-of-the-box behavior without explicit configuration
Build partitions
Partitions allow for splitting a large repository into multiple LSTs. They are designed for large monorepos for which building an LST could trigger tens of thousands of build steps and take hours to days to run. In these scenarios, we are able to divide the repository into multiple named partitions which each define their own set of build steps.
Bazel support
Moderne CLI interacts with the Bazel build tool to parse repositories into the Lossless Semantic Tree (LST). Bazel build files are discovered automatically by mod build in the same way other build tools like Maven or Gradle are discovered.
How to update to the latest version of Moderne CLI
To update the CLI to a newer version, you will need to download the latest version and delete your old version.
SSH keys with passphrases
If you need to enter an SSH passphrase when you clone repositories, please follow the below instructions so that the Moderne CLI will work correctly for you.