Skip to content

Commit

Permalink
Merge pull request #45 from aservo/unify-workflows-and-upgrade-versions
Browse files Browse the repository at this point in the history
Unify GitHub action workflows, upgrade versions
  • Loading branch information
pathob authored Mar 18, 2024
2 parents 184c2b7 + a37b6e4 commit e47fef1
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 198 deletions.
62 changes: 36 additions & 26 deletions .github/workflows/ci_main.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: CI Main
name: CI

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

jobs:
package:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -35,23 +39,24 @@ jobs:
unit-tests:
needs: package

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -63,19 +68,21 @@ jobs:
integration-tests:
needs: package

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
# The integration test is not compatible with Java 17
java-version: 11
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -87,7 +94,9 @@ jobs:
deploy:
needs: [unit-tests, integration-tests]

runs-on: ubuntu-20.04
if: github.event_name == 'push' # to 'main'

runs-on: ubuntu-22.04

env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
Expand All @@ -99,16 +108,17 @@ jobs:
SIGN_ASC_IV: ${{ secrets.SIGN_ASC_IV }}

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand All @@ -126,7 +136,7 @@ jobs:
apcc:
needs: deploy

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 11
Expand All @@ -135,10 +145,10 @@ jobs:
java-version: 11

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache Maven package
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
Expand Down
115 changes: 0 additions & 115 deletions .github/workflows/ci_pull_request.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-s=.mvn/settings.xml
15 changes: 15 additions & 0 deletions .mvn/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<mirrors>
<mirror>
<id>atlassian</id>
<mirrorOf>central</mirrorOf>
<url>https://packages.atlassian.com/mvn/maven-external</url>
</mirror>
</mirrors>

</settings>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ConfAPI for Jira
================

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.aservo.atlassian/confapi-jira-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.aservo.atlassian/confapi-jira-plugin)
[![Build Status](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci_main.yaml/badge.svg)](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci_main.yaml)
[![Build Status](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci.yaml/badge.svg)](https://github.com/aservo/confapi-jira-plugin/actions/workflows/ci.yaml)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=aservo_confapi-jira-plugin&metric=coverage)](https://sonarcloud.io/dashboard?id=aservo_confapi-jira-plugin)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=aservo_confapi-jira-plugin&metric=alert_status)](https://sonarcloud.io/dashboard?id=aservo_confapi-jira-plugin)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
Expand Down
21 changes: 6 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@
<hibernate-validator.version>6.1.5.Final</hibernate-validator.version>
<javax.el-api.version>3.0.0</javax.el-api.version>
<jira-lookandfeel-plugin.version>7.13.0</jira-lookandfeel-plugin.version>
<powermock-api-easymock.version>2.0.7</powermock-api-easymock.version>
<!-- Compiler must be 8 so that the plugin can run on jIRA instances using Java 11 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -124,6 +128,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -301,20 +306,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>${powermock-api-easymock.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock-api-easymock.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down
Loading

0 comments on commit e47fef1

Please sign in to comment.