Skip to content

Commit 173122b

Browse files
authored
Merge pull request #161 from NFDI4Chem/development
feat: update production
2 parents dfc43e2 + a07eea4 commit 173122b

28 files changed

Lines changed: 8360 additions & 6188 deletions

.eslintignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
dist
22
node_modules
3-
public
3+
public
4+
build
5+
src/*.json
6+
vite.config.*
7+
lib

.eslintrc.json

Lines changed: 0 additions & 93 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root: true
2+
extends:
3+
- cheminfo-react/base
4+
- cheminfo-typescript/base
5+
- cheminfo-typescript/unicorn
6+
rules:
7+
'import/default': off
8+
'import/no-unresolved': off
9+
'react-refresh/only-export-components': off
10+
'@typescript-eslint/naming-convention': off
11+
'@typescript-eslint/restrict-plus-operands': off
12+
'react/no-unstable-nested-components': off
13+
no-restricted-imports:
14+
- error
15+
- name: '@simbathesailor/use-what-changed'
16+
message: 'Remove use-what-changed before committing the code'
17+
react/no-unknown-property:
18+
- error
19+
- ignore:
20+
- 'css'
21+
parserOptions:
22+
sourceType: module

.github/workflows/dev-build.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ env:
2020
GKE_CLUSTER_DEV: nmrxiv-dev
2121
GKE_ZONE: europe-west3-a
2222
DEPLOYMENT_NAME: nmrxiv-nmrium
23-
REPOSITORY_NAME_DEV: nmrxiv-dev
24-
IMAGE: nmrium
23+
DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
24+
DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
25+
REPOSITORY_NAME: nmrium-react-wrapper
26+
REPOSITORY_NAMESPACE: nfdi4chem
2527

2628
jobs:
2729
e2etest:
@@ -37,7 +39,12 @@ jobs:
3739
needs: [lint, e2etest]
3840
steps:
3941
- name: Checkout
40-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
43+
44+
- name: Update version number
45+
run: |
46+
VERSION=${GITHUB_REF//*\/}
47+
echo "export default { version: '$VERSION' };" > src/versionInfo.ts
4148
4249
# Setup gcloud CLI
4350
- name: Setup CLI
@@ -46,11 +53,6 @@ jobs:
4653
service_account_key: ${{ secrets.GKE_SA_KEY }}
4754
project_id: ${{ secrets.GKE_PROJECT }}
4855

49-
# Configure docker to use the gcloud command-line tool as a credential helper
50-
- name: Configure docker
51-
run: |-
52-
gcloud auth configure-docker europe-west3-docker.pkg.dev
53-
5456
# Get the GKE credentials so we can deploy to the cluster
5557
- name: Get GKE credentials
5658
uses: google-github-actions/get-gke-credentials@v0.3.0
@@ -59,15 +61,23 @@ jobs:
5961
location: ${{ env.GKE_ZONE }}
6062
credentials: ${{ secrets.GKE_SA_KEY }}
6163

62-
# Build the Docker image
63-
- name: Build docker image
64-
run: |-
65-
docker build -f Dockerfile.prod --tag europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest .
64+
- name: Log in to Docker Hub
65+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
66+
with:
67+
username: ${{ env.DOCKER_HUB_USERNAME }}
68+
password: ${{ env.DOCKER_HUB_PASSWORD }}
6669

67-
# Push the Docker image to Google Artifact Registry
68-
- name: Publish image to Google Artifact Registry
69-
run: |-
70-
docker push "europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest"
70+
- name: Build and push Docker image
71+
uses: docker/build-push-action@v4
72+
with:
73+
context: .
74+
file: ./Dockerfile.prod
75+
push: true
76+
build-args: |
77+
RELEASE_VERSION=dev-latest
78+
tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:dev-latest
79+
username: ${{ env.DOCKER_HUB_USERNAME }}
80+
password: ${{ env.DOCKER_HUB_PASSWORD }}
7181

7282
# Deploy the latest Docker image to the GKE cluster
7383
- name: Deploy

.github/workflows/dev-check.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Node.js Dev Checking
22

33
on:
4-
push:
5-
branches-ignore:
6-
- 'main'
7-
- 'development'
84
pull_request:
95
branches:
106
- development

.github/workflows/nodejs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
nodejs:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v2
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
1212
with:
13-
node-version: 16.x
13+
node-version: 18.x
1414
- name: Install dependencies
1515
run: npm ci
1616
- name: Run ESLint

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ npm-debug.log*
2626
yarn-debug.log*
2727
yarn-error.log*
2828
yarn.lock
29+
30+
31+
.eslintcache
32+
33+
.vscode
34+
35+
/test-results
36+
/playwright-report

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ To further enable integration in other applications developed with modern framew
3333

3434
### Docker Hub
3535
Containerized using Docker and is distributed publicly via the [Docker Hub](https://hub.docker.com/r/nfdi4chem/nmrium-react-wrapper).
36+
37+
3638
Please refer to Docker tags corresponding to the version of the NMRium React Wrapper releases.
3739

40+
3841
Link to Docker Hub - https://hub.docker.com/r/nfdi4chem/nmrium-react-wrapper
3942

4043
### Kubernetes and Helm Charts

0 commit comments

Comments
 (0)