diff --git a/CHANGELOG.md b/CHANGELOG.md index feed6b1069..4f52c7dec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Prepare ThermalStorageTestData for Storage without storageVolumeLvlMin [#894](https://github.com/ie3-institute/simona/issues/894) - Renamed `ActivityStartTrigger`, `ScheduleTriggerMessage`, `CompletionMessage` in UML Diagrams[#675](https://github.com/ie3-institute/simona/issues/675) - Simplifying quantity integration in QuantityUtil [#973](https://github.com/ie3-institute/simona/issues/973) +- Reorganized Jenkins pipeline to separate build and test stages for better efficiency [#938](https://github.com/ie3-institute/simona/issues/938) ### Fixed - Removed a repeated line in the documentation of vn_simona config [#658](https://github.com/ie3-institute/simona/issues/658) diff --git a/Jenkinsfile b/Jenkinsfile index 46e3837dd8..f8320f0960 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -101,31 +101,32 @@ node { } } + // Build the project + stage('build') { + gradle('clean assemble', projectName) + } + // test the project stage('run tests') { sh 'java -version' - gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest reportScoverage checkScoverage', projectName) + gradle('--refresh-dependencies spotlessCheck pmdMain pmdTest', projectName) sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew javadoc''', returnStdout: true) } - // sonarqube analysis - stage('sonarqube analysis') { + // sonarqube analysis & quality gate + stage('sonarqube') { String sonarqubeCurrentBranchName = prFromFork() ? prJsonObj.head.repo.full_name : currentBranchName // forks needs to be handled differently String sonarqubeCmd = determineSonarqubeGradleCmd(sonarqubeProjectKey, sonarqubeCurrentBranchName, targetBranchName, orgName, projectName, projectName) withSonarQubeEnv() { // will pick the global server connection from jenkins for sonarqube gradle(sonarqubeCmd, projectName) } - } - - // sonarqube quality gate - stage("quality gate") { timeout(time: 1, unit: 'HOURS') { - // just in case something goes wrong, pipeline will be killed after a timeout - def qg = waitForQualityGate() // reuse taskId previously collected by withSonarQubeEnv + // Just in case something goes wrong, pipeline will be killed after a timeout + def qg = waitForQualityGate() // Reuse taskId previously collected by withSonarQubeEnv if (qg.status != 'OK') { error "Pipeline aborted due to quality gate failure: ${qg.status}" } @@ -684,4 +685,4 @@ def getBranchType(String branchName) { } else { return null } -} \ No newline at end of file +} diff --git a/build.gradle b/build.gradle index 5d3c289349..0101467b78 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ ext { scalaVersion = '2.13' scalaBinaryVersion = '2.13.15' - pekkoVersion = '1.1.1' + pekkoVersion = '1.1.2' jtsVersion = '1.20.0' confluentKafkaVersion = '7.4.0' tscfgVersion = '1.1.3' @@ -98,7 +98,7 @@ dependencies { /* logging */ implementation "com.typesafe.scala-logging:scala-logging_${scalaVersion}:3.9.5" // pekko scala logging - implementation "ch.qos.logback:logback-classic:1.5.8" + implementation "ch.qos.logback:logback-classic:1.5.9" /* testing */ testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0' diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index 6c1bfcb1a8..382b7eaf88 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,5 +1,5 @@ -Sphinx==7.4.7 -sphinx-rtd-theme==2.0.0 +Sphinx==8.1.0 +sphinx-rtd-theme==3.0.1 sphinxcontrib-plantuml==0.30 myst-parser==4.0.0 markdown-it-py==3.0.0