Skip to content

Commit

Permalink
Issue #SC-2263 refactor: CircleCI setup and main pom file
Browse files Browse the repository at this point in the history
  • Loading branch information
maheshkumargangula committed Mar 31, 2021
1 parent 4588aa5 commit acb8b5f
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2.1
executorType: machine
jobs:
build:
docker:
- image: circleci/openjdk:14-jdk-buster-node-browsers-legacy
steps:
- checkout
- restore_cache:
key: kp-db-extensions-build-cache-{{ checksum "pom.xml" }}
- run:
name: Run build
command: |
mvn clean install -DskipTests
- save_cache:
paths:
- ~/.m2
key: kp-db-extensions-build-cache-{{ checksum "pom.xml" }}

unit-tests:
docker:
- image: circleci/openjdk:14-jdk-buster-node-browsers-legacy
- image: circleci/redis:latest
parallelism: 1
steps:
- checkout
- restore_cache:
key: kp-db-extensions-test-cache-{{ checksum "pom.xml" }}
- run:
name: Setup environment and run tests
command: |
mvn scoverage:report
JAVA_REPORT_PATHS=`find /home/circleci/project -iname jacoco.xml | awk 'BEGIN { RS = "" ; FS = "\n"; OFS = ","}{$1=$1; print $0}'`
mvn verify sonar:sonar -Dsonar.projectKey=project-sunbird_knowledge-platform-db-extensions -Dsonar.organization=project-sunbird -Dsonar.host.url=https://sonarcloud.io -Dsonar.coverage.jacoco.xmlReportPaths=${JAVA_REPORT_PATHS}
- save_cache:
paths:
- ~/.m2
key: kp-db-extensions-test-cache-{{ checksum "pom.xml" }}

workflows:
version: 2.1
build-then-test:
jobs:
- build
- unit-tests:
requires:
- build
51 changes: 51 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.sunbird</groupId>
<artifactId>knowledge-platfrom-db-extensions</artifactId>
<version>1.1</version>
<packaging>pom</packaging>
<name>sunbird knowledge platform db extensions</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.compiler.plugin>2.3.1</version.compiler.plugin>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>

<modules>
<module>neo4j-extensions</module>
</modules>

<dependencies>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>

0 comments on commit acb8b5f

Please sign in to comment.