Skip to content

Commit d25628f

Browse files
committed
Merge branch 'develop' into 797-dataset-type-selection-step #797
Conflicts: package-lock.json package.json src/dataset/domain/repositories/DatasetRepository.ts src/stories/dataset/DatasetErrorMockRepository.ts src/stories/dataset/DatasetMockRepository.ts
2 parents 44aaa4f + 012e15c commit d25628f

File tree

119 files changed

+3368
-949
lines changed

Some content is hidden

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

119 files changed

+3368
-949
lines changed

.env.example

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

.github/workflows/deploy-beta-testing.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ jobs:
3030
working-directory: packages/design-system
3131
run: npm run build
3232

33-
- name: Create and populate .env file
33+
- name: Build with base path
34+
run: npm run build -- --base=/spa
35+
36+
- name: Override runtime config.js for BETA
3437
env:
3538
DATAVERSE_BACKEND_URL: ${{ secrets.BETA_DATAVERSE_BACKEND_URL }}
3639
OIDC_CLIENT_ID: ${{ secrets.BETA_OIDC_CLIENT_ID }}
@@ -39,18 +42,26 @@ jobs:
3942
OIDC_LOGOUT_ENDPOINT: ${{ secrets.BETA_OIDC_LOGOUT_ENDPOINT }}
4043
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.BETA_OIDC_STORAGE_KEY_PREFIX }}
4144
run: |
42-
touch .env
43-
echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env
44-
echo VITE_OIDC_CLIENT_ID="$OIDC_CLIENT_ID" >> .env
45-
echo VITE_OIDC_AUTHORIZATION_ENDPOINT="$OIDC_AUTHORIZATION_ENDPOINT" >> .env
46-
echo VITE_OIDC_TOKEN_ENDPOINT="$OIDC_TOKEN_ENDPOINT" >> .env
47-
echo VITE_OIDC_LOGOUT_ENDPOINT="$OIDC_LOGOUT_ENDPOINT" >> .env
48-
echo VITE_OIDC_STORAGE_KEY_PREFIX="$OIDC_STORAGE_KEY_PREFIX" >> .env
45+
mkdir -p ./dist
46+
cat > ./dist/config.js <<EOF
47+
window.__APP_CONFIG__ = {
48+
backendUrl: "${DATAVERSE_BACKEND_URL}",
49+
oidc: {
50+
clientId: "${OIDC_CLIENT_ID}",
51+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
52+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
53+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
54+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
55+
},
56+
languages: [
57+
{ code: 'en', name: 'English' },
58+
{ code: 'es', name: 'Español' }
59+
],
60+
defaultLanguage: 'en'
61+
}
62+
EOF
4963
shell: bash
5064

51-
- name: Build with base path
52-
run: npm run build -- --base=/spa
53-
5465
- uses: actions/upload-artifact@v4
5566
with:
5667
name: built-site

.github/workflows/deploy.yml

Lines changed: 62 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ jobs:
4141
working-directory: packages/design-system
4242
run: npm run build
4343

44-
# For BETA environment
45-
- name: Create and populate .env file for BETA
44+
- name: Build with base path
45+
run: npm run build -- --base=/${{ github.event.inputs.basepath }}
46+
47+
- name: Override runtime config.js for BETA
4648
if: ${{ github.event.inputs.environment == 'beta' }}
4749
env:
4850
DATAVERSE_BACKEND_URL: ${{ secrets.BETA_DATAVERSE_BACKEND_URL }}
@@ -52,17 +54,26 @@ jobs:
5254
OIDC_LOGOUT_ENDPOINT: ${{ secrets.BETA_OIDC_LOGOUT_ENDPOINT }}
5355
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.BETA_OIDC_STORAGE_KEY_PREFIX }}
5456
run: |
55-
touch .env
56-
echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env
57-
echo VITE_OIDC_CLIENT_ID="$OIDC_CLIENT_ID" >> .env
58-
echo VITE_OIDC_AUTHORIZATION_ENDPOINT="$OIDC_AUTHORIZATION_ENDPOINT" >> .env
59-
echo VITE_OIDC_TOKEN_ENDPOINT="$OIDC_TOKEN_ENDPOINT" >> .env
60-
echo VITE_OIDC_LOGOUT_ENDPOINT="$OIDC_LOGOUT_ENDPOINT" >> .env
61-
echo VITE_OIDC_STORAGE_KEY_PREFIX="$OIDC_STORAGE_KEY_PREFIX" >> .env
62-
shell: bash
63-
64-
# For QA environment
65-
- name: Create and populate .env file for QA
57+
mkdir -p ./dist
58+
cat > ./dist/config.js <<EOF
59+
window.__APP_CONFIG__ = {
60+
backendUrl: "${DATAVERSE_BACKEND_URL}",
61+
oidc: {
62+
clientId: "${OIDC_CLIENT_ID}",
63+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
64+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
65+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
66+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
67+
},
68+
languages: [
69+
{ code: 'en', name: 'English' },
70+
{ code: 'es', name: 'Español' },
71+
],
72+
defaultLanguage: 'en'
73+
}
74+
EOF
75+
76+
- name: Override runtime config.js for QA
6677
if: ${{ github.event.inputs.environment == 'qa' }}
6778
env:
6879
DATAVERSE_BACKEND_URL: ${{ secrets.QA_DATAVERSE_BACKEND_URL }}
@@ -72,17 +83,26 @@ jobs:
7283
OIDC_LOGOUT_ENDPOINT: ${{ secrets.QA_OIDC_LOGOUT_ENDPOINT }}
7384
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.QA_OIDC_STORAGE_KEY_PREFIX }}
7485
run: |
75-
touch .env
76-
echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env
77-
echo VITE_OIDC_CLIENT_ID="$OIDC_CLIENT_ID" >> .env
78-
echo VITE_OIDC_AUTHORIZATION_ENDPOINT="$OIDC_AUTHORIZATION_ENDPOINT" >> .env
79-
echo VITE_OIDC_TOKEN_ENDPOINT="$OIDC_TOKEN_ENDPOINT" >> .env
80-
echo VITE_OIDC_LOGOUT_ENDPOINT="$OIDC_LOGOUT_ENDPOINT" >> .env
81-
echo VITE_OIDC_STORAGE_KEY_PREFIX="$OIDC_STORAGE_KEY_PREFIX" >> .env
82-
shell: bash
83-
84-
# For DEMO environment
85-
- name: Create and populate .env file for DEMO
86+
mkdir -p ./dist
87+
cat > ./dist/config.js <<EOF
88+
window.__APP_CONFIG__ = {
89+
backendUrl: "${DATAVERSE_BACKEND_URL}",
90+
oidc: {
91+
clientId: "${OIDC_CLIENT_ID}",
92+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
93+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
94+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
95+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
96+
},
97+
languages: [
98+
{ code: 'en', name: 'English' },
99+
{ code: 'es', name: 'Español' },
100+
],
101+
defaultLanguage: 'en'
102+
}
103+
EOF
104+
105+
- name: Override runtime config.js for DEMO
86106
if: ${{ github.event.inputs.environment == 'demo' }}
87107
env:
88108
DATAVERSE_BACKEND_URL: ${{ secrets.DEMO_DATAVERSE_BACKEND_URL }}
@@ -92,17 +112,24 @@ jobs:
92112
OIDC_LOGOUT_ENDPOINT: ${{ secrets.DEMO_OIDC_LOGOUT_ENDPOINT }}
93113
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.DEMO_OIDC_STORAGE_KEY_PREFIX }}
94114
run: |
95-
touch .env
96-
echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env
97-
echo VITE_OIDC_CLIENT_ID="$OIDC_CLIENT_ID" >> .env
98-
echo VITE_OIDC_AUTHORIZATION_ENDPOINT="$OIDC_AUTHORIZATION_ENDPOINT" >> .env
99-
echo VITE_OIDC_TOKEN_ENDPOINT="$OIDC_TOKEN_ENDPOINT" >> .env
100-
echo VITE_OIDC_LOGOUT_ENDPOINT="$OIDC_LOGOUT_ENDPOINT" >> .env
101-
echo VITE_OIDC_STORAGE_KEY_PREFIX="$OIDC_STORAGE_KEY_PREFIX" >> .env
102-
shell: bash
103-
104-
- name: Build with base path
105-
run: npm run build -- --base=/${{ github.event.inputs.basepath }}
115+
mkdir -p ./dist
116+
cat > ./dist/config.js <<EOF
117+
window.__APP_CONFIG__ = {
118+
backendUrl: "${DATAVERSE_BACKEND_URL}",
119+
oidc: {
120+
clientId: "${OIDC_CLIENT_ID}",
121+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
122+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
123+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
124+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
125+
},
126+
languages: [
127+
{ code: 'en', name: 'English' },
128+
{ code: 'es', name: 'Español' },
129+
],
130+
defaultLanguage: 'en'
131+
}
132+
EOF
106133
107134
- uses: actions/upload-artifact@v4
108135
with:

.github/workflows/generate-war.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: generate-war
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: Target environment
8+
type: choice
9+
required: true
10+
options:
11+
- beta
12+
- qa
13+
- demo
14+
basepath:
15+
description: 'Server base path (without slashes) for serving the application (e.g., spa). If left blank, it will try to deploy to the root base path.'
16+
type: string
17+
required: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 22
29+
cache: 'npm'
30+
31+
- name: Create .npmrc
32+
run: |
33+
cp .npmrc.example .npmrc
34+
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
35+
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
36+
37+
- name: Install Dependencies
38+
run: npm install
39+
40+
- name: Build Dataverse UI Library
41+
working-directory: packages/design-system
42+
run: npm run build
43+
44+
- name: Build with base path
45+
run: npm run build -- --base=/${{ github.event.inputs.basepath }}
46+
47+
- name: Override runtime config.js for BETA
48+
if: ${{ github.event.inputs.environment == 'beta' }}
49+
env:
50+
DATAVERSE_BACKEND_URL: ${{ secrets.BETA_DATAVERSE_BACKEND_URL }}
51+
OIDC_CLIENT_ID: ${{ secrets.BETA_OIDC_CLIENT_ID }}
52+
OIDC_AUTHORIZATION_ENDPOINT: ${{ secrets.BETA_OIDC_AUTHORIZATION_ENDPOINT }}
53+
OIDC_TOKEN_ENDPOINT: ${{ secrets.BETA_OIDC_TOKEN_ENDPOINT }}
54+
OIDC_LOGOUT_ENDPOINT: ${{ secrets.BETA_OIDC_LOGOUT_ENDPOINT }}
55+
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.BETA_OIDC_STORAGE_KEY_PREFIX }}
56+
run: |
57+
mkdir -p ./dist
58+
cat > ./dist/config.js <<EOF
59+
window.__APP_CONFIG__ = {
60+
backendUrl: "${DATAVERSE_BACKEND_URL}",
61+
oidc: {
62+
clientId: "${OIDC_CLIENT_ID}",
63+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
64+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
65+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
66+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
67+
},
68+
languages: [
69+
{ code: 'en', name: 'English' },
70+
{ code: 'es', name: 'Español' },
71+
],
72+
defaultLanguage: 'en'
73+
}
74+
EOF
75+
76+
- name: Override runtime config.js for QA
77+
if: ${{ github.event.inputs.environment == 'qa' }}
78+
env:
79+
DATAVERSE_BACKEND_URL: ${{ secrets.QA_DATAVERSE_BACKEND_URL }}
80+
OIDC_CLIENT_ID: ${{ secrets.QA_OIDC_CLIENT_ID }}
81+
OIDC_AUTHORIZATION_ENDPOINT: ${{ secrets.QA_OIDC_AUTHORIZATION_ENDPOINT }}
82+
OIDC_TOKEN_ENDPOINT: ${{ secrets.QA_OIDC_TOKEN_ENDPOINT }}
83+
OIDC_LOGOUT_ENDPOINT: ${{ secrets.QA_OIDC_LOGOUT_ENDPOINT }}
84+
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.QA_OIDC_STORAGE_KEY_PREFIX }}
85+
run: |
86+
mkdir -p ./dist
87+
cat > ./dist/config.js <<EOF
88+
window.__APP_CONFIG__ = {
89+
backendUrl: "${DATAVERSE_BACKEND_URL}",
90+
oidc: {
91+
clientId: "${OIDC_CLIENT_ID}",
92+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
93+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
94+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
95+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
96+
},
97+
languages: [
98+
{ code: 'en', name: 'English' },
99+
{ code: 'es', name: 'Español' },
100+
],
101+
defaultLanguage: 'en'
102+
}
103+
EOF
104+
105+
- name: Override runtime config.js for DEMO
106+
if: ${{ github.event.inputs.environment == 'demo' }}
107+
env:
108+
DATAVERSE_BACKEND_URL: ${{ secrets.DEMO_DATAVERSE_BACKEND_URL }}
109+
OIDC_CLIENT_ID: ${{ secrets.DEMO_OIDC_CLIENT_ID }}
110+
OIDC_AUTHORIZATION_ENDPOINT: ${{ secrets.DEMO_OIDC_AUTHORIZATION_ENDPOINT }}
111+
OIDC_TOKEN_ENDPOINT: ${{ secrets.DEMO_OIDC_TOKEN_ENDPOINT }}
112+
OIDC_LOGOUT_ENDPOINT: ${{ secrets.DEMO_OIDC_LOGOUT_ENDPOINT }}
113+
OIDC_STORAGE_KEY_PREFIX: ${{ secrets.DEMO_OIDC_STORAGE_KEY_PREFIX }}
114+
run: |
115+
mkdir -p ./dist
116+
cat > ./dist/config.js <<EOF
117+
window.__APP_CONFIG__ = {
118+
backendUrl: "${DATAVERSE_BACKEND_URL}",
119+
oidc: {
120+
clientId: "${OIDC_CLIENT_ID}",
121+
authorizationEndpoint: "${OIDC_AUTHORIZATION_ENDPOINT}",
122+
tokenEndpoint: "${OIDC_TOKEN_ENDPOINT}",
123+
logoutEndpoint: "${OIDC_LOGOUT_ENDPOINT}",
124+
localStorageKeyPrefix: "${OIDC_STORAGE_KEY_PREFIX}"
125+
},
126+
languages: [
127+
{ code: 'en', name: 'English' },
128+
{ code: 'es', name: 'Español' },
129+
],
130+
defaultLanguage: 'en'
131+
}
132+
EOF
133+
134+
- uses: actions/upload-artifact@v4
135+
with:
136+
name: built-site
137+
path: ./dist
138+
include-hidden-files: true
139+
140+
generate-war:
141+
needs: build
142+
runs-on: ubuntu-latest
143+
144+
steps:
145+
- uses: actions/checkout@v3
146+
147+
- uses: actions/setup-java@v3
148+
with:
149+
distribution: 'zulu'
150+
java-version: '11'
151+
152+
- uses: actions/download-artifact@v4
153+
with:
154+
name: built-site
155+
path: ./dist
156+
157+
- name: Get branch name
158+
id: branch-name
159+
uses: tj-actions/branch-names@v6
160+
161+
- name: Build war file
162+
working-directory: ./deployment/payara
163+
run: mvn package "-Dversion=${{ steps.branch-name.outputs.current_branch }}"
164+
165+
- uses: actions/upload-artifact@v4
166+
with:
167+
name: war-file
168+
path: ./deployment/payara/target/*.war

0 commit comments

Comments
 (0)