[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [sysadmin/binary-factory-tooling] craft/pipeline-templates: We are still not catching errors, let's 
From:       Ben Cooksley <null () kde ! org>
Date:       2018-03-31 21:35:28
Message-ID: E1f2O9o-00016w-6E () code ! kde ! org
[Download RAW message or body]

Git commit 2c92344e98b5f103faed447f9ec2dc07e78037b2 by Ben Cooksley.
Committed on 31/03/2018 at 21:35.
Pushed by bcooksley into branch 'master'.

We are still not catching errors, let's try another way

M  +16   -7    craft/pipeline-templates/mingw64.pipeline
M  +16   -7    craft/pipeline-templates/win32.pipeline
M  +16   -7    craft/pipeline-templates/win64.pipeline

https://commits.kde.org/sysadmin/binary-factory-tooling/2c92344e98b5f103faed447f9ec2dc07e78037b2


diff --git a/craft/pipeline-templates/mingw64.pipeline \
b/craft/pipeline-templates/mingw64.pipeline index 821f182..9cc3402 100644
--- a/craft/pipeline-templates/mingw64.pipeline
+++ b/craft/pipeline-templates/mingw64.pipeline
@@ -38,8 +38,12 @@ timestamps {
 			// 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% +
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft +				if \
errorlevel 1 exit /b %errorlevel% +
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c    nsis +				if \
errorlevel 1 exit /b %errorlevel%  """
 		}
 
@@ -54,7 +58,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --unmerge ${craftRebuildBlueprint} +				if errorlevel 1 exit /b \
%errorlevel%  """
 		}
 
@@ -62,7 +67,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --install-deps ${craftBuildBlueprint} +				if errorlevel 1 exit \
/b %errorlevel%  """
 		}
 
@@ -70,7 +76,8 @@ timestamps {
 			// Actually build the application now
 			bat """
 				cd "C:\\Craft\\BinaryFactory\\"
-				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} ${craftRebuildBlueprint} || exit /b %errorlevel% +				python \
craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target \
${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} +				if errorlevel \
1 exit /b %errorlevel%  """
 		}
 
@@ -78,7 +85,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --package ${craftBuildBlueprint} +				if errorlevel 1 exit /b \
%errorlevel%  """
 
 			// Then sign that installer and copy it to the Jenkins workspace so it can be \
grabbed from there @@ -86,7 +94,8 @@ timestamps {
 				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% +				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 \
+				if errorlevel 1 exit /b %errorlevel%  
 				xcopy /y %CRAFT_TMPDIR%\\* %WORKSPACE%
 				del /Q %CRAFT_TMPDIR%\\*
diff --git a/craft/pipeline-templates/win32.pipeline \
b/craft/pipeline-templates/win32.pipeline index 4f82be7..afa4534 100644
--- a/craft/pipeline-templates/win32.pipeline
+++ b/craft/pipeline-templates/win32.pipeline
@@ -38,8 +38,12 @@ timestamps {
 			// 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% +
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft +				if \
errorlevel 1 exit /b %errorlevel% +
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c    nsis +				if \
errorlevel 1 exit /b %errorlevel%  """
 		}
 
@@ -54,7 +58,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --unmerge ${craftRebuildBlueprint} +				if errorlevel 1 exit /b \
%errorlevel%  """
 		}
 
@@ -62,7 +67,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --install-deps ${craftBuildBlueprint} +				if errorlevel 1 exit \
/b %errorlevel%  """
 		}
 
@@ -70,7 +76,8 @@ timestamps {
 			// Actually build the application now
 			bat """
 				cd "C:\\Craft\\BinaryFactory\\"
-				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} ${craftRebuildBlueprint} || exit /b %errorlevel% +				python \
craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target \
${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} +				if errorlevel \
1 exit /b %errorlevel%  """
 		}
 
@@ -78,7 +85,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --package ${craftBuildBlueprint} +				if errorlevel 1 exit /b \
%errorlevel%  """
 
 			// Then sign that installer and copy it to the Jenkins workspace so it can be \
grabbed from there @@ -86,7 +94,8 @@ timestamps {
 				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% +				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 \
+				if errorlevel 1 exit /b %errorlevel%  
 				xcopy /y %CRAFT_TMPDIR%\\* %WORKSPACE%
 				del /Q %CRAFT_TMPDIR%\\*
diff --git a/craft/pipeline-templates/win64.pipeline \
b/craft/pipeline-templates/win64.pipeline index 2a2a4bf..35418b3 100644
--- a/craft/pipeline-templates/win64.pipeline
+++ b/craft/pipeline-templates/win64.pipeline
@@ -38,8 +38,12 @@ timestamps {
 			// 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% +
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c -i craft +				if \
errorlevel 1 exit /b %errorlevel% +
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c    nsis +				if \
errorlevel 1 exit /b %errorlevel%  """
 		}
 
@@ -54,7 +58,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --unmerge ${craftRebuildBlueprint} +				if errorlevel 1 exit /b \
%errorlevel%  """
 		}
 
@@ -62,7 +67,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --install-deps ${craftBuildBlueprint} +				if errorlevel 1 exit \
/b %errorlevel%  """
 		}
 
@@ -70,7 +76,8 @@ timestamps {
 			// Actually build the application now
 			bat """
 				cd "C:\\Craft\\BinaryFactory\\"
-				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} ${craftRebuildBlueprint} || exit /b %errorlevel% +				python \
craftmaster/Craftmaster.py --config craftmaster/config/CraftBinaryCache.ini --target \
${craftPlatform} -c ${craftProjectParams} ${craftRebuildBlueprint} +				if errorlevel \
1 exit /b %errorlevel%  """
 		}
 
@@ -78,7 +85,8 @@ timestamps {
 			// 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% \
+				python craftmaster/Craftmaster.py --config \
craftmaster/config/CraftBinaryCache.ini --target ${craftPlatform} -c \
${craftProjectParams} --package ${craftBuildBlueprint} +				if errorlevel 1 exit /b \
%errorlevel%  """
 
 			// Then sign that installer and copy it to the Jenkins workspace so it can be \
grabbed from there @@ -86,7 +94,8 @@ timestamps {
 				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% +				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 \
+				if errorlevel 1 exit /b %errorlevel%  
 				xcopy /y %CRAFT_TMPDIR%\\* %WORKSPACE%
 				del /Q %CRAFT_TMPDIR%\\*


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic