2 Commits

Author SHA1 Message Date
Primakov Alexandr Alexandrovich fb267a11f9 remove comment
platform/bro/pipeline/head This commit looks good
platform/gitea-bro-js/journal.pl/pipeline/head There was a failure building this commit
platform/bro-js/journal.pl/pipeline/head This commit looks good
2024-08-07 23:37:45 +03:00
Primakov Alexandr Alexandrovich a94acbf7d3 better Jenkins file
platform/bro/pipeline/head This commit looks good
platform/gitea-bro-js/journal.pl/pipeline/head There was a failure building this commit
platform/bro-js/journal.pl/pipeline/head This commit looks good
2024-08-07 23:32:19 +03:00
2 changed files with 51 additions and 31 deletions
Vendored
+50 -30
View File
@@ -1,37 +1,57 @@
pipeline { pipeline {
agent { agent {
docker { docker {
image 'node:20' image 'node:20'
} }
}
stages {
stage('install') {
steps {
sh 'node -v'
sh 'npm -v'
sh 'npm ci'
}
} }
stage('eslint') { stages {
steps { stage('install') {
sh 'npm run eslint' steps {
} sh 'node -v'
} sh 'npm -v'
script {
String tag = sh(returnStdout: true, script: 'git tag --contains').trim()
String branchName = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
String commit = sh(returnStdout: true, script: 'git log -1 --oneline').trim()
String commitMsg = commit.substring(commit.indexOf(' ')).trim()
stage('build') { if (tag) {
steps { currentBuild.displayName = "#${BUILD_NUMBER}, tag ${tag}"
sh 'npm run build' } else {
} currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}"
} }
stage('clean-all') { String author = sh(returnStdout: true, script: "git log -1 --pretty=format:'%an'").trim()
steps { currentBuild.description = "${author}<br />${commitMsg}"
sh 'rm -rf .[!.]*' echo 'starting installing'
sh 'rm -rf ./*' sh 'npm ci'
sh 'ls -a' }
} }
}
stage('checks') {
parallel {
stage('eslint') {
steps {
sh 'npm run eslint'
}
}
stage('build') {
steps {
sh 'npm run build'
}
}
}
}
stage('clean-all') {
steps {
sh 'rm -rf .[!.]*'
sh 'rm -rf ./*'
sh 'ls -a'
}
}
} }
}
} }
+1 -1
View File
@@ -12,7 +12,7 @@ let rootElement: ReactDOM.Root
export const mount = async (Сomponent, element = document.getElementById('app')) => { export const mount = async (Сomponent, element = document.getElementById('app')) => {
let user = null; let user = null;
try { try {
await keycloak.init({ onLoad: "login-required" }); // 'login-required' }); await keycloak.init({ onLoad: "login-required" });
user = { ...(await keycloak.loadUserInfo()), ...keycloak.tokenParsed }; user = { ...(await keycloak.loadUserInfo()), ...keycloak.tokenParsed };
} catch (error) { } catch (error) {
console.error("Failed to initialize adapter:", error); console.error("Failed to initialize adapter:", error);