Skip to content

Commit

Permalink
Merge branch 'dev' into ck/#69-slackVoltageAngle
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-peter authored May 20, 2022
2 parents 1824d0a + f9e976a commit fad3271
Show file tree
Hide file tree
Showing 86 changed files with 2,461 additions and 1,053 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Implement SQL source for primary data [#34](https://github.com/ie3-institute/simona/issues/34), [#101](https://github.com/ie3-institute/simona/issues/101)

### Changed
- Improving code readability in EvcsAgent by moving FreeLotsRequest to separate methods
- Re-organizing test resources into their respective packages [#105](https://github.com/ie3-institute/simona/issues/105)
- BREAKING: Using snapshot version of PSDM
- Simplified PrimaryServiceProxy due to changes in PSDM [#120](https://github.com/ie3-institute/simona/issues/120)
- Improved handling of weights and their sum in determination of weather data [#173](https://github.com/ie3-institute/simona/issues/173)
- Improving code readability in EvcsAgent by moving FreeLotsRequest to separate methods [#19](https://github.com/ie3-institute/simona/issues/19)
- Sending termination message to external simulation on expected and unexpected shutdowns of SIMONA [#35](https://github.com/ie3-institute/simona/issues/35)
- Improved implementation of `RefSystemParser` [#212](https://github.com/ie3-institute/simona/issues/212)
- Removed Gradle task puml2png (Converting Plantuml to png / svg files) since it is no longer needed [#230](https://github.com/ie3-institute/simona/issues/230)
- Harmonized configuration of csv parameters [#149](https://github.com/ie3-institute/simona/issues/149)

### Fixed
- Location of `vn_simona` test grid (was partially in Berlin and Dortmund)
Expand Down
58 changes: 0 additions & 58 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ String mavenCentralCredentialsId = '87bfb2d4-7613-4816-9fe1-70dfd7e6dec2' // id
String mavenCentralSignKeyFileId = 'dc96216c-d20a-48ff-98c0-1c7ba096d08d' // id that matches the maven central sign key file set as jenkins property
String mavenCentralSignKeyId = 'a1357827-1516-4fa2-ab8e-72cdea07a692' // id that matches the maven central sign key id set as jenkins property

/* Rocket.Chat configuration */
String rocketChatChannel = 'jenkins'

/**
* pipeline configuration
*/
Expand Down Expand Up @@ -62,9 +59,6 @@ node {
/* prs from forks require a special handling*/
String headGitCheckoutUrl = prJsonObj == null ? gitCheckoutUrl : prJsonObj.head.repo.ssh_url

// notify rocket chat
notifyRocketChat(rocketChatChannel, ':jenkins_triggered:', buildStartMsg(currentBranchName, targetBranchName, projectName))

// checkout scm
String commitHash = ""
stage('checkout') {
Expand Down Expand Up @@ -183,15 +177,6 @@ node {
// deploy java docs
deployJavaDocs(projectName, sshCredentialsId, gitCheckoutUrl)
}

// notify rocket chat
String successMsg = "deployment of version $projectVersion from branch '$currentBranchName' to sonatype " +
"successful. If this is a deployment from 'main' pls remember visiting https://oss.sonatype.org to " +
"stage and release artifact!\n" +
"*project:* ${projectName}\n" +
"*branch:* ${currentBranchName}\n"

notifyRocketChat(rocketChatChannel, ':jenkins_party:', successMsg)
}
}

Expand All @@ -207,10 +192,6 @@ node {
]) {
sh "curl -s https://codecov.io/bash | bash -s - -t ${env.codeCovToken} -C ${commitHash}"
}

// notify Rocket.Chat
String successMsg = buildSuccessMsg(currentBranchName, targetBranchName, projectName)
notifyRocketChat(rocketChatChannel, ':jenkins_party:', successMsg)
}

} catch (Exception e) {
Expand All @@ -223,15 +204,6 @@ node {
// print exception
Date date = new Date()
println("[ERROR] [${date.format("dd/MM/yyyy")} - ${date.format("HH:mm:ss")}] " + e)

// notify rocket chat
net.sf.json.JSONObject prJsonObj = getPRJsonObj(orgName, projectName, env.CHANGE_ID)
String branchName = prJsonObj == null ? env.BRANCH_NAME : prJsonObj.head.ref
String errorMsg = "CI failed.\n" +
"*project:* ${projectName}\n" +
"*branch:* ${branchName}\n" +
"*error:* ${e.getMessage()}\n"
notifyRocketChat(rocketChatChannel, ':jenkins_explode:', errorMsg)
}

}
Expand Down Expand Up @@ -472,35 +444,6 @@ def publishReports(String relativeProjectDir) {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, escapeUnderscores: false, keepAll: true, reportDir: relativeProjectDir + '/build/reports/scoverageTest', reportFiles: 'scoverage.xml', reportName: "${relativeProjectDir}_scoverage_report", reportTitles: ''])
}

/* Rocket.Chat */

def notifyRocketChat(String rocketChatChannel, String emoji, String message) {
rocketSend channel: rocketChatChannel, emoji: emoji,
message: message
rawMessage: true
}

def buildSuccessMsg(String currentBranchName, String targetBranchName, String projectName) {

String msg = "Build successful!\n" +
"*project:* ${projectName}\n" +
"*branch:* ${currentBranchName}\n"
String targetBranch = targetBranchName != null ? "*target:* ${targetBranchName} \n" : ""


return msg + targetBranch
}

def buildStartMsg(String currentBranchName, String targetBranchName, String projectName) {

String msg = "Build triggered.\n" +
"*project:* ${projectName}\n" +
"*branch:* ${currentBranchName}\n"
String targetBranch = targetBranchName != null ? "*target:* ${targetBranchName} \n" : ""

return msg + targetBranch
}

def prFromFork() {
return env.CHANGE_FORK != null
}
Expand Down Expand Up @@ -728,7 +671,6 @@ def compareVersionParts(String sourceBranchType, String[] sourceBranchVersion, S
break
}


}

def getBranchType(String branchName) {
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ plugins {
id 'signing'
id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined)
id 'pmd' // code check, working on source code
id 'com.diffplug.spotless' version '6.4.2'// code format
id 'com.diffplug.spotless' version '6.6.1'// code format
id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar
id "com.github.ben-manes.versions" version '0.42.0'
id "de.undercouch.download" version "5.0.4" // downloads plugin
id "de.undercouch.download" version "5.1.0" // downloads plugin
id "kr.motd.sphinx" version "2.10.1" // documentation generation
id "com.github.johnrengelman.shadow" version "7.1.2" // fat jar
id "org.sonarqube" version "3.3" // sonarqube
Expand All @@ -27,10 +27,10 @@ ext {
scalaVersion = '2.13'
scalaBinaryVersion = '2.13.8'
akkaVersion = '2.6.19'
tscfgVersion = '0.9.997'
scapegoatVersion = '1.4.12'
tscfgVersion = '0.9.998'
scapegoatVersion = '1.4.14'

testContainerVersion = '0.40.5'
testContainerVersion = '0.40.7'

scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator // location of script plugins
}
Expand Down Expand Up @@ -103,9 +103,9 @@ dependencies {
/* testing */
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0'
testImplementation 'org.scalatestplus:mockito-3-4_2.13:3.2.10.0'
implementation 'org.mockito:mockito-core:4.4.0' // mocking framework
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.11"
testRuntimeClasspath 'com.vladsch.flexmark:flexmark-all:0.64.0'
implementation 'org.mockito:mockito-core:4.5.1' // mocking framework
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.12"
testRuntimeOnly 'com.vladsch.flexmark:flexmark-all:0.64.0' //scalatest html output
testImplementation group: 'org.pegdown', name: 'pegdown', version: '1.6.0'
testImplementation "com.typesafe.akka:akka-testkit_${scalaVersion}:${akkaVersion}" // akka testkit

Expand Down
20 changes: 20 additions & 0 deletions docs/readthedocs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= python3 -msphinx
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading

0 comments on commit fad3271

Please sign in to comment.