-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Split react-formule from bundle in order to have <20MB sourcemaps * Avoid copying sourcemaps to final image to reduce size Signed-off-by: Miguel Garcia Garcia <[email protected]>
- Loading branch information
Showing
12 changed files
with
187 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ jobs: | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | ||
id: get_branch | ||
|
||
- name: Extract short commit SHA | ||
id: get_short_sha | ||
run: echo "SENTRY_RELEASE=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT | ||
|
||
- id: build-ui | ||
name: Build and export | ||
uses: cern-sis/gh-workflows/.github/actions/[email protected] | ||
|
@@ -35,10 +39,8 @@ jobs: | |
username: ${{ secrets.HARBOR_USERNAME }} | ||
password: ${{ secrets.HARBOR_PASSWORD }} | ||
build-args: | | ||
BRANCH_NAME=${{ steps.get_branch.outputs.BRANCH_NAME }} | ||
PIWIK_ENV=${{ steps.get_branch.outputs.BRANCH_NAME }} | ||
CAP_PIWIK_URL=${{ secrets.CAP_PIWIK_URL }} | ||
CAP_PIWIK_SITEID_DEV=${{ secrets.CAP_PIWIK_SITEID_DEV }} | ||
CAP_PIWIK_SITEID_PROD=${{ secrets.CAP_PIWIK_SITEID_PROD }} | ||
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }} | ||
CAP_PIWIK_SITEID_TEST=${{ secrets.CAP_PIWIK_SITEID_TEST }} | ||
SENTRY_URL=${{ secrets.CAP_SENTRY_URL }} | ||
SENTRY_ORG=${{ secrets.CAP_SENTRY_ORG }} | ||
SENTRY_PROJECT=${{ secrets.CAP_SENTRY_PROJECT }} | ||
SENTRY_AUTH_TOKEN=${{ secrets.CAP_SENTRY_AUTH_TOKEN }} | ||
SENTRY_RELEASE=${{ steps.get_short_sha.outputs.SENTRY_RELEASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(() => { | ||
const CONFIG = { | ||
ENV: null, | ||
PIWIK_URL: null, | ||
PIWIK_SITE_ID: null, | ||
SENTRY_UI_DSN: null, | ||
ENABLE_E2E: false, | ||
}; | ||
|
||
Object.defineProperty(window, "CONFIG", { value: Object.freeze(CONFIG) }); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
const config = { | ||
project: { | ||
name: "CERN Analysis Preservation", | ||
api: "https://pammbp.cern.ch:5000" | ||
} | ||
}; | ||
import * as Sentry from "@sentry/react"; | ||
|
||
export default config; | ||
export function getConfigFor(configKey, notSetValue = null) { | ||
try { | ||
return window.CONFIG[configKey] != null | ||
? window.CONFIG[configKey] | ||
: notSetValue; | ||
} catch (error) { | ||
Sentry.captureException(error); | ||
console.error(error); // eslint-disable-line no-console | ||
return notSetValue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.