Skip to content

Commit

Permalink
Merge pull request #20 from usdot-jpo-ode/release_1.4.0
Browse files Browse the repository at this point in the history
Merge release branch into master branch
  • Loading branch information
SaikrishnaBairamoni authored Jul 5, 2023
2 parents 3a454be + feae99b commit 490a264
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 20 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI
on:
pull_request:
push:

jobs:
jpo-sdw-depositor:
runs-on: ubuntu-latest
container:
image: openjdk:17-jdk-slim-buster
options: --user root
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@v3
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.2
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build
run: |
cd $GITHUB_WORKSPACE
ls -ls && pwd
mvn -e -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package
mvn -e -X clean org.jacoco:jacoco-maven-plugin:report package
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: jpo-sdw-depositor
path: /__w/jpo-sdw-depositor/jpo-sdw-depositor/target
if-no-files-found: error
sonar:
needs: [jpo-sdw-depositor]
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download code coverage results
uses: actions/download-artifact@v3
with:
name: jpo-sdw-depositor
path: home/runner/work/jpo-sdw-depositor/jpo-sdw-depositor/target
- name: Find jacoco.xml
shell: bash
run: |
find "$GITHUB_WORKSPACE" -name "jacoco.xml"
- name: Setup SonarScanner
uses: warchant/setup-sonar-scanner@v4
with:
version: 4.8.0.2856
- name: Generate sonar properties file
run: |
cat <<EOF > /tmp/sonar-scanner.properties
sonar.host.url=https://sonarcloud.io
sonar.coverage.jacoco.xmlReportPaths=/home/runner/work/jpo-sdw-depositor/jpo-sdw-depositor/home/runner/work/jpo-sdw-depositor/jpo-sdw-depositor/target/site/jacoco/jacoco.xml
sonar.java.binaries=home/runner/work/jpo-sdw-depositor/jpo-sdw-depositor/target
sonar.projectName=jpo-sdw-depositor
sonar.projectKey=usdot-jpo-ode_jpo-sdw-depositor
sonar.organization=usdot-jpo-ode-1
jpo-sdw-depositor.sonar.projectBaseDir=home/runner/work/jpo-sdw-depositor/jpo-sdw-depositor
jpo-sdw-depositor.sonar.sources=src
jpo-sdw-depositor.sonar.tests=src/test
jpo-sdw-depositor.sonar.test.inclusions=src/test/**
EOF
- name: Run SonarScanner
uses: usdot-fhwa-stol/actions/sonar-scanner@main
with:
sonar-properties-path: /tmp/sonar-scanner.properties
sonar-token: ${{ secrets.SONAR_TOKEN }}
working-dir: $GITHUB_WORKSPACE
22 changes: 22 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docker build

on:
push:
branches-ignore:
- "develop"
- "master"
- "release/*"
pull_request:
types: [opened, synchronize, reopened]

jobs:
jpo-sdw-depositor:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- run: ls -la & pwd
- name: Build
uses: docker/build-push-action@v3
27 changes: 27 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "DockerHub Build and Push"

on:
push:
branches:
- "develop"
- "master"
- "release/*"

jobs:
dockerhub-jpo-sdw-depositor:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v3
with:
push: true
tags: usdotjpoode/jpo-sdw-depositor:${{ github.ref_name }}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

45 changes: 38 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@
<name>jpo-sdw-depositor</name>

<properties>
<jmockit.version>1.49</jmockit.version>
<jmockit.version>1.49</jmockit.version>
<argLine>-javaagent:${user.home}/.m2/repository/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar</argLine>
<sonar.organization>usdot-jpo-ode-1</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<!-- JaCoCo Properties -->
<jacoco.version>0.8.8</jacoco.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.language>java</sonar.language>
</properties>

<dependencies>
Expand Down Expand Up @@ -58,7 +67,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
<version>20230227</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -84,10 +93,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M7</version>
<configuration>
<argLine>-javaagent:${user.home}/.m2/repository/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar</argLine>
<!-- <testFailureIgnore>true</testFailureIgnore> -->
<enableProcessChecker>all</enableProcessChecker>
<shutdown>exit</shutdown>
<systemPropertyVariables>
<loader.path>${loader.path}</loader.path>
<buildDirectory>${project.build.directory}</buildDirectory>
Expand All @@ -97,10 +107,31 @@
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M7</version>
</dependency>
</dependencies>
</dependencies>
</plugin>
</plugins>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 490a264

Please sign in to comment.