diff --git a/.eslintrc.json b/.eslintrc.json index 7e0ae11..119b474 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,7 +18,9 @@ "quotes": [ 2, "single", - "avoid-escape" + { + "avoidEscape": true + } ] } } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8242a89..b1c6621 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # pull official base image -FROM node:13.12.0-alpine +FROM node:lts-bullseye # set working directory WORKDIR /app diff --git a/jenkins/Jenkinsfile-dev b/jenkins/Jenkinsfile-dev new file mode 100644 index 0000000..9299f24 --- /dev/null +++ b/jenkins/Jenkinsfile-dev @@ -0,0 +1,78 @@ +pipeline { + agent { + docker { + image 'node:lts-bullseye' + } + } + environment { + // ensure production environmental variable are present + CI = 'true' + NODE_ENV = 'production' + // set NPM parameters + HOME = '.' + NPM_CONFIG_CACHE = 'npm_cache' + // set application configuration + REACT_APP_KC_URL = 'https://auth-dev.csi.wmi.amu.edu.pl/' + REACT_APP_KC_REALM = 'gonito-dev' + REACT_APP_KC_CLIENT_ID = 'gonito-front-dev' + REACT_APP_API = 'https://gonito-back-dev.csi.wmi.amu.edu.pl/api' + } + stages { + stage('Build') { + steps { + //sh 'npm install --loglevel=verbose' + sh 'npm install' + sh 'npm clean-install --only=production' + sh 'npm run build' + } + } + stage('Package') { + steps { + // due to involved path processing of sshPublisher it's easier to pack everything into an archive + sh 'cd build && tar cf ../build.tar.xz .' + } + } + stage('SSH-publish-transfer') { + steps { + sshPublisher( + continueOnError: false, + failOnError: true, + publishers: [ + sshPublisherDesc( + configName: "mprill-gonito-front-dev", + transfers: [sshTransfer( + remoteDirectory: 'public_html', + // ensure clean deployment by deleting everything in remote directory + cleanRemote: true, + // transfer archive + sourceFiles: 'build.tar.xz', + // unpack archive and clean up + execCommand: 'tar xf public_html/build.tar.xz -C public_html && rm public_html/build.tar.xz' + )], + verbose: true + ) + ] + ) + } + } + stage('SSH-publish-permissions') { + steps { + sshPublisher( + continueOnError: false, + failOnError: true, + publishers: [ + sshPublisherDesc( + configName: "mprill-gonito-front-dev", + transfers: [sshTransfer( + // set proper permissions required for hosting + execCommand: 'chmod -R o+rX public_html' + )], + verbose: true + ) + ] + ) + } + } + } +} + diff --git a/jenkins/Jenkinsfile-prod b/jenkins/Jenkinsfile-prod new file mode 100644 index 0000000..912560a --- /dev/null +++ b/jenkins/Jenkinsfile-prod @@ -0,0 +1,78 @@ +pipeline { + agent { + docker { + image 'node:lts-bullseye' + } + } + environment { + // ensure production environmental variable are present + CI = 'true' + NODE_ENV = 'production' + // set NPM parameters + HOME = '.' + NPM_CONFIG_CACHE = 'npm_cache' + // set application configuration + REACT_APP_KC_URL = 'https://auth.csi.wmi.amu.edu.pl/' + REACT_APP_KC_REALM = 'csi-gonito' + REACT_APP_KC_CLIENT_ID = 'gonito-frontend' + REACT_APP_API = 'https://gonito.net/api' + } + stages { + stage('Build') { + steps { + //sh 'npm install --loglevel=verbose' + sh 'npm install' + sh 'npm clean-install --only=production' + sh 'npm run build' + } + } + stage('Package') { + steps { + // due to involved path processing of sshPublisher it's easier to pack everything into an archive + sh 'cd build && tar cf ../build.tar.xz .' + } + } + stage('SSH-publish-transfer') { + steps { + sshPublisher( + continueOnError: false, + failOnError: true, + publishers: [ + sshPublisherDesc( + configName: "mprill-gonito-front-prod", + transfers: [sshTransfer( + remoteDirectory: 'public_html', + // ensure clean deployment by deleting everything in remote directory + cleanRemote: true, + // transfer archive + sourceFiles: 'build.tar.xz', + // unpack archive and clean up + execCommand: 'tar xf public_html/build.tar.xz -C public_html && rm public_html/build.tar.xz' + )], + verbose: true + ) + ] + ) + } + } + stage('SSH-publish-permissions') { + steps { + sshPublisher( + continueOnError: false, + failOnError: true, + publishers: [ + sshPublisherDesc( + configName: "mprill-gonito-front-prod", + transfers: [sshTransfer( + // set proper permissions required for hosting + execCommand: 'chmod -R o+rX public_html' + )], + verbose: true + ) + ] + ) + } + } + } +} + diff --git a/src/pages/PolicyPrivacy.js b/src/pages/PolicyPrivacy.js index 3556aa3..cc9bc86 100644 --- a/src/pages/PolicyPrivacy.js +++ b/src/pages/PolicyPrivacy.js @@ -43,7 +43,7 @@ const PolicyPrivacy = () => { const listItemsContent = [ 'prawo dostępu do danych osobowych, w tym prawo do uzyskania kopii tych danych przysługuje w ramach przesłanek i na warunkach określonych w art. 15 RODO,', 'prawo do żądania sprostowania (poprawienia) danych osobowych przysługuje w ramach przesłanek i na warunkach określonych w art. 16 RODO,', - 'prawo do usunięcia danych - przysługuje w ram${POLICY_PRIVACY_PAGE}ach przesłanek i na warunkach określonych w art. 17 RODO,', + 'prawo do usunięcia danych - przysługuje w ramach przesłanek i na warunkach określonych w art. 17 RODO,', 'prawo ograniczenia przetwarzania - przysługuje w ramach przesłanek i na warunkach określonych w art. 18 RODO,', 'prawo wniesienia sprzeciwu wobec przetwarzania - przysługuje w ramach przesłanek i na warunkach określonych w art. 21 RODO,', 'prawo do przenoszenia danych osobowych - przysługuje w ramach przesłanek i na warunkach określonych w art. 20 RODO,',