Skip to content

Commit df168a4

Browse files
authored
Fixing maven.yml workflow (#31)
* Updating workflow * Updated changelog.md and pom.xml * Added dependency to coveralls maven plugin * Update README for 3.0.0: requirements, changelog, and installation link
1 parent 746865a commit df168a4

4 files changed

Lines changed: 37 additions & 22 deletions

File tree

.github/workflows/maven.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
name: maven
55

6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
6+
on: [push, workflow_dispatch, pull_request]
117

128
jobs:
139
build:
@@ -20,13 +16,23 @@ jobs:
2016
uses: actions/setup-java@v1
2117
with:
2218
java-version: 17
19+
- name: Cache local Maven repository
20+
uses: actions/cache@v4
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: |
25+
${{ runner.os }}-maven-
2326
- name: Build with Maven
2427
run: mvn -B package --file pom.xml
25-
- name: Coveralls Maven plugin
28+
- name: "Report: Coverage via coveralls.io"
29+
run: |
30+
export CI_BRANCH=${BRANCH_NAME_OR_REF#refs/heads/}
31+
export CI_PULL_REQUEST=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
32+
mvn coveralls:report -DrepoToken=$COVERALLS_SECRET
2633
env:
27-
CI_NAME: Github
34+
CI_NAME: github
35+
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
2836
CI_BUILD_NUMBER: ${{ github.run_id }}
2937
CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks
30-
CI_BRANCH: ${{ steps.refs.outputs.branch_name }}
31-
CI_PULL_REQUEST: ${{ steps.refs.outputs.pr_number }}
32-
run: mvn coveralls:report -D repoToken=${{ secrets.COVERALLS_TOKEN }}
38+
COVERALLS_SECRET: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.0.1
2+
3+
- Update maven.yml to make it work
4+
- Update README.md to correlate with current changes
5+
16
## 3.0.0
27

38
- upgrade to Bitbucket Server 9.4.17

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
![](https://github.com/infobip/jira-version-generator/workflows/maven/badge.svg)
44
[![Coverage Status](https://coveralls.io/repos/infobip/jira-version-generator/badge.png?branch=master)](https://coveralls.io/r/infobip/jira-version-generator?branch=master)
5-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.infobip/jira-version-generator/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.infobip/jira-version-generator)
65

76
[Bitbucket Server](https://www.atlassian.com/software/bitbucket/server) [(post receive hook) plugin](https://confluence.atlassian.com/display/STASH/Using+repository+hooks#Usingrepositoryhooks-Post-receivehooks) that generates [Jira](https://www.atlassian.com/software/jira) version and links issues to the version.
87

98
## Contents
109

11-
1. [News](#News)
10+
1. [Changelog](#Changelog)
1211
2. [Requirements](#Requirements)
1312
3. [Installation](#Installation)
1413
4. [Usage](#Usage)
@@ -21,18 +20,16 @@
2120
8. [Credits](#Credits)
2221
9. [License](#License)
2322

24-
## <a name="News"></a> News
23+
## <a name="Changelog"></a> Changelog
2524

26-
### 2.0.1
27-
28-
Upgrade to Bitbucket Server 6.5.1.
29-
30-
For previous changes see the [changelog](https://github.com/infobip/jira-version-generator/blob/master/CHANGELOG.md).
25+
For changes check the [changelog](CHANGELOG.md).
3126

3227
## <a name="Requirements"></a> Requirements:
3328

34-
1. Bitbucket Server has an application link with a Jira instance.
35-
2. User that commits the release commit exists on Jira and has rights to create the version and modify issues on the project.
29+
1. Bitbucket Server 9.4.17+
30+
2. Java 17+
31+
3. Bitbucket Server has an application link with a Jira instance.
32+
4. User that commits the release commit exists on Jira and has rights to create the version and modify issues on the project.
3633

3734
By default, each commit on the repository is checked against the [Maven Release Plugin](http://maven.apache.org/maven-release/maven-release-plugin/) release commit message pattern: `\[maven-release-plugin\] prepare release repositoryName-(?<version>.*)`.
3835
This behavior can be changed by changing the [release commit version pattern](#ReleaseCommitVersionPattern).
@@ -48,7 +45,7 @@ If the version already exists on Jira, the version will not be created and issue
4845

4946
## <a name="Installation"></a> Installation:
5047

51-
Simply download latest jar from the Maven Central [here](https://maven-badges.herokuapp.com/maven-central/com.infobip/jira-version-generator) and install it on your Bitbucket Server instance.
48+
Download the latest jar from [GitHub Releases](https://github.com/infobip/jira-version-generator/releases) and install it on your Bitbucket Server instance.
5249

5350
## <a name="Usage"></a> Usage:
5451

pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.infobip</groupId>
77
<artifactId>jira-version-generator</artifactId>
8-
<version>3.0.0</version>
8+
<version>3.0.1</version>
99
<packaging>atlassian-plugin</packaging>
1010

1111
<name>Jira Version Generator</name>
@@ -257,6 +257,13 @@
257257
<groupId>org.eluder.coveralls</groupId>
258258
<artifactId>coveralls-maven-plugin</artifactId>
259259
<version>${coveralls-maven-plugin.version}</version>
260+
<dependencies>
261+
<dependency>
262+
<groupId>javax.xml.bind</groupId>
263+
<artifactId>jaxb-api</artifactId>
264+
<version>2.3.1</version>
265+
</dependency>
266+
</dependencies>
260267
</plugin>
261268
</plugins>
262269
</build>

0 commit comments

Comments
 (0)