Add Jenkinsfile
Some checks failed
forgejo/Czech Quests/addon/pipeline/head There was a failure building this commit

This commit is contained in:
Roman Jaroš 2025-03-08 09:08:16 +01:00
parent 45c722e271
commit 29b3a7336d

44
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,44 @@
@Library('jenkins-lib')
import MasterJob
def parametersArray = [
choice(
name: 'RELEASE',
choices: ['patch', 'minor', 'major'],
description: 'Release new version'
),
choice(
name: 'GAME',
choices: ['classic_era', 'retail'],
description: 'Create build with manual tag',
)
]
def tocFiles = [
"classic_era": "CzechQuests_Vanilla.toc",
"retail": "CzechQuests_Mainline.toc"
]
properties([parameters(parametersArray)])
MasterJob [:], { ->
checkout scm
stageWhen('build') {
def game = params.GAME
def tocFileContent = readFile tocFiles[game]
def version = sh(
script: "grep '## Version:' CzechQuests_Vanilla.toc | cut -d ' ' -f 3",
returnStdout: true
).trim()
print(version)
// create zip
}
stageWhen('release') {
// create new forgejo release and upload zip
}
}