From 4199a6a4ea45c38b547766510286f8cea253d98c Mon Sep 17 00:00:00 2001 From: Victor Zagorodny Date: Fri, 15 Mar 2019 16:21:35 +0000 Subject: Point QA_REF for Maven project to a failing test This is done to ensure that the tool truly skips the "test" phase and thus ignores the failing test --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index ea4ecbd..9695d35 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3