Skip to content

Commit

Permalink
Create separate repository for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChristophe committed Mar 28, 2022
1 parent 52d03a4 commit b9df2af
Show file tree
Hide file tree
Showing 534 changed files with 124 additions and 94,634 deletions.
File renamed without changes.
File renamed without changes.
32 changes: 0 additions & 32 deletions .env-example

This file was deleted.

File renamed without changes.
14 changes: 2 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/service_frontend"
directory: "/"
labels:
- "frontend dependencies"
target-branch: "frontend"
target-branch: "master"
schedule:
interval: "daily"
reviewers:
- "thechristophe"

- package-ecosystem: "pip"
directory: "/service_backend"
labels:
- "backend dependencies"
target-branch: "backend"
schedule:
interval: "daily"
reviewers:
- "borjaest"
68 changes: 37 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
# Environments
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.venv*
/.env
/.env-backend

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# IDE files
.vscode/
workspace.code-workspace
.idea/
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# Database files
*.db
*.db.*
# misc
.DS_Store
*.pem

# Secret files
oidc_secret.txt
cookie_secret.txt
nginx_api_credentials.txt
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Compiled documentation
docs/build/
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

backups/*
# vercel
.vercel

# typescript
*.tsbuildinfo

/docs

# IDE files
/.idea/
File renamed without changes.
34 changes: 8 additions & 26 deletions .sqa/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ config:
deploy_template: '.sqa/docker-compose.yml'
# project_repos:
# eosc-perf:
# repo: 'https://github.com/EOSC-synergy/eosc-perf.git'
# branch: 'backend'
# repo: 'https://github.com/EOSC-synergy/eosc-perf-frontend.git'
# branch: 'master'

environment:
JPL_DOCKERFORCEBUILD: 'true'
Expand All @@ -13,47 +13,29 @@ environment:
sqa_criteria:
qc_style:
repos:
eosc-perf-backend:
container: perf-backend-testing
tox:
tox_file: /app/tox.ini
testenv:
- stylecheck
eosc-perf-frontend:
container: perf-frontend-testing
commands:
- bash -c "cd /perf-testing/service_frontend && npm ci --audit=false && ./node_modules/.bin/eslint ./ -f checkstyle -o eslint-codestyle.xml"
commands:
- bash -c "cd /perf-testing-frontend/ && npm ci --audit=false && ./node_modules/.bin/eslint ./ -f checkstyle -o eslint-codestyle.xml"

qc_functional:
repos:
eosc-perf-backend:
container: perf-backend-testing
tox:
tox_file: /app/tox.ini
testenv:
- functional
eosc-perf-frontend:
container: perf-frontend-testing
commands:
- bash -c "cd /perf-testing/service_frontend && npm run test:coverage"
- bash -c "cd /perf-testing-frontend/ && npm run test:coverage"

qc_security:
repos:
eosc-perf-backend:
container: perf-backend-testing
tox:
tox_file: /app/tox.ini
testenv:
- bandit
eosc-perf-frontend:
container: perf-frontend-testing
commands:
# (optional) pipefail: set the exit status $? to the exit code of the last program to exit non-zero
# npm audit --json : to produce json output
# transform-audit.js: parse the output for Warnings-NG plugin
# npm audit --audit-level=high: fail an audit if a vulnerability of a level 'high' or higher (may result in exit 1 + printout)
- bash -c "cd /perf-testing/service_frontend && npm config set production=true &&
npm audit --json | node ../.sqa/transform-audit.js > npm-audit.json
&& npm audit --audit-level=high"
- bash -c "cd /perf-testing-frontend/ && npm config set production=true &&
npm audit --json | node ../.sqa/transform-audit.js > npm-audit.json
&& npm audit --audit-level=high"

timeout: 900
27 changes: 3 additions & 24 deletions .sqa/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
version: "3.7"

services:

perf-backend-testing:
build:
context: ./service_backend
target: production
dockerfile: Dockerfile.cicd
args:
INSTALL_PYTHON_VERSION: 3.8
USER_ID: ${jenkins_user_id}
USER_GROUP: ${jenkins_user_group}
environment:
FLASK_ENV: production
BACKEND_URL: /api/v1
FLASK_APP: autoapp.py
volumes:
- type: bind
source: ./service_backend
target: /app
# to avoid shutting down the container
command: ["tail","-f","/dev/null"]

perf-frontend-testing:
build:
context: ./service_frontend
context: .
dockerfile: Dockerfile.cicd
args:
USER_ID: ${jenkins_user_id}
Expand All @@ -39,6 +18,6 @@ services:

perf-frontend:
build:
context: "./service_frontend"
context: "."
dockerfile: "Dockerfile"
image: "perf/perf-frontend"
image: "perf/perf-frontend"
File renamed without changes.
File renamed without changes.
32 changes: 4 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,52 +27,28 @@ pipeline {
}
post {
always {
// BE: publish stylecheck (flake8) report:
recordIssues(
enabledForFailure: true, aggregatingResults: true,
tool: pyLint(pattern: 'service_backend/tmp/flake8.log',
reportEncoding:'UTF-8',
name: 'BE - CheckStyle')
)

// BE: publish coverage report (only BE, works??):
cobertura(
coberturaReportFile: 'service_backend/tmp/be-coverage.xml',
enableNewApi: true,
failUnhealthy: false, failUnstable: false, onlyStable: false
)

// BE: publish bandit report:
// according to https://vdwaa.nl/openstack-bandit-jenkins-integration.html
// XML output of bandit can be parsed as JUnit
recordIssues(
enabledForFailure: true, aggregatingResults: true,
tool: junitParser(pattern: 'service_backend/tmp/bandit.xml',
reportEncoding:'UTF-8',
name: 'BE - Bandit')
)
// FE: publish codestyle:
// replace path in the docker container with relative path
sh "sed -i 's/\\/perf-testing/./gi' service_frontend/eslint-codestyle.xml"
sh "sed -i 's/\\/perf-testing-frontend/./gi' eslint-codestyle.xml"
recordIssues(
enabledForFailure: true, aggregatingResults: true,
tool: checkStyle(pattern: 'service_frontend/eslint-codestyle.xml',
tool: checkStyle(pattern: 'eslint-codestyle.xml',
reportEncoding:'UTF-8',
name: 'FE - CheckStyle')
)

// publish BE+FE coverage reports:
// service_backend/tmp/be-coverage.xml +
// service_frontend/coverage/fe-cobertura-coverage.xml:
sh "cd service_frontend/coverage && mv cobertura-coverage.xml fe-cobertura-coverage.xml && cd -"
sh "cd coverage && mv cobertura-coverage.xml fe-cobertura-coverage.xml && cd -"
publishCoverage(adapters: [coberturaAdapter(path: '**/*-coverage.xml')],
tag: 'Coverage',
failUnhealthy: false, failUnstable: false
)
// FE: publish the output of npm audit:
recordIssues(
enabledForFailure: true, aggregatingResults: true,
tool: issues(name: 'FE - NPM Audit', pattern:'service_frontend/npm-audit.json'),
tool: issues(name: 'FE - NPM Audit', pattern:'npm-audit.json'),
)
}
cleanup {
Expand Down
49 changes: 0 additions & 49 deletions README.md

This file was deleted.

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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@ import {
PointElement,
Title,
Tooltip,
TooltipItem,
TooltipItem
} from 'chart.js';
import { Suggestion } from '../jsonSchema';
import {
DataPoint,
DataPointCollection,
generateDataPoints,
RejectedResult,
XAxis,
YAxis,
} from './helpers';
import { DataPoint, DataPointCollection, generateDataPoints, RejectedResult, XAxis, YAxis } from './helpers';

ChartJS.register(
CategoryScale,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ import { Benchmark, Result, Site } from 'model';
import { Alert, Badge, Col, Form, Row } from 'react-bootstrap';
import { Ordered } from 'components/ordered';
import { Suggestion } from '../jsonSchema';
import {
DataPoint,
DataPointCollection,
generateDataPoints,
RejectedResult,
XAxis,
YAxis,
} from './helpers';
import { DataPoint, DataPointCollection, generateDataPoints, RejectedResult, XAxis, YAxis } from './helpers';

import ReactEChartsCore from 'echarts-for-react/lib/core';
import * as echarts from 'echarts/core';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CustomColumn,
SiteColumn,
SiteFlavorColumn,
TagsColumn,
TagsColumn
} from 'components/resultSearch/columns';
import { ResultCallbacks } from 'components/resultSearch/resultCallbacks';
import { ChevronDown, ChevronUp, Pencil } from 'react-bootstrap-icons';
Expand Down
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion data/dummy.txt

This file was deleted.

Loading

0 comments on commit b9df2af

Please sign in to comment.