-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: initial commit of cabinet-app with toolkit, esign-app and dispat…
…ch-app
- Loading branch information
Showing
110 changed files
with
30,831 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/vendor/** | ||
/dist/** | ||
/*.js | ||
/_*cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"mocha": true | ||
}, | ||
"extends": ["eslint:recommended", "plugin:jsdoc/recommended"], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-unused-vars": ["error", {"args": "none"}], | ||
"semi": [2, "always"], | ||
"jsdoc/require-jsdoc": 0, | ||
"jsdoc/require-param-description": 0, | ||
"jsdoc/require-returns": 0, | ||
"jsdoc/require-param-type": 0, | ||
"jsdoc/require-returns-description": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#### Expected behavior | ||
|
||
#### Actual behavior | ||
|
||
#### Steps to reproduce | ||
|
||
#### Output from the Javascript console in your browser | ||
<!-- You have to enable the developer tools with Ctrl + Shift + I in your browser. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 📦 Create and publish Production Docker image | ||
|
||
on: | ||
schedule: | ||
- cron: "0 10 * * *" | ||
workflow_cabinet: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Build, Test and Publish | ||
on: [push, pull_request, workflow_cabinet] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PLAYWRIGHT_BROWSERS_PATH: /tmp/_playwright_cache | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
|
||
- name: Restore playwright cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ env.PLAYWRIGHT_BROWSERS_PATH }} | ||
key: playwright-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
playwright- | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run build | ||
run: APP_ENV=development npm run build | ||
|
||
- name: Install test dependencies | ||
run: | | ||
./node_modules/.bin/playwright install-deps chromium firefox | ||
- name: Run tests | ||
run: npm run test-full | ||
|
||
- name: Run lint | ||
run: npm run lint | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/production' | ||
environment: ${{ github.ref_name }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
|
||
- name: Publish to NPM | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
# https://www.npmjs.com/settings/dbp-deploy/tokens | ||
# NPM_TOKEN needs to be a "Publish" token with 2FA disabled! | ||
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc | ||
npm ci | ||
npm run build | ||
npm run publish | ||
- name: Deploy and wait for completion | ||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/production' | ||
uses: digital-blueprint/gitlab-pipeline-trigger-action@v1 | ||
with: | ||
host: 'gitlab.tugraz.at' | ||
trigger_token: ${{ secrets.DEPLOY_TRIGGER_TOKEN }} | ||
access_token: ${{ secrets.DEPLOY_ACCESS_TOKEN }} | ||
id: '21238' | ||
ref: 'main' | ||
variables: '{"UPSTREAM_PROJECT_PATH":"dbp/cabinet/cabinet","UPSTREAM_COMMIT_BRANCH":"${{ github.ref_name }}","UPSTREAM_COMMIT_SHA":"${{ github.ref_name }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dist | ||
node_modules | ||
.idea | ||
npm-debug.log | ||
.vscode | ||
.cert | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "vendor/toolkit"] | ||
path = vendor/toolkit | ||
url = https://github.com/digital-blueprint/toolkit | ||
[submodule "vendor/signature"] | ||
path = vendor/signature | ||
url = https://github.com/digital-blueprint/esign-app | ||
[submodule "vendor/dispatch"] | ||
path = vendor/dispatch | ||
url = https://github.com/digital-blueprint/dispatch-app.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
node_modules | ||
.idea | ||
package-lock.json | ||
vendor | ||
rollup.config.js | ||
_cypress_cache | ||
scripts | ||
docker | ||
.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
legacy-peer-deps=true | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
/dist | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"printWidth": 100, | ||
"bracketSameLine": true, | ||
"htmlWhitespaceSensitivity": "ignore", | ||
"overrides": [ | ||
{ | ||
"files": "*.js", | ||
"options": { | ||
"semi": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"extends": ["config:base", "group:allNonMajor", "schedule:weekly", "docker:disable"], | ||
"ignorePresets": [":prHourlyLimit2"], | ||
"rangeStrategy": "update-lockfile", | ||
"composer": { | ||
"enabled": false | ||
}, | ||
"cloneSubmodules": true, | ||
"packageRules": [ | ||
{ | ||
"matchPackageNames": ["pdfjs-dist"], | ||
"allowedVersions": "<3" | ||
}, | ||
{ | ||
"matchPackageNames": ["@open-wc/scoped-elements"], | ||
"allowedVersions": "<3" | ||
}, | ||
{ | ||
"matchPackageNames": ["rollup-plugin-serve"], | ||
"allowedVersions": "<3" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM node:18-alpine as node | ||
RUN apk add --no-cache git | ||
WORKDIR /app | ||
COPY . /app | ||
#COPY ./dist /app/dist | ||
#COPY ./app-template /app/app-template | ||
|
||
RUN npm ci && APP_ENV=production npm run build | ||
#RUN cp /app/dist/dbp-cabinet.html /app/dist/index.html | ||
|
||
#RUN export path=; cp ./app-template public -R && cd public && \ | ||
# sed -i 's|="/|="'"$path"'/|g' index.html && \ | ||
# sed -i "s|from '/|from '$path/|g" index.html && \ | ||
# sed -i 's|@import "/|@import "'"$path"'/|g' index.html && \ | ||
# sed -i 's|: "/|: "'"$path"'/|g' index.html && \ | ||
# sed -i 's| /| '"$path"'/|g' .htaccess && \ | ||
# sed -i 's|="/|="'"$path"'/|g' browserconfig.xml || true && \ | ||
# sed -i 's|"path": "/|"path": "'"$path"'/|g' topic.metadata.json | ||
|
||
FROM httpd:latest | ||
#COPY --from=node /app/dist /usr/local/apache2/htdocs | ||
COPY --from=node /app/app-template /usr/local/apache2/htdocs | ||
COPY --from=node /app/dist /usr/local/apache2/htdocs/app |
Oops, something went wrong.