diff --git a/craft/pipeline-templates/macos.pipeline b/craft/pipeline-templates/macos.pipeline index 43c3add..0e6cd74 100644 --- a/craft/pipeline-templates/macos.pipeline +++ b/craft/pipeline-templates/macos.pipeline @@ -1,99 +1,99 @@ // Define the Craft target to use def craftPlatform = "macos-64-clang" // Sometimes we need to include additional parameters to Craft which are specific to the project def craftProjectParams = "" // Determine if we need to build a specific version of this project if( craftTarget != '' ) { // If we have a specified version (Craft target) then we need to pass this along to Craft craftProjectParams = "--target ${craftTarget}" } // Request a node to be allocated to us node( "macOS" ) { // We want Timestamps on everything timestamps { // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed catchError { // First we want to make sure Craft is ready to go stage('Preparing Craft') { // Make sure the Git checkouts are up to date sh """ cd ~/Craft/BinaryFactory/craftmaster/ git pull cd ~/Craft/BinaryFactory/tooling/ git pull """ // Update Craft itself sh """ cd ~/Craft/BinaryFactory/ /usr/local/bin/python3 craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft """ } stage('Cleaning Up Prior Builds') { // Cleanup our workspace deleteDir() // Ensure we have nothing left behind in the packaging workspace used by Craft sh """ cd ~/Craft/BinaryFactory/ packageDir=\$(/usr/local/bin/python3 "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base) rm -rf "\$packageDir" """ // Make sure the build environment for this application is clean sh """ cd ~/Craft/BinaryFactory/ /usr/local/bin/python3 craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --unmerge ${craftRebuildBlueprint} """ } stage('Installing Dependencies') { // Ask Craftmaster to ensure all the dependencies are installed for this application we are going to be building sh """ cd ~/Craft/BinaryFactory/ /usr/local/bin/python3 craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --install-deps ${craftBuildBlueprint} """ } stage('Building') { // Actually build the application now sh """ cd ~/Craft/BinaryFactory/ - /usr/local/bin/python3 craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftBuildBlueprint} + /usr/local/bin/python3 craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} """ } stage('Packaging') { // Now generate an installer for it sh """ cd ~/Craft/BinaryFactory/ /usr/local/bin/python3 craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --package ${craftBuildBlueprint} """ // Now copy it to the Jenkins workspace so it can be grabbed from there sh """ cd ~/Craft/BinaryFactory/ packageDir=\$(/usr/local/bin/python3 "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base) cp -vf \$packageDir/ \$WORKSPACE/ rm -rf "\$packageDir" """ } stage('Capturing Package') { // Then we ask Jenkins to capture the generated installers as an artifact archiveArtifacts artifacts: '*.dmg, *.sha256', onlyIfSuccessful: true } } // As the Mac Slaves are permanent ones, we erase the Workspace as the last thing we do deleteDir() } } diff --git a/craft/pipeline-templates/mingw64.pipeline b/craft/pipeline-templates/mingw64.pipeline index c6ff9c0..ad653cf 100644 --- a/craft/pipeline-templates/mingw64.pipeline +++ b/craft/pipeline-templates/mingw64.pipeline @@ -1,101 +1,101 @@ // Define the Craft target to use def craftPlatform = "windows-mingw_64-gcc" // Sometimes we need to include additional parameters to Craft which are specific to the project def craftProjectParams = "" // Determine if we need to build a specific version of this project if( craftTarget != '' ) { // If we have a specified version (Craft target) then we need to pass this along to Craft craftProjectParams = "--target ${craftTarget}" } // Request a node to be allocated to us node( "WindowsMingw" ) { // We want Timestamps on everything timestamps { // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed catchError { // First we want to make sure Craft is ready to go stage('Preparing Craft') { // Make sure the Git checkouts are up to date bat """ cd "C:\\Craft\\BinaryFactory\\craftmaster\\" git pull cd "C:\\Craft\\BinaryFactory\\tooling\\" git pull """ // Update Craft itself and make sure NSIS is installed bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft || exit /b %errorlevel% python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c nsis || exit /b %errorlevel% """ } stage('Cleaning Up Prior Builds') { // Cleanup our workspace deleteDir() // Ensure we have nothing left behind in the packaging workspace used by Craft bat """ cd "C:\\Craft\\BinaryFactory\\" for /f %%i in ('python "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base') do set CRAFT_TMPDIR=%%i del /Q %CRAFT_TMPDIR%\\* """ // Make sure the build environment for this application is clean bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --unmerge ${craftRebuildBlueprint} || exit /b %errorlevel% """ } stage('Installing Dependencies') { // Ask Craftmaster to ensure all the dependencies are installed for this application we are going to be building bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --install-deps ${craftBuildBlueprint} || exit /b %errorlevel% """ } stage('Building') { // Actually build the application now bat """ cd "C:\\Craft\\BinaryFactory\\" - python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftBuildBlueprint} || exit /b %errorlevel% + python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} || exit /b %errorlevel% """ } stage('Packaging') { // Now generate an installer for it bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --package ${craftBuildBlueprint} || exit /b %errorlevel% """ // Then sign that installer and copy it to the Jenkins workspace so it can be grabbed from there bat """ cd "C:\\Craft\\BinaryFactory\\" for /f %%i in ('python "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base') do set CRAFT_TMPDIR=%%i python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target windows-msvc2017_64-cl -c --run signtool.exe sign /v /n "K Desktop Environment e.V." /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /a %CRAFT_TMPDIR%\\*.exe || exit /b %errorlevel% xcopy /y %CRAFT_TMPDIR%\\* %WORKSPACE% del /Q %CRAFT_TMPDIR%\\* """ } stage('Capturing Package') { // Then we ask Jenkins to capture the generated installers as an artifact archiveArtifacts artifacts: '*.exe, *.7z, *.sha256', onlyIfSuccessful: true } } // As the Windows Slaves are permanent ones, we erase the Workspace as the last thing we do deleteDir() } } diff --git a/craft/pipeline-templates/win32.pipeline b/craft/pipeline-templates/win32.pipeline index f5bcaa9..564a83d 100644 --- a/craft/pipeline-templates/win32.pipeline +++ b/craft/pipeline-templates/win32.pipeline @@ -1,101 +1,101 @@ // Define the Craft target to use def craftPlatform = "windows-msvc2017_32-cl" // Sometimes we need to include additional parameters to Craft which are specific to the project def craftProjectParams = "" // Determine if we need to build a specific version of this project if( craftTarget != '' ) { // If we have a specified version (Craft target) then we need to pass this along to Craft craftProjectParams = "--target ${craftTarget}" } // Request a node to be allocated to us node( "WindowsMSVC" ) { // We want Timestamps on everything timestamps { // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed catchError { // First we want to make sure Craft is ready to go stage('Preparing Craft') { // Make sure the Git checkouts are up to date bat """ cd "C:\\Craft\\BinaryFactory\\craftmaster\\" git pull cd "C:\\Craft\\BinaryFactory\\tooling\\" git pull """ // Update Craft itself and make sure NSIS is installed bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft || exit /b %errorlevel% python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c nsis || exit /b %errorlevel% """ } stage('Cleaning Up Prior Builds') { // Cleanup our workspace deleteDir() // Ensure we have nothing left behind in the packaging workspace used by Craft bat """ cd "C:\\Craft\\BinaryFactory\\" for /f %%i in ('python "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base') do set CRAFT_TMPDIR=%%i del /Q %CRAFT_TMPDIR%\\* """ // Make sure the build environment for this application is clean bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --unmerge ${craftRebuildBlueprint} || exit /b %errorlevel% """ } stage('Installing Dependencies') { // Ask Craftmaster to ensure all the dependencies are installed for this application we are going to be building bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --install-deps ${craftBuildBlueprint} || exit /b %errorlevel% """ } stage('Building') { // Actually build the application now bat """ cd "C:\\Craft\\BinaryFactory\\" - python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftBuildBlueprint} || exit /b %errorlevel% + python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} || exit /b %errorilevel% """ } stage('Packaging') { // Now generate an installer for it bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --package ${craftBuildBlueprint} || exit /b %errorlevel% """ // Then sign that installer and copy it to the Jenkins workspace so it can be grabbed from there bat """ cd "C:\\Craft\\BinaryFactory\\" for /f %%i in ('python "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base') do set CRAFT_TMPDIR=%%i python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c --run signtool.exe sign /v /n "K Desktop Environment e.V." /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /a %CRAFT_TMPDIR%\\*.exe || exit /b %errorlevel% xcopy /y %CRAFT_TMPDIR%\\* %WORKSPACE% del /Q %CRAFT_TMPDIR%\\* """ } stage('Capturing Package') { // Then we ask Jenkins to capture the generated installers as an artifact archiveArtifacts artifacts: '*.exe, *.7z, *.sha256', onlyIfSuccessful: true } } // As the Windows Slaves are permanent ones, we erase the Workspace as the last thing we do deleteDir() } } diff --git a/craft/pipeline-templates/win64.pipeline b/craft/pipeline-templates/win64.pipeline index 26e9f80..9e038eb 100644 --- a/craft/pipeline-templates/win64.pipeline +++ b/craft/pipeline-templates/win64.pipeline @@ -1,101 +1,101 @@ // Define the Craft target to use def craftPlatform = "windows-msvc2017_64-cl" // Sometimes we need to include additional parameters to Craft which are specific to the project def craftProjectParams = "" // Determine if we need to build a specific version of this project if( craftTarget != '' ) { // If we have a specified version (Craft target) then we need to pass this along to Craft craftProjectParams = "--target ${craftTarget}" } // Request a node to be allocated to us node( "WindowsMSVC" ) { // We want Timestamps on everything timestamps { // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed catchError { // First we want to make sure Craft is ready to go stage('Preparing Craft') { // Make sure the Git checkouts are up to date bat """ cd "C:\\Craft\\BinaryFactory\\craftmaster\\" git pull cd "C:\\Craft\\BinaryFactory\\tooling\\" git pull """ // Update Craft itself and make sure NSIS is installed bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft || exit /b %errorlevel% python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c nsis || exit /b %errorlevel% """ } stage('Cleaning Up Prior Builds') { // Cleanup our workspace deleteDir() // Ensure we have nothing left behind in the packaging workspace used by Craft bat """ cd "C:\\Craft\\BinaryFactory\\" for /f %%i in ('python "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base') do set CRAFT_TMPDIR=%%i del /Q %CRAFT_TMPDIR%\\* """ // Make sure the build environment for this application is clean bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --unmerge ${craftRebuildBlueprint} || exit /b %errorlevel% """ } stage('Installing Dependencies') { // Ask Craftmaster to ensure all the dependencies are installed for this application we are going to be building bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --install-deps ${craftBuildBlueprint} || exit /b %errorlevel% """ } stage('Building') { // Actually build the application now bat """ cd "C:\\Craft\\BinaryFactory\\" - python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftBuildBlueprint} || exit /b %errorlevel% + python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} || exit /b %errorlevel% """ } stage('Packaging') { // Now generate an installer for it bat """ cd "C:\\Craft\\BinaryFactory\\" python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c ${craftProjectParams} --package ${craftBuildBlueprint} || exit /b %errorlevel% """ // Then sign that installer and copy it to the Jenkins workspace so it can be grabbed from there bat """ cd "C:\\Craft\\BinaryFactory\\" for /f %%i in ('python "craftmaster/Craftmaster.py" --config "craftmaster/config/CraftBinaryCache.ini" --target ${craftPlatform} -c -q --get "packageDestinationDir()" virtual/base') do set CRAFT_TMPDIR=%%i python craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c --run signtool.exe sign /v /n "K Desktop Environment e.V." /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /a %CRAFT_TMPDIR%\\*.exe || exit /b %errorlevel% xcopy /y %CRAFT_TMPDIR%\\* %WORKSPACE% del /Q %CRAFT_TMPDIR%\\* """ } stage('Capturing Package') { // Then we ask Jenkins to capture the generated installers as an artifact archiveArtifacts artifacts: '*.exe, *.7z, *.sha256', onlyIfSuccessful: true } } // As the Windows Slaves are permanent ones, we erase the Workspace as the last thing we do deleteDir() } }