diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -40,9 +40,15 @@ docker run --rm --volume "/path/to/my/project":/code license-management analyze You can run integration tests on the image like this: ```sh -docker run --rm license-management /test/test.sh +docker run --rm license-management /test/test.sh project_name git_ref ``` +where: + +- `project_name` is the project slug among the +[test projects for security products](https://gitlab.com/gitlab-org/security-products/tests/) (e.g. `java-maven`) +- `git_ref` is the Git ref to checkout and scan against (e.g. `master`) + ## Supported languages and package managers The following table shows which languages and package managers are supported. @@ -67,6 +73,24 @@ and run your custom command to setup your environment with a custom package mana registry.gitlab.com/gitlab-org/security-products/license-management:latest analyze /code ``` +## Settings + +The License Management tool can be customized with environments variables for some project types. + +| Environment variable | Project type | Function | +|----------------------|--------------|----------| +| MAVEN_CLI_OPTS | Java (Maven) | Additional arguments for the mvn executable. If not supplied, defaults to `-DskipTests`. | + + +Inject the required environment variables to the docker command using the [`--env` option flag](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file) +or its shorthand form (`--env MY_SETTING_VAR`) if the configuration comes from an external environment. + + +*Caution:* if you supply the `MAVEN_CLI_OPTS` for a Maven project, don't forget to append `-DskipTests` to save time by skipping the test suite. + +*Tip:* in case you still need to run tests during license management check, supply `MAVEN_CLI_OPTS=-DskipTests=false` +to the docker command. + ## Versioning and release process |
