mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge pull request #424 from alexjacks92/master
Jenkins: adding develop branch testing
This commit is contained in:
commit
bfb10f3692
@ -16,11 +16,11 @@ from xml.dom.minidom import parse, parseString
|
|||||||
import Emailer
|
import Emailer
|
||||||
from regression_utils import *
|
from regression_utils import *
|
||||||
|
|
||||||
def compile(errore, attachli, parsedin):
|
def compile(errore, attachli, parsedin, branch):
|
||||||
global to
|
global to
|
||||||
global server
|
global server
|
||||||
global subj
|
global subj
|
||||||
global email_enabled
|
global email_enabled
|
||||||
global redo
|
global redo
|
||||||
global tryredo
|
global tryredo
|
||||||
global failedbool
|
global failedbool
|
||||||
@ -37,12 +37,12 @@ def compile(errore, attachli, parsedin):
|
|||||||
while(redo):
|
while(redo):
|
||||||
passed = True
|
passed = True
|
||||||
if(passed):
|
if(passed):
|
||||||
gitPull("sleuthkit")
|
gitPull("sleuthkit", branch)
|
||||||
if(passed):
|
if(passed):
|
||||||
vsBuild()
|
vsBuild()
|
||||||
print("TSK")
|
print("TSK")
|
||||||
if(passed):
|
if(passed):
|
||||||
gitPull("autopsy")
|
gitPull("autopsy", branch)
|
||||||
if(passed):
|
if(passed):
|
||||||
antBuild("datamodel", False)
|
antBuild("datamodel", False)
|
||||||
print("DataModel")
|
print("DataModel")
|
||||||
@ -60,13 +60,13 @@ def compile(errore, attachli, parsedin):
|
|||||||
if(tryredo):
|
if(tryredo):
|
||||||
errorem = ""
|
errorem = ""
|
||||||
errorem += "Rebuilt properly.\n"
|
errorem += "Rebuilt properly.\n"
|
||||||
if email_enabled:
|
if email_enabled:
|
||||||
Emailer.send_email(to, server, subj, errorem, attachl)
|
Emailer.send_email(to, server, subj, errorem, attachl)
|
||||||
attachl = []
|
attachl = []
|
||||||
passed = True
|
passed = True
|
||||||
|
|
||||||
#Pulls from git
|
#Pulls from git
|
||||||
def gitPull(TskOrAutopsy):
|
def gitPull(TskOrAutopsy, branch):
|
||||||
global SYS
|
global SYS
|
||||||
global errorem
|
global errorem
|
||||||
global attachl
|
global attachl
|
||||||
@ -75,7 +75,7 @@ def gitPull(TskOrAutopsy):
|
|||||||
attachl.append(gppth)
|
attachl.append(gppth)
|
||||||
gpout = open(gppth, 'a')
|
gpout = open(gppth, 'a')
|
||||||
toPull = "https://www.github.com/sleuthkit/" + TskOrAutopsy
|
toPull = "https://www.github.com/sleuthkit/" + TskOrAutopsy
|
||||||
call = ["git", "pull", toPull]
|
call = ["git", "pull", toPull, branch]
|
||||||
if TskOrAutopsy == "sleuthkit":
|
if TskOrAutopsy == "sleuthkit":
|
||||||
ccwd = os.path.join("..", "..", "..", "sleuthkit")
|
ccwd = os.path.join("..", "..", "..", "sleuthkit")
|
||||||
else:
|
else:
|
||||||
@ -114,7 +114,7 @@ def vsBuild():
|
|||||||
if(not tryredo):
|
if(not tryredo):
|
||||||
errorem += "LIBTSK C++ failed to build.\n"
|
errorem += "LIBTSK C++ failed to build.\n"
|
||||||
attachl.append(VSpth)
|
attachl.append(VSpth)
|
||||||
if email_enabled:
|
if email_enabled:
|
||||||
Emailer.send_email(parsed, errorem, attachl, False)
|
Emailer.send_email(parsed, errorem, attachl, False)
|
||||||
tryredo = True
|
tryredo = True
|
||||||
passed = False
|
passed = False
|
||||||
@ -157,7 +157,7 @@ def antBuild(which, Build):
|
|||||||
if(not tryredo):
|
if(not tryredo):
|
||||||
errorem += "DataModel Java build failed.\n"
|
errorem += "DataModel Java build failed.\n"
|
||||||
attachl.append(antpth)
|
attachl.append(antpth)
|
||||||
if email_enabled:
|
if email_enabled:
|
||||||
Emailer.send_email(to, server, subj, errorem, attachl)
|
Emailer.send_email(to, server, subj, errorem, attachl)
|
||||||
passed = False
|
passed = False
|
||||||
tryredo = True
|
tryredo = True
|
||||||
@ -174,13 +174,15 @@ def main():
|
|||||||
global email_enabled
|
global email_enabled
|
||||||
global to
|
global to
|
||||||
global server
|
global server
|
||||||
global subj
|
global subj
|
||||||
errore = ""
|
errore = ""
|
||||||
attachli = []
|
attachli = []
|
||||||
config_file = ""
|
config_file = ""
|
||||||
arg = sys.argv.pop(0)
|
arg = sys.argv.pop(0)
|
||||||
arg = sys.argv.pop(0)
|
arg = sys.argv.pop(0)
|
||||||
config_file = arg
|
config_file = arg
|
||||||
|
arg = sys.argv.pop(0)
|
||||||
|
branch = arg
|
||||||
parsedin = parse(config_file)
|
parsedin = parse(config_file)
|
||||||
try:
|
try:
|
||||||
to = parsedin.getElementsByTagName("email")[0].getAttribute("value").encode().decode("utf_8")
|
to = parsedin.getElementsByTagName("email")[0].getAttribute("value").encode().decode("utf_8")
|
||||||
@ -188,9 +190,9 @@ def main():
|
|||||||
subj = parsedin.getElementsByTagName("subject")[0].getAttribute("value").encode().decode("utf_8")
|
subj = parsedin.getElementsByTagName("subject")[0].getAttribute("value").encode().decode("utf_8")
|
||||||
except Exception:
|
except Exception:
|
||||||
email_enabled = False
|
email_enabled = False
|
||||||
# email_enabled = (to is not None) and (server is not None) and (subj is not None)
|
# email_enabled = (to is not None) and (server is not None) and (subj is not None)
|
||||||
email_enabled = False
|
email_enabled = False
|
||||||
compile(errore, attachli, parsedin)
|
compile(errore, attachli, parsedin, branch)
|
||||||
|
|
||||||
class OS:
|
class OS:
|
||||||
LINUX, MAC, WIN, CYGWIN = range(4)
|
LINUX, MAC, WIN, CYGWIN = range(4)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user