Skip to content

Commit

Permalink
feat: removed both Mongo and NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jan 1, 2023
1 parent 1a5d99b commit 4aa061d
Show file tree
Hide file tree
Showing 33 changed files with 336 additions and 4,374 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/docker-build.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/docker-push.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.idea
/*.iml
/db
/server/node_modules
/target
26 changes: 10 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,31 @@ Before creating a pull request:

1. Successfully built and run all unit tests.
2. Verified that the you can run using the server application.
3. Make sure that the `./setup.sh` script works.

## Running Locally

This has been made much simpler. The server has been re-written in Java, and data is stored in `target/scans` rather
than in a Mongo database.

Install:

- Java
- Maven
- NPM

Start mongo:

```bash
docker compose up mongo
# install
mvn package
cp -v target/maven-build-scanner-jar-with-dependencies.jar $(mvn help:evaluate -Dexpression=maven.home -DforceStdout -q)/lib/ext/
```

Start UI:

```bash
cd server
npm install
npm start
# create a scan
mvn test
```

Install extension:

```bash
mvn dependency:go-offline
mvn clean package
cp -v target/maven-build-scanner-jar-with-dependencies.jar $(mvn help:evaluate -Dexpression=maven.home -DforceStdout -q)/lib/ext/
# run server
java -jar target/maven-build-scanner-jar-with-dependencies.jar
```


Open UI on <http://localhost:3000>.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ Install the following:

* Java
* Maven
* Docker

```bash
# run a mongo database
docker run -d --rm -p 27017:27017 --name mongo mongo
# run the web server
docker run -d --rm -p 3000:3000 -e MONGO_DB_HOST=host.docker.internal --name maven-build-scanner-server alexcollinsintuit/maven-build-scanner-server
# Install the Maven extension:
output="$(mvn help:evaluate -Dexpression=maven.home -DforceStdout -q)/lib/ext/maven-build-scanner-jar-with-dependencies.jar"
curl -L https://github.com/intuit/maven-build-scanner/releases/download/v1.0.0/maven-build-scanner-jar-with-dependencies.jar -o $output
Expand All @@ -47,6 +42,12 @@ curl -L https://github.com/intuit/maven-build-scanner/releases/download/v1.0.0/m
mvn install
```

```bash
# Start the server to view your results:
output="$(mvn help:evaluate -Dexpression=maven.home -DforceStdout -q)/lib/ext/maven-build-scanner-jar-with-dependencies.jar"
java -jar $output
```

This will print out a URL to the report. The report will show:

* A timeline of the build, so you can see how effective concurrency is being used.
Expand All @@ -59,6 +60,4 @@ This will print out a URL to the report. The report will show:
```bash
output="$(mvn help:evaluate -Dexpression=maven.home -DforceStdout -q)/lib/ext/maven-build-scanner-jar-with-dependencies.jar"
rm -f $output
docker rm --force maven-build-scanner-server
docker rm --force mongo
```
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<version>2.14.1</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.12.11</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -104,6 +104,11 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>com.intuit.maven.extensions.build.scanner.Server</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
Expand Down
3 changes: 0 additions & 3 deletions server/.dockerignore

This file was deleted.

32 changes: 0 additions & 32 deletions server/.eslintrc.js

This file was deleted.

6 changes: 0 additions & 6 deletions server/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions server/app.js

This file was deleted.

61 changes: 0 additions & 61 deletions server/bin/www.js

This file was deleted.

8 changes: 0 additions & 8 deletions server/models/ProjectSummary.js

This file was deleted.

11 changes: 0 additions & 11 deletions server/models/SessionProfile.js

This file was deleted.

11 changes: 0 additions & 11 deletions server/models/SessionSummary.js

This file was deleted.

Loading

0 comments on commit 4aa061d

Please sign in to comment.