Skip to content

Commit

Permalink
Merge pull request Sunbird-Knowlg#2 from project-sunbird/initial-setup
Browse files Browse the repository at this point in the history
SC-2263 - neo4j-kernel-extension for transaction event generation
  • Loading branch information
maheshkumargangula authored Apr 20, 2021
2 parents 8be3eef + 1fed9f3 commit ee43cc4
Show file tree
Hide file tree
Showing 27 changed files with 2,228 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: 2.1
executorType: machine
jobs:
build:
docker:
- image: circleci/openjdk:14-jdk-buster-node-browsers-legacy
resource_class: small
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
resource_class: small
parallelism: 1
steps:
- checkout
- restore_cache:
key: kp-db-extensions-test-cache-{{ checksum "pom.xml" }}
- run:
name: Setup environment and run tests
command: |
find ./ -type f -name "log4j2.xml" -print0 | xargs -0 sed -i -e 's/\/data\/logs/\/home\/circleci\/logs/g'
find ./ -type f -name "*.java" -print0 | xargs -0 sed -i -e 's/\/data\/logs/\/home\/circleci\/logs/g'
mvn clean verify sonar:sonar -Dsonar.projectKey=project-sunbird_knowledge-platform-db-extensions -Dsonar.organization=project-sunbird -Dsonar.host.url=https://sonarcloud.io -Dsonar.surefire.reportsPath=/home/circleci/project/transaction-event-handler/target/surefire-reports
- run:
name: Save test results
command: |
mkdir -p ~/test-results/junit/
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: ~/test-results
- 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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/target/
.DS_Store
/.idea/
*.iml
*.log
neo4j-extensions/learning-graph-extension/dependency-reduced-pom.xml

5 changes: 5 additions & 0 deletions neo4j-extensions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target/
.DS_Store
/.idea/
*.iml
*.log
1 change: 1 addition & 0 deletions neo4j-extensions/custom-procedures/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
89 changes: 89 additions & 0 deletions neo4j-extensions/custom-procedures/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?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>custom-procedures</artifactId>
<version>1.1</version>

<properties>
<neo4j.version>3.0.4</neo4j.version>
</properties>

<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>${neo4j.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>org.neo4j:*</exclude>
<exclude>org.apache.lucene:*</exclude>
<exclude>org.scala-lang:*</exclude>
<exclude>org.ow2.asm:*</exclude>
<exclude>org.parboiled:*</exclude>
<exclude>net.sf.opencsv:*</exclude>
<exclude>com.googlecode.concurrentlinkedhashmap:*</exclude>
<exclude>io.netty:*</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<argLine>--illegal-access=permit</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit ee43cc4

Please sign in to comment.