Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Deployment #1064

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix implausible test cases of HpModelSpec [#1042](https://github.com/ie3-institute/simona/issues/1042)
- Refactoring to only use 'lastHpState' and 'relevantData' for 'ThermalGrid' calculations [#916](https://github.com/ie3-institute/simona/issues/916)
- Refactor thermal calcRelevantData [#1051](https://github.com/ie3-institute/simona/issues/1051)
- Removed Deployment stage from Jenkinsfile [#1063](https://github.com/ie3-institute/simona/issues/1063)

### Fixed
- Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505)
Expand Down
46 changes: 0 additions & 46 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,52 +133,6 @@ node {
}
}

// deploy stage only if branch is main or dev
if (env.BRANCH_NAME == "main" || env.BRANCH_NAME == "dev") {
stage('deploy') {
// determine project version
String projectVersion = sh(returnStdout: true, script: "set +x && cd ${projectName}; ./gradlew -q " +
"${(env.BRANCH_NAME == "dev") ? "devVersion" : "currentVersion"}").toString().trim()

// get the sonatype credentials stored in the jenkins secure keychain
withCredentials([
usernamePassword(credentialsId: mavenCentralCredentialsId, usernameVariable: 'MAVENCENTRAL_USER', passwordVariable: 'MAVENCENTRAL_PASS'),
file(credentialsId: mavenCentralSignKeyFileId, variable: 'MAVENCENTRAL_KEYFILE'),
usernamePassword(credentialsId: mavenCentralSignKeyId, usernameVariable: 'MAVENCENTRAL_SIGNINGKEYID', passwordVariable: 'MAVENCENTRAL_SIGNINGPASS')
]) {

/*
* IMPORTANT: Do not issue 'clean' in the following task
*/
sh(
script: """set +x && cd $projectName""" +
''' set +x; ./gradlew javadoc''',
returnStdout: true
)

String deployGradleTasks = '--refresh-dependencies test ' +
'publish -Puser=${MAVENCENTRAL_USER} ' +
'-Ppassword=${MAVENCENTRAL_PASS} ' +
'-Psigning.keyId=${MAVENCENTRAL_SIGNINGKEYID} ' +
'-Psigning.password=${MAVENCENTRAL_SIGNINGPASS} ' +
'-Psigning.secretKeyRingFile=${MAVENCENTRAL_KEYFILE} ' +
"-PdeployVersion='$projectVersion'"

gradle(deployGradleTasks, projectName)
}

if (env.BRANCH_NAME == "main") {
// create tag on main and push it to origin
createAndPushTagOnMain(projectName, sshCredentialsId)

// todo JH create github release

// deploy java docs
deployJavaDocs(projectName, sshCredentialsId, gitCheckoutUrl)
}
}
}

// post processing
stage('post processing') {

Expand Down
Loading