Skip to content

Commit

Permalink
Initial commit AASPortal 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfaron committed Sep 11, 2023
1 parent 60301e5 commit e6f8af5
Show file tree
Hide file tree
Showing 596 changed files with 155,599 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
.VSCodeCounter
.nyc_output
.archive
.vscode
.angular
node_modules
reports
build
dist
55 changes: 55 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "lib",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "lib",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
},
{
"files": [
"*.ts"
],
"extends": [
"plugin:@ngrx/recommended"
]
}
]
}
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

**/bin
**/obj
./aas-server/users
./aas-server/test/users
nginx
*.user
*.log
*.~dx
node_modules
build
dist
coverage
**/users
mongo-volume

# Miscellaneous
.angular
.sass-cache/9
connect.lock
coverage
libpeerconnection.log
testem.log
typings
./aas-server-config.json
reports
.nyc_output
temp
*-audit.json
swagger.json
swagger.yaml
projects/aas-server/src/app/routes

# System files
.DS_Store
Thumbs.db
.VSCodeCounter
87 changes: 87 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
stages:
- tag
- build
- test
- deploy

tag:
image: node:18.10
stage: tag
rules:
- if: '$CI_COMMIT_MESSAGE !~ /(Release)/'
script:
- npm install @semantic-release/gitlab -D
- npm install @semantic-release/git -D
- npx semantic-release

build:
image: node:lts-alpine3.16
stage: build
rules:
- if: '$CI_COMMIT_MESSAGE =~ /(Release)/'
script:
- npm ci
- npm run build -ws

test:
image: node:lts-alpine3.16
stage: test
rules:
- if: '$CI_COMMIT_MESSAGE =~ /(Release)/'
script:
- apk add --no-cache chromium && export CHROME_BIN='/usr/bin/chromium-browser'
- npm ci
- npm run build -ws
- npm run test -ws
- npm run coverage
coverage: '/Lines \W+: (\d+\.\d+)%.*/'
artifacts:
paths:
- reports/aas-portal.xml
- reports/aas-server.xml
- reports/common.xml
reports:
junit: [reports/aas-portal.xml, reports/aas-server.xml, reports/common.xml]
coverage_report:
coverage_format: cobertura
path: reports/**/cobertura-coverage.xml

deploy_aas-server-app:
stage: deploy
only:
refs:
- development
- main
variables:
- $CI_COMMIT_MESSAGE =~ /(Release)/
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile.aas-server"
--destination "${CI_REGISTRY_IMAGE}:node.${CI_COMMIT_BRANCH}"
deploy_aas-web-app:
stage: deploy
only:
refs:
- development
- main
variables:
- $CI_COMMIT_MESSAGE =~ /(Release)/
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile.aas-portal"
--destination "${CI_REGISTRY_IMAGE}:nginx.${CI_COMMIT_BRANCH}"
17 changes: 17 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branches": ["main", "development"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/npm", {
"npmPublish": false
}],
["@semantic-release/gitlab", {
"gitlabUrl": "https://gitlab.cc-asp.fraunhofer.de/"
}],
["@semantic-release/git", {
"assets": ["package.json"],
"message": "chore(Release): ${nextRelease.version}\n\n${nextRelease.notes}"
}]
]
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
93 changes: 93 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Start aas-portal",
"type": "chrome",
"request": "launch",
"preLaunchTask": "start",
"url": "http://localhost:4200/",
"webRoot": "${workspaceFolder}"
},
{
"name": "Start aas-server",
"type": "node",
"request": "launch",
"preLaunchTask": "build-aas-server",
"program": "${workspaceFolder}/projects/aas-server/build/aas-server.js",
"cwd": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/projects/aas-server/build/**/*.js"
],
"skipFiles": [
"<node_internals>/**"
],
"env": {
"NODE_ENV": "development",
"NODE_SERVER_PORT": "1337",
"CONTENT_ROOT": "projects/aas-server/build",
"WEB_ROOT": "projects/aas-portal/dist",
"ASSETS": "projects/aas-server/src/assets",
"ENDPOINTS": "[\"file:///samples?name=Samples\"]"
}
},
{
"name": "Run aas-server",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/projects/aas-server/dist/aas-server.js",
"cwd": "${workspaceFolder}",
"skipFiles": [
"<node_internals>/**"
],
"env": {
"NODE_ENV": "development",
"NODE_SERVER_PORT": "1337",
"CONTENT_ROOT": "projects/aas-server/dist",
"WEB_ROOT": "projects/aas-portal/dist",
"ASSETS": "projects/aas-server/src/assets",
"ENDPOINTS": "[\"file:///samples?name=Samples\"]"
}
},
{
"name": "Test aas-portal",
"type": "chrome",
"request": "launch",
"preLaunchTask": "test",
"url": "http://localhost:9876/debug.html",
},
{
"name": "Test aas-lib",
"type": "chrome",
"request": "launch",
"preLaunchTask": "test-aas-lib",
"url": "http://localhost:9876/debug.html",
},
{
"name": "Test aas-server",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"test:debug",
"-w",
"aas-server"
],
},
{
"name": "Test common",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"test",
"-w",
"common"
]
}
]
}
37 changes: 37 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"cSpell.words": [
"aaslist",
"aasv3",
"angewandten",
"autohide",
"classname",
"eine",
"Einrichtung",
"Foerderung",
"Forschung",
"IDREF",
"IDREFS",
"IOSB",
"irdi",
"jszip",
"lcid",
"Lemgo",
"maxsize",
"metainformation",
"metamodel",
"nicht",
"NMTOKEN",
"NMTOKENS",
"preprocessors",
"Qualifiable",
"rechtlich",
"selbstaendige",
"submodel",
"tsoa",
"tsyringe",
"Ungroup",
"uuid",
"xmldoc",
"ZVEI"
]
}
Loading

0 comments on commit e6f8af5

Please sign in to comment.