From fe918e319ae7495d6bc1660d30fb5d2311c99ad5 Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Tue, 1 Oct 2024 21:45:15 +0200 Subject: [PATCH 01/10] Seperated build and test stage in pipeline --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46e3837dd8..3e0c1aaa28 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -101,12 +101,17 @@ 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) } From 078869b01c80a60a359d4eda825cac626cfc3ffe Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Tue, 1 Oct 2024 22:12:50 +0200 Subject: [PATCH 02/10] Merged sonarqube analysis and quality gate --- Jenkinsfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3e0c1aaa28..13b36db41b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -116,21 +116,17 @@ node { sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew javadoc''', returnStdout: true) } - // sonarqube analysis - stage('sonarqube analysis') { + // sonarqube analysis & quality gate + stage('sonarqube & quality gate') { 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}" } From 0de5f595c2b2ace17e7007df2b93d02800fb84a7 Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Wed, 2 Oct 2024 12:34:59 +0200 Subject: [PATCH 03/10] CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a03112920d..b5c786457f 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) From c21443772829601120b8acb2ad2c5d5f5d668407 Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Wed, 2 Oct 2024 19:24:42 +0200 Subject: [PATCH 04/10] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 13b36db41b..f8320f0960 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -117,7 +117,7 @@ node { } // sonarqube analysis & quality gate - stage('sonarqube & 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() { @@ -685,4 +685,4 @@ def getBranchType(String branchName) { } else { return null } -} \ No newline at end of file +} From 88b822ce63d0ca6a46001451847195527e7816d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:31:34 +0000 Subject: [PATCH 05/10] Bump sphinx-rtd-theme from 2.0.0 to 3.0.0 in /docs/readthedocs (#986) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index 6c1bfcb1a8..311ca5073c 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-rtd-theme==3.0.0 sphinxcontrib-plantuml==0.30 myst-parser==4.0.0 markdown-it-py==3.0.0 From 0558b0cd39efdb01013b48da07aeb10dd063f805 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:40:35 +0000 Subject: [PATCH 06/10] Bump sphinx from 7.3.7 to 8.0.2 in /docs/readthedocs (#867) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index 311ca5073c..fc896db5d2 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,4 +1,4 @@ -Sphinx==7.4.7 +Sphinx==8.0.2 sphinx-rtd-theme==3.0.0 sphinxcontrib-plantuml==0.30 myst-parser==4.0.0 From b0f2e092e5f3d1205508e9639da7a7d09e33ea69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 07:37:28 +0000 Subject: [PATCH 07/10] Bump pekkoVersion from 1.1.1 to 1.1.2 (#988) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5d3c289349..41e54d7b83 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' From 784a376fb0c5369b0d2b9f3fbf4d2a7b8892bdb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 08:51:33 +0000 Subject: [PATCH 08/10] Bump ch.qos.logback:logback-classic from 1.5.8 to 1.5.9 (#987) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 41e54d7b83..0101467b78 100644 --- a/build.gradle +++ b/build.gradle @@ -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' From 252203616d94146bd0b1f093c6dd1b92e84f5055 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 04:21:42 +0000 Subject: [PATCH 09/10] Bump sphinx-rtd-theme from 3.0.0 to 3.0.1 in /docs/readthedocs Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 3.0.0 to 3.0.1. - [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst) - [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/3.0.0...3.0.1) --- updated-dependencies: - dependency-name: sphinx-rtd-theme dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index fc896db5d2..3d3cfec6a0 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,5 +1,5 @@ Sphinx==8.0.2 -sphinx-rtd-theme==3.0.0 +sphinx-rtd-theme==3.0.1 sphinxcontrib-plantuml==0.30 myst-parser==4.0.0 markdown-it-py==3.0.0 From bd87d1e54bc54d200514ac8f740124b11b484194 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 08:42:44 +0000 Subject: [PATCH 10/10] Bump sphinx from 8.0.2 to 8.1.0 in /docs/readthedocs (#992) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index 3d3cfec6a0..382b7eaf88 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,4 +1,4 @@ -Sphinx==8.0.2 +Sphinx==8.1.0 sphinx-rtd-theme==3.0.1 sphinxcontrib-plantuml==0.30 myst-parser==4.0.0