Skip to content

Commit

Permalink
Implement GitHub worklows
Browse files Browse the repository at this point in the history
  • Loading branch information
pathob committed Jun 19, 2024
1 parent d253a3d commit 225ef03
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 21 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

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

jobs:
package:

runs-on: ubuntu-22.04

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

- name: Checkout code
uses: actions/checkout@v4

- name: Cache Maven repository
uses: actions/cache@v4
with:
path: ~/.m2
key: bootstrapi-${{ hashFiles('**/pom.xml') }}
restore-keys: bootstrapi

- name: Build Maven packages
run: mvn -B package -DskipTests

unit-tests:
needs: package

runs-on: ubuntu-22.04

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

- name: Checkout code
uses: actions/checkout@v4

- name: Cache Maven repository
uses: actions/cache@v4
with:
path: ~/.m2
key: bootstrapi-${{ hashFiles('**/pom.xml') }}
restore-keys: bootstrapi

- name: Run unit tests
run: mvn -B test

integration-tests:
needs: unit-tests

runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
product:
- confluence
- crowd
- jira

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

- name: Checkout code
uses: actions/checkout@v4

- name: Cache Maven repository
uses: actions/cache@v4
with:
path: ~/.m2
key: bootstrapi-${{ hashFiles('**/pom.xml') }}
restore-keys: bootstrapi

- name: Install Maven packages
run: mvn -B install -DskipTests

- name: Run integration tests
run: mvn -B -pl ${{ matrix.product }} ${{ matrix.product }}:integration-test
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>
1 change: 1 addition & 0 deletions commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<groupId>com.deftdevs</groupId>
<artifactId>bootstrapi-parent</artifactId>
<version>0.7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>bootstrapi-commons</artifactId>
Expand Down
12 changes: 2 additions & 10 deletions confluence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<groupId>com.deftdevs</groupId>
<artifactId>bootstrapi-parent</artifactId>
<version>0.7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>bootstrapi-confluence-plugin</artifactId>
Expand Down Expand Up @@ -46,7 +47,6 @@
<confluence.data.version>8.5.6</confluence.data.version>
<!-- other properties -->
<ajp.port>8109</ajp.port>
<amps.version>8.12.4</amps.version>
<atlassian.gadgets.version>8.1.4</atlassian.gadgets.version>
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<atlassian.spring.scanner.version>2.2.4</atlassian.spring.scanner.version>
Expand Down Expand Up @@ -317,7 +317,7 @@
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>confluence-maven-plugin</artifactId>
<version>${amps.version}</version>
<version>${atlassian.amps.version}</version>
<extensions>true</extensions>
<configuration>
<ajpPort>${ajp.port}</ajpPort>
Expand All @@ -339,14 +339,6 @@
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-bundled-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
4 changes: 2 additions & 2 deletions crowd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<groupId>com.deftdevs</groupId>
<artifactId>bootstrapi-parent</artifactId>
<version>0.7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>bootstrapi-crowd-plugin</artifactId>
Expand Down Expand Up @@ -44,7 +45,6 @@
<crowd.version>5.1.3</crowd.version>
<crowd.data.version>4.4.0</crowd.data.version>
<ajp.port>8409</ajp.port>
<amps.version>8.0.2</amps.version>
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<atlassian.spring.scanner.version>2.1.5</atlassian.spring.scanner.version>
<plugin.testrunner.version>2.0.1</plugin.testrunner.version>
Expand Down Expand Up @@ -258,7 +258,7 @@
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>crowd-maven-plugin</artifactId>
<version>${amps.version}</version>
<version>${atlassian.amps.version}</version>
<extensions>true</extensions>
<configuration>
<ajpPort>${ajp.port}</ajpPort>
Expand Down
10 changes: 1 addition & 9 deletions jira/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<groupId>com.deftdevs</groupId>
<artifactId>bootstrapi-parent</artifactId>
<version>0.7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>bootstrapi-jira-plugin</artifactId>
Expand Down Expand Up @@ -39,7 +40,6 @@
<jira.data.version>9.12.5</jira.data.version>
<!-- other properties -->
<atlassian.ajp.port>8209</atlassian.ajp.port>
<atlassian.amps.version>8.12.4</atlassian.amps.version>
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<atlassian.spring.scanner.version>2.2.4</atlassian.spring.scanner.version>
<glassfish.el-api.version>2.2.4</glassfish.el-api.version>
Expand Down Expand Up @@ -331,14 +331,6 @@
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-bundled-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- other properties -->
<atlassian.amps.version>8.12.4</atlassian.amps.version>
<jacoco.plugin.version>0.8.5</jacoco.plugin.version>
<javax-ws-rs-api.version>2.0</javax-ws-rs-api.version>
<openapi-generator.version>7.3.0</openapi-generator.version>
Expand Down

0 comments on commit 225ef03

Please # to comment.