Skip to content

Commit 3b2779e

Browse files
authored
Merge pull request #19 from bcgsc/release/v6.0.0
Release/v6.0.0
2 parents ccbec84 + c527afa commit 3b2779e

File tree

247 files changed

+9388
-4792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+9388
-4792
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

.eslintrc.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"extends": [
3-
"airbnb",
3+
"airbnb-typescript",
44
"plugin:react/recommended",
55
"plugin:react-hooks/recommended",
66
"plugin:@typescript-eslint/recommended"
77
],
88
"env": {
99
"es6": true,
10-
"node": true,
11-
"cypress/globals": true
10+
"node": true
1211
},
1312
"parser": "@typescript-eslint/parser",
1413
"parserOptions": {
15-
"sourceType": "module"
14+
"sourceType": "module",
15+
"project": "./tsconfig.json"
1616
},
1717
"globals": {
1818
"angular": true,
@@ -26,7 +26,6 @@
2626
},
2727
"plugins": [
2828
"babel",
29-
"cypress",
3029
"react",
3130
"react-hooks",
3231
"@typescript-eslint"
@@ -94,7 +93,13 @@
9493
"WithStatement"
9594
],
9695
"import/no-unresolved": "off",
96+
"import/no-named-as-default": "off",
97+
"import/named": "off",
98+
"import/no-named-as-default-member": "off",
99+
"import/prefer-default-export": "warn",
97100
"class-methods-use-this": "off",
98-
"react/jsx-filename-extension": "off"
101+
"react/jsx-filename-extension": "off",
102+
"@typescript-eslint/no-empty-function": "off",
103+
"react/jsx-indent": "error"
99104
}
100105
}

.github/workflows/docker-publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: docker-publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
13+
env:
14+
DOCKER_USER: ${{ secrets.DOCKER_USER }}
15+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
16+
- run: |
17+
docker build --file Dockerfile --tag bcgsc/pori-ipr-client:latest --tag bcgsc/pori-ipr-client:${{ github.event.release.tag_name }} .
18+
- run: docker push bcgsc/pori-ipr-client:latest
19+
- run: docker push bcgsc/pori-ipr-client:${{ github.event.release.tag_name }}

.github/workflows/npm-test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node: [10, 12, 14]
11+
name: node-${{ matrix.node }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ matrix.node }}
17+
- run: npm ci
18+
- run: npm test
19+
- name: Publish Unit Test Results
20+
uses: EnricoMi/publish-unit-test-result-action@v1.6
21+
with:
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
files: coverage/junit.xml
24+
if: matrix.node == 12
25+
- uses: codecov/codecov-action@v1
26+
with:
27+
yml: codecov.yml
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
if: matrix.node == 12
30+
docker:
31+
runs-on: ubuntu-latest
32+
name: docker-build
33+
steps:
34+
- uses: actions/checkout@v2
35+
- run: |
36+
docker build --file Dockerfile --tag pori/ipr-client .

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ builds/*
44
.*DS_Store
55
.vscode/*
66
dist/*
7-
coverage/*
7+
coverage/*
8+
statics/ipr-env-config.js

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Stage 0, "build-stage", based on Node.js, to build and compile the frontend
2+
FROM node:12 as build-stage
3+
4+
ARG API_BASE_URL
5+
ARG KEYCLOAK_URL
6+
ARG KEYCLOAK_REALM
7+
8+
WORKDIR /app
9+
COPY package*.json /app/
10+
RUN npm ci
11+
COPY ./ /app/
12+
RUN npm run build:docker
13+
14+
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
15+
FROM nginx:1.15-alpine
16+
17+
COPY --from=build-stage /app/dist /usr/share/nginx/html
18+
# Default port exposure
19+
EXPOSE 80
20+
21+
# Copy .env file and shell script to container
22+
WORKDIR /usr/share/nginx/html
23+
COPY ./config/.env .
24+
COPY ./config/env.sh .
25+
# Add bash
26+
RUN apk add --no-cache bash
27+
28+
# Make our shell script executable
29+
RUN chmod +x env.sh
30+
31+
# Copy the nginx.conf
32+
COPY ./config/nginx.conf /etc/nginx/conf.d/default.conf
33+
34+
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]

0 commit comments

Comments
 (0)