mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2026-01-06 15:42:03 +00:00
Removed Jenkins
This commit is contained in:
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
@@ -1,30 +0,0 @@
|
||||
pipeline {
|
||||
agent any
|
||||
tools {
|
||||
gradle 'Gradle 7'
|
||||
jdk 'Java 17'
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(artifactNumToKeepStr: '5'))
|
||||
}
|
||||
stages {
|
||||
stage ('Build') {
|
||||
steps {
|
||||
sh 'git submodule update --init --recursive'
|
||||
rtGradleRun(
|
||||
usesPlugin: true,
|
||||
tool: 'Gradle 7',
|
||||
buildFile: 'build.gradle.kts',
|
||||
tasks: 'clean build',
|
||||
)
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: '**/build/libs/floodgate-*.jar',
|
||||
excludes: '**/floodgate-parent-*.jar,**/floodgate-api.jar,**/floodgate-core.jar',
|
||||
fingerprint: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ fun Project.lastCommitHash(): String? =
|
||||
the<IndraGitExtension>().commit()?.name?.substring(0, 7)
|
||||
|
||||
fun Project.branchName(): String =
|
||||
the<IndraGitExtension>().branchName() ?: jenkinsBranchName() ?: "local/dev"
|
||||
the<IndraGitExtension>().branchName() ?: "local/dev"
|
||||
|
||||
fun Project.shouldAddBranchName(): Boolean =
|
||||
System.getenv("IGNORE_BRANCH")?.toBoolean() ?: (branchName() !in arrayOf("master", "local/dev"))
|
||||
@@ -51,7 +51,7 @@ fun Project.versionWithBranchName(): String =
|
||||
branchName().replace(Regex("[^0-9A-Za-z-_]"), "-") + '-' + version
|
||||
|
||||
fun buildNumber(): Int =
|
||||
(System.getenv("GITHUB_RUN_NUMBER") ?: jenkinsBuildNumber())?.let { Integer.parseInt(it) } ?: -1
|
||||
System.getenv("GITHUB_RUN_NUMBER")?.let { Integer.parseInt(it) } ?: -1
|
||||
|
||||
fun buildNumberAsString(): String =
|
||||
buildNumber().takeIf { it != -1 }?.toString() ?: "??"
|
||||
@@ -85,8 +85,4 @@ fun Project.relocate(pattern: String) =
|
||||
.add(pattern)
|
||||
|
||||
private fun calcExclusion(section: String, bit: Int, excludedOn: Int): String =
|
||||
if (excludedOn and bit > 0) section else ""
|
||||
|
||||
// todo remove these when we're not using Jenkins anymore
|
||||
private fun jenkinsBranchName(): String? = System.getenv("BRANCH_NAME")
|
||||
private fun jenkinsBuildNumber(): String? = System.getenv("BUILD_NUMBER")
|
||||
if (excludedOn and bit > 0) section else ""
|
||||
Reference in New Issue
Block a user