Skip to content
Merged
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
67 changes: 0 additions & 67 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
// general config values
////////////////////////////////


//// Rocket.Chat channel to publish updates
final String rocketChatChannel = "jenkins"


//// project build dir order
//// this list contains the build order
//// normally it *should* start with the project under investigation
Expand Down Expand Up @@ -83,11 +78,6 @@ if (env.BRANCH_NAME == "main") {

try {

// notify rocket chat about the deployment
rocketSend channel: rocketChatChannel, emoji: ':jenkins_triggered:',
message: "deploying v"+projectVersion+" to oss sonatype. if this is a release deployment pls remember to stag and release afterwards!\n"
rawMessage: true

// set java version
setJavaVersion(javaVersionId)

Expand Down Expand Up @@ -159,14 +149,6 @@ if (env.BRANCH_NAME == "main") {
gradle("${deployGradleTasks} $preventSHACheckSums")

}

// notify rocket chat
rocketSend channel: rocketChatChannel, emoji: ':jenkins_party:',
message: "deployment v"+projectVersion+" successful. If this was a release deployment pls remember visiting https://oss.sonatype.org " +
"too stag and release the artifact!" +
"*repo:* ${urls.get(0)}/${projects.get(0)}\n" +
"*branch:* main \n"
rawMessage: true
}

} catch (Exception e) {
Expand All @@ -179,13 +161,6 @@ if (env.BRANCH_NAME == "main") {
// print exception
Date date = new Date()
println("[ERROR] [${date.format("dd/MM/yyyy")} - ${date.format("HH:mm:ss")}]" + e)

// notify rocket chat
rocketSend channel: rocketChatChannel, emoji: ':jenkins_explode:',
message: "deployment v"+projectVersion+" failed!\n" +
"*repo:* ${urls.get(0)}/${projects.get(0)}\n" +
"*branch:* main\n"
rawMessage: true
}

}
Expand Down Expand Up @@ -220,11 +195,6 @@ if (env.BRANCH_NAME == "main") {
"main branch build triggered (incl. snapshot deploy) by merging pr from feature branch '${featureBranchName}'"
: "main branch build triggered (incl. snapshot deploy) for commit with message '${jsonObject.commit.message}'"

// notify rocket chat about the started feature branch run
rocketSend channel: rocketChatChannel, emoji: ':jenkins_triggered:',
message: message + "\n"
rawMessage: true

// set build display name
currentBuild.displayName = ((featureBranchName?.trim()) ? "merge pr branch '${featureBranchName}'" : "commit '" +
"${jsonObject.commit.message.length() <= 20 ? jsonObject.commit.message : jsonObject.commit.message.substring(0, 20)}...'") + " (" + currentBuild.displayName + ")"
Expand Down Expand Up @@ -286,16 +256,6 @@ if (env.BRANCH_NAME == "main") {

}

// notify rocket chat
message = (featureBranchName?.trim()) ?
"main branch build successful! Merged pr from feature branch '${featureBranchName}'"
: "main branch build successful! Build commit with message is '${jsonObject.commit.message}'"
rocketSend channel: rocketChatChannel, emoji: ':jenkins_party:',
message: message + "\n" +
"*repo:* ${urls.get(0)}/${projects.get(0)}\n" +
"*branch:* main \n"
rawMessage: true

}


Expand All @@ -309,12 +269,6 @@ if (env.BRANCH_NAME == "main") {
// print exception
Date date = new Date()
println("[ERROR] [${date.format("dd/MM/yyyy")} - ${date.format("HH:mm:ss")}]" + e)

// notify rocket chat
rocketSend channel: rocketChatChannel, emoji: ':jenkins_explode:',
message: "merge feature into main failed!\n" +
"*repo:* ${urls.get(0)}/${projects.get(0)}\n"
rawMessage: true
}

}
Expand Down Expand Up @@ -355,13 +309,6 @@ if (env.BRANCH_NAME == "main") {
/// set the build name
currentBuild.displayName = featureBranchName + " (" + currentBuild.displayName + ")"

// notify rocket chat about the started feature branch run
rocketSend channel: rocketChatChannel, emoji: ':jenkins_triggered:',
message: "feature branch build triggered:\n" +
"*repo:* ${repoName}\n" +
"*branch:* ${featureBranchName}\n"
rawMessage: true

stage('checkout from scm') {

try {
Expand Down Expand Up @@ -420,13 +367,6 @@ if (env.BRANCH_NAME == "main") {
// call codecov
sh "curl -s https://codecov.io/bash | bash -s - -t ${env.codeCovToken} -C ${commitHash}"
}

// notify rocket chat
rocketSend channel: rocketChatChannel, emoji: ':jenkins_party:',
message: "feature branch test successful!\n" +
"*repo:* ${repoName}\n" +
"*branch:* ${featureBranchName}\n"
rawMessage: true
}
} catch (Exception e) {
// set build result to failure
Expand All @@ -438,13 +378,6 @@ if (env.BRANCH_NAME == "main") {
// print exception
Date date = new Date()
println("[ERROR] [${date.format("dd/MM/yyyy")} - ${date.format("HH:mm:ss")}]" + e)

// notify rocket chat
rocketSend channel: rocketChatChannel, emoji: ':jenkins_explode:',
message: "feature branch test failed!\n" +
"*repo:* ${repoName}\n" +
"*branch:* ${featureBranchName}\n"
rawMessage: true
}

}
Expand Down