Skip to content
This repository was archived by the owner on Mar 27, 2020. It is now read-only.

Commit 4e6bdf5

Browse files
Henrik Adamskijulian-eggers
authored andcommitted
IT-208 - Add config for github (#1)
* IT-208 - Add config for github
1 parent 1fc348b commit 4e6bdf5

File tree

7 files changed

+1443
-1
lines changed

7 files changed

+1443
-1
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/target/
2+
/.settings/
3+
/.classpath
4+
/.project
5+
/.idea
6+
*.iml

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sudo: required
2+
3+
services:
4+
- docker
5+
6+
language: java
7+
8+
jdk:
9+
- oraclejdk8
10+
- oraclejdk11
11+
12+
cache:
13+
directories:
14+
- $HOME/.m2
15+
16+
install: mvn verify -Dgpg.skip=true
17+
18+
before_install:
19+
- wget -O ~/codacy-coverage-reporter-assembly.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/4.0.5/codacy-coverage-reporter-4.0.5-assembly.jar
20+
21+
after_success:
22+
- java -jar ~/codacy-coverage-reporter-assembly.jar report -l Java -r target/site/jacoco/jacoco.xml

Jenkinsfile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
pipeline
2+
{
3+
agent any
4+
5+
environment
6+
{
7+
deploymentBranch = "master"
8+
mavenExecutable = "mvn-jdk8"
9+
}
10+
11+
triggers
12+
{
13+
cron('H H(0-5) * * *')
14+
pollSCM('@hourly')
15+
}
16+
17+
options
18+
{
19+
buildDiscarder(logRotator(numToKeepStr:'10'))
20+
disableConcurrentBuilds()
21+
skipStagesAfterUnstable()
22+
timeout(time: 1, unit: 'HOURS')
23+
}
24+
25+
stages
26+
{
27+
stage('Compile')
28+
{
29+
steps
30+
{
31+
sh '${mavenExecutable} clean compile test-compile'
32+
}
33+
}
34+
35+
stage('Unit-Tests')
36+
{
37+
steps
38+
{
39+
sh '${mavenExecutable} surefire:test'
40+
}
41+
}
42+
43+
stage('Integration-Tests')
44+
{
45+
when { branch "${env.deploymentBranch}" }
46+
47+
steps
48+
{
49+
sh '${mavenExecutable} failsafe:integration-test failsafe:verify'
50+
}
51+
}
52+
53+
stage('Release')
54+
{
55+
when { branch "${env.deploymentBranch}" }
56+
57+
steps
58+
{
59+
sh '${mavenExecutable} clean deploy -Dmaven.test.skip=true'
60+
}
61+
}
62+
63+
stage('SonarQube')
64+
{
65+
when { branch "${env.deploymentBranch}" }
66+
67+
steps
68+
{
69+
sh '${mavenExecutable} clean verify sonar:sonar -Dsonar.host.url=http://sonarqube.avidesmedia/'
70+
}
71+
}
72+
}
73+
}

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,53 @@
1-
# gitlab-release-maven-plugin
1+
# gitlab-release-maven-plugin
2+
3+
[![Maven Central](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/com/avides/gitlab/gitlab-release-maven-plugin/maven-metadata.xml.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.avides.gitlab%22%20AND%20a%3A%22gitlab-release-maven-plugin%22)
4+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d7eca0c7e4684857ab166dcbcf2b75b5)](https://www.codacy.com/app/avides-builds/gitlab-release-maven-plugin)
5+
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/d7eca0c7e4684857ab166dcbcf2b75b5)](https://www.codacy.com/app/avides-builds/gitlab-release-maven-plugin)
6+
[![Build Status](https://travis-ci.org/avides/gitlab-release-maven-plugin.svg?branch=master)](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

Comments
 (0)