Skip to content

Commit

Permalink
Merge 9690016 into 21b7be5
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbaldassari committed Dec 3, 2019
2 parents 21b7be5 + 9690016 commit 661cb72
Show file tree
Hide file tree
Showing 57 changed files with 6,763 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions dspot-web/v2-mojo/README-developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Development

## Directories

Projects being analysed by the DSpot Web UI are cloned and analysed in a dedicated directory, configured in section `work_dir` of the main configuration file of the application: `d_spot_web.conf`.

In this directory each directory is a project, with all required files and information for the project stored inside. A typical architecture looks as follows:

* `work_dir`
- `project_a`
- `src` is the git extract (clone) of the repository.
- `output` is the hierarchy generated during the dspot execution.
- `results.zip` is the compressed file of the results.
- `logs` contains the logs of all major actions:
- `dspot.log` is the log of the dspot execution.
- `git_clone.log` is the log of the `git clone` command.
- `git_pull.log` is the log of the last `git pull` command, if relevant.




qsfd
40 changes: 40 additions & 0 deletions dspot-web/v2-mojo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# DSpot Web UI

## About

This directory contains everything needed to run a demonstration web server for DSpot.


## Installation

This application uses the [Mojolicious web framework](https://mojolicious.org/) and relies on a Postgres DB to store the task management system. Results are stored on disk.

You will need to install Perl and Mojolicious, plus a few other plugins. It is good practice to use [perlbrew](https://perlbrew.pl/) to manage one's perl installation, although it is not required. Then requirements can be installed with:

```
$ cpanm Mojolicious
$ cpanm Mojolicious::Plugin::Minion Mojolicious::Plugin::Minion::Admin
$ cpanm Archive::Zip
$ cpanm Mojo::Pg
```

### Initialising the application

Setup a PostgreSQL DB for Minion:

```
postgres=# CREATE USER dspot_minion WITH PASSWORD 'pass4minion';
CREATE ROLE
postgres=# CREATE DATABASE dspot_minion OWNER dspot_minion;
CREATE DATABASE
```


## Run the application

```
$ hypnotoad script/dspot_web
```

The application is served on http://localhost:3000.
21 changes: 21 additions & 0 deletions dspot-web/v2-mojo/d_spot_web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
'secrets' => ['abc7qzverq3rcqevq0d178qzabvftq96evfab563'],

# See README.md for Posgres configuration. Only used for job management.
'conf_pg_minion' => 'postgresql://dspot_minion:pass4minion@/dspot_minion',

# URL of the host (used for emails).
'hostname' => 'http://ci4.castalia.camp:3000',

# MAVEN_HOME.
'mvn_home' => '~/Applis/apache-maven-3.6.0/',

# Command to run when invoking mvn.
'mvn_cmd' => 'mvn clean install -DskipTests',

# Command to run when invoking dspot-maven.
'dspot_cmd' => 'mvn eu.stamp-project:dspot-maven:amplify-unit-tests -Doutput-path=../output/dspot/',

# Places where all repos will be cloned (and analysed).
'workspace' => '/data/dspot_workspace/',
}

0 comments on commit 661cb72

Please sign in to comment.