Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*/dist/
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

44 changes: 19 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
name: CI

on:
pull_request:
push:
branches:
- main
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:
workflow_call:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Run eslint
run: npm run lint
build:
name: Build
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: 22
cache: npm
- name: Install dependencies
run: npm install
- name: Attempt a build
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Lint sources
run: npm run lint
- name: Check
run: npm run format
46 changes: 0 additions & 46 deletions .github/workflows/deploy.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,5 @@ storybook-static/

.idea/
.vscode/

client/src/app/client/
15 changes: 14 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
package.json
# Library, IDE and build locations
**/node_modules/
**/coverage/
**/dist/
.vscode/
.idea/
.eslintcache/

#
# NOTE: Could ignore anything that eslint will look at since eslint also applies
# prettier.
#
**/dist
client/src/app/client/
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

15 changes: 15 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import("prettier").Config} */
const config = {
trailingComma: "es5", // es5 was the default in prettier v2
semi: true,
singleQuote: false,
printWidth: 120,

// Values used from .editorconfig:
// - printWidth == max_line_length
// - tabWidth == indent_size
// - useTabs == indent_style
// - endOfLine == end_of_line
};

export default config;
43 changes: 0 additions & 43 deletions .storybook/main.ts

This file was deleted.

42 changes: 0 additions & 42 deletions .storybook/preview.tsx

This file was deleted.

39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Builder image
FROM registry.access.redhat.com/ubi9/nodejs-22:latest AS builder

USER 1001
COPY --chown=1001 . .
RUN npm install -g npm@9
RUN npm clean-install --ignore-scripts && npm run build && npm run dist

# Runner image
FROM registry.access.redhat.com/ubi9/nodejs-22-minimal:latest

# Add ps package to allow liveness probe for k8s cluster
# Add tar package to allow copying files with kubectl scp
USER 0
RUN microdnf -y install tar procps-ng && microdnf clean all

USER 1001

LABEL name="securesign/rhtas-console-ui" \
description="RHTAS Console - User Interface" \
help="For more information visit https://github.com/securesign/" \
license="Apache License 2.0" \
maintainer="123@gmail.com" \
summary="RHTAS Console - User Interface" \
url="https://github.com/securesign/rhtas-console-ui" \
usage="podman run -p 80 -v securesign/rhtas-console-ui:latest" \
io.k8s.display-name="rhtas-console-ui" \
io.k8s.description="RHTAS Console - User Interface" \
io.openshift.expose-services="80:http" \
io.openshift.tags="operator,securesign,rhtas,ui,nodejs22" \
io.openshift.min-cpu="100m" \
io.openshift.min-memory="350Mi"

COPY --from=builder /opt/app-root/src/dist /opt/app-root/dist/

ENV DEBUG=1

WORKDIR /opt/app-root/dist
ENTRYPOINT ["./entrypoint.sh"]
Loading