Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 0 additions & 29 deletions .github/workflows/Lint.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and push artifacts

on:
push:
tags:
- 'v*'

jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Artifactory Login
uses: MapColonies/shared-workflows/actions/artifactory-login@artifactory-login-v1.0.0
with:
registry: ${{ secrets.ACR_URL }}
username: ${{ secrets.ACR_PUSH_USER }}
password: ${{ secrets.ACR_PUSH_TOKEN }}

- name: Build Docker Image
id: build
uses: MapColonies/shared-workflows/actions/build-docker@build-docker-v1.1.0
with:
domain: app
registry: ${{ secrets.ACR_URL }}

- name: Push Docker Image
uses: MapColonies/shared-workflows/actions/push-docker@push-docker-v1.0.1
with:
image_name: ${{ steps.build.outputs.docker_image_full_name }}
image_tag: ${{ steps.build.outputs.docker_image_tag }}

- name: Build and Push Helm Chart
uses: MapColonies/shared-workflows/actions/build-and-push-helm@build-and-push-helm-v1.0.1
with:
context: ./helm
domain: app
registry: ${{ secrets.ACR_URL }}

- name: Update Artifacts File- Docker
uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1
with:
domain: app
artifact_name: ${{ github.event.repository.name }}
artifact_tag: ${{ github.ref_name }}
type: docker
registry: ${{ secrets.ACR_URL }}
github_token: ${{ secrets.GH_PAT }}

- name: Update Artifacts File- Helm
uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1
with:
domain: app
artifact_name: ${{ github.event.repository.name }}
artifact_tag: ${{ github.ref_name }}
type: helm
registry: ${{ secrets.ACR_URL }}
github_token: ${{ secrets.GH_PAT }}
31 changes: 0 additions & 31 deletions .github/workflows/build_and_push.yaml

This file was deleted.

44 changes: 32 additions & 12 deletions .github/workflows/Main.yaml → .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
name: CI
name: pull_request

on: [pull_request]

jobs:
helm-lint:
name: Run Helm lint Check
runs-on: ubuntu-latest
steps:
- name: Check out TS Project Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: helm-lint
uses: MapColonies/shared-workflows/actions/helm-lint@helm-lint-v1

build_and_test:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.13.x]
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- name: Install yarn
Expand All @@ -26,20 +40,26 @@ jobs:
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install --no-install-recommends yarn

- name: Install dependecies
run: yarn
- name: Lint
run: yarn run eslint:check
uses: wearerequired/lint-action@v2
with:
tsc: true
eslint: true
eslint_extensions: js,jsx,ts,tsx
prettier: true
prettier_dir: src
- name: Test
run: yarn test

security:
build_docker_image:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v5
- name: Build Docker image
uses: docker/build-push-action@v6
with:
push: false
7 changes: 4 additions & 3 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.GH_PAT }}
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
.vscode/settings.json
schemas/*.json
*.json
helm
confd
public
CHANGELOG.md
src/discrete-layer/models
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.3.5"
}
}
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ React app created with typescript that defines manages and displays discrete lay

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app)


## Installation

Install deps with yarn
Expand All @@ -20,15 +19,15 @@ yarn confd
```

To generate:
public/env-config.js <- For env variables
public/index.html <- For PUBLIC_URL, to support non-root URL
public/env-config.js <- For env variables
public/index.html <- For PUBLIC_URL, to support non-root URL

To use app env variables inside a docker, run the following command

```bash
node ./confd/generate-config.js --environment production --indocker
```

Start app

```bash
Expand All @@ -45,7 +44,7 @@ To run tests, run the following command
yarn test
```

It will run in an interactive mode
It will run in an interactive mode

See [running tests](https://facebook.github.io/create-react-app/docs/running-tests)

Expand All @@ -63,21 +62,24 @@ See [deployment](https://facebook.github.io/create-react-app/docs/deployment)

## Deployment

> [!IMPORTANT]
> [!IMPORTANT]
> We depend on `Red-Hat Yaml Extension` for validating the values files against the relevant schemas from helm-common.
> That means, you should install the extension from vscode in order to be able to edit values files according to our schemas.

To update helm dependencies

```bash
yarn helm-update
```

In order to create/renew values schemas
In order to create/renew values schemas

```bash
yarn helm-assets
```

To deploy: helm values **MUST** be combined from global.yaml and values.yaml (use npm script!)

```bash
yarn helm-install
```
Expand Down
67 changes: 35 additions & 32 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,42 @@ const webpack = require('webpack');
const path = require('path');

module.exports = function override(config, env) {
//do stuff with the webpack config...
//do stuff with the webpack config...

config.resolve.fallback = {
url: require.resolve('url'),
assert: require.resolve('assert'),
crypto: require.resolve('crypto-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify/browser'),
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify'),
zlib: require.resolve("browserify-zlib")
};
config.resolve.fallback = {
url: require.resolve('url'),
assert: require.resolve('assert'),
crypto: require.resolve('crypto-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify/browser'),
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify'),
zlib: require.resolve('browserify-zlib'),
};

config.resolve.alias = {
...config.resolve.alias,
'react-dnd': path.resolve(__dirname, './node_modules/react-dnd'),
'react-dnd-html5-backend': path.resolve(__dirname, './node_modules/react-dnd-html5-backend'),
}

config.plugins.push(
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
);
config.resolve.alias = {
...config.resolve.alias,
'react-dnd': path.resolve(__dirname, './node_modules/react-dnd'),
'react-dnd-html5-backend': path.resolve(
__dirname,
'./node_modules/react-dnd-html5-backend'
),
};

config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false
}
})
config.plugins.push(
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
})
);

return config;
}
config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
});

return config;
};
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
version: '3'

services:

catalog-app-service:

catalog-app-service:
image: catalog-app

build: .
Expand Down
2 changes: 1 addition & 1 deletion public/assets/pages/compatibilityError.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<img src="./img/compatibility-error-icon.png" />
<div class="titlesContainer">
<h1 id="errorMainTitle"></h1>
<h3 id="errorSecondaryTitle"></h1>
<h3 id="errorSecondaryTitle"></h3>
</div>
<div class="detailsSection">
<div id="browsersView"></div>
Expand Down
Loading
Loading