ComputerKeeper/Jenkinsfile

37 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-08-05 03:24:36 +00:00
/*******************************************************************************
* ComputerKeeper Build Automation
* -----------------------------------------------------------------------------
*
* Build the application in a custom PyInstaller container to support function
* with Microsoft-Windows systems.
2022-08-05 03:24:36 +00:00
*
* 2022 - Stanley Solutions
* Joe Stanley
******************************************************************************/
2022-11-04 02:16:21 +00:00
node ('windows') {
2022-08-05 03:24:36 +00:00
// Prep Stage - Clone the Repository and Configure System as Needed.
stage('Prep') {
2022-11-07 02:21:23 +00:00
checkout scm
2022-08-05 03:24:36 +00:00
}
// Build Stage - Run the PyInstaller Steps to Generate an Executable.
stage('Build') {
2022-11-07 02:18:43 +00:00
bat """pyinstaller --noconfirm --onefile --windowed "./main.py" """
}
2022-11-07 04:06:29 +00:00
// Wrap Up - Archive the Generated Executables
stage('Archive') {
// Provide Credentials to Upload to Gitea
withCredentials([
usernamePassword(credentialsId: 'gitea-jenkinsbot',
usernameVariable: 'GITEA_USER',
passwordVariable: 'GITEA_PASS')
]) {
// Publish the Latest
bat "python publish_package.py"
}
}
2022-08-05 03:24:36 +00:00
}