|
1 | | -# gitlab-release-maven-plugin |
| 1 | +# gitlab-release-maven-plugin |
| 2 | + |
| 3 | +[](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.avides.gitlab%22%20AND%20a%3A%22gitlab-release-maven-plugin%22) |
| 4 | +[](https://www.codacy.com/app/avides-builds/gitlab-release-maven-plugin) |
| 5 | +[](https://www.codacy.com/app/avides-builds/gitlab-release-maven-plugin) |
| 6 | +[](https://travis-ci.org/avides/gitlab-release-maven-plugin) |
| 7 | + |
| 8 | +The gitlab-release-maven-plugin creates tags on your GitLab Repository by your project version in your maven build. |
| 9 | + |
| 10 | +## Plugin |
| 11 | + |
| 12 | +### With required configuration options |
| 13 | +```xml |
| 14 | +<plugin> |
| 15 | + <groupId>com.avides.gitlab</groupId> |
| 16 | + <artifactId>gitlab-release-maven-plugin</artifactId> |
| 17 | + <version>2.2.0-RELEASE</version> |
| 18 | +</plugin> |
| 19 | +``` |
| 20 | + |
| 21 | +### With all options |
| 22 | +```xml |
| 23 | +<plugin> |
| 24 | + <groupId>com.avides.gitlab</groupId> |
| 25 | + <artifactId>gitlab-release-maven-plugin</artifactId> |
| 26 | + <version>2.2.0-RELEASE</version> |
| 27 | + <configuration> |
| 28 | + <gitlabHost>http://your-custom-gitlab-domain/</gitlabHost> |
| 29 | + <gitlabAccessToken>GITLAB_ACCESS_TOKEN</gitlabAccessToken> |
| 30 | + <gitlabRepositoryNamespace>repository-namespace</gitlabRepositoryNamespace> |
| 31 | + <gitlabRepositoryName>project-name</gitlabRepositoryName> |
| 32 | + <projectVersion>0.1.0-RELEASE</projectVersion> |
| 33 | + <gitlabPreReleaseDesired>true</gitlabPreReleaseDesired> |
| 34 | + <gitlabBranchName>YOUR_DEPLOYMENT_BRANCH</gitlabBranchName> |
| 35 | + </configuration> |
| 36 | +</plugin> |
| 37 | +``` |
| 38 | + |
| 39 | +## Configuration options |
| 40 | +| Property | Description | Required | |
| 41 | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------- | |
| 42 | +| gitlabHost | Your custom GitLab URL (default: `https://gitlab.com`) | No | |
| 43 | +| gitlabAccessToken | Your User GitLab Access Token (Pass this token directly in the execute command, `-DgitlabAccessToken=ACCESS_TOKEN`) | Yes | |
| 44 | +| gitlabRepositoryNamespace | Repository namespace (If `project.scm.url` is set in your pom, it will be resolved automatically.) | No | |
| 45 | +| gitlabRepositoryName | Repository name (default: `${project.name}`) | No | |
| 46 | +| projectVersion | Project version and finally the Release-Tag name (default: `${project.version}`) | No | |
| 47 | +| gitlabPreReleaseDesired | If `true`, PRE-Releases will be create a Release-Tag, otherwise not (default: `false`) | No | |
| 48 | +| gitlabBranchName | Your deployment branch (default: `master`) | No | |
| 49 | + |
| 50 | +## Usage |
| 51 | +```bash |
| 52 | +mvn gitlab-release:release -DgitlabAccessToken=ACCESS_TOKEN |
| 53 | +``` |
0 commit comments