added module for installer assets

This commit is contained in:
Andrei Yankovich 2019-12-13 16:09:43 +03:00
parent 785bc49903
commit 5607df30ab
5 changed files with 84 additions and 3 deletions

3
.gitignore vendored
View File

@ -8,3 +8,6 @@ gitpoller-workdir/
*.user
*__pycache__*
*.pyc
*.pyproject.user.*
*~

View File

@ -18,7 +18,7 @@
"qtUpdater.py",
"secretManager.py",
"NPM.py",
"git/gitBin.sh"
"git/gitBin.sh",
"asssetsinstaller.py"
]
}

View File

@ -0,0 +1,76 @@
# This Python file uses the following encoding: utf-8
import BuildBotLib.basemodule as base
from buildbot.plugins import util, steps
import os
import shutil
@util.renderer
def NDKDownloadCMD(props):
link = props.getProperty("revision")
module = props.getProperty("module")
shutil.rmtree(module)
res = []
format = link[link.rfind('.'):]
if module == "AndroidNDK":
res = ["curl", link, "--output", "temp." + format]
return res
@util.renderer
def ExtractCMD(props):
arr = os.listdir()
format = ""
module = props.getProperty("module")
for file in arr:
ix = file.find("temp.")
if ix == 0:
format = file[file.rfind('.'):]
res = []
if format == "zip":
res = ["unsip", "-d", module]
return res
def getFactory():
factory = base.getFactory();
factory.addStep(
steps.ShellCommand(
command = NDKDownloadCMD,
name = 'download new item',
description = 'download new item',
)
);
factory.addStep(
steps.ShellCommand(
command = ExtractCMD,
name = 'extract new item',
description = 'extract new item',
)
);
return factory
def getRepo():
return "";
def getPropertyes():
return [
util.ChoiceStringParameter(
name = 'module',
choices=["AndroidNDK", "AndroidSDK"],
default = "AndroidNDK"
),
]

View File

@ -16,7 +16,8 @@ class buildBotWorkers(BuildBotModule):
worker.Worker("github-worker", "pass"),
worker.Worker("Tester", "pass"),
worker.Worker("qtBuilder", "pass"),
worker.Worker("NPM", "pass")
worker.Worker("NPM", "pass"),
worker.Worker("AssetsInstaller", "pass")
]

View File

@ -17,6 +17,7 @@ bot.addBuilder("github-worker", "qmake");
bot.addBuilder("Tester", "qmake");
bot.addBuilder("qtBuilder", "qtUpdater");
bot.addBuilder("NPM", "NPM");
bot.addBuilder("AssetsInstaller", "asssetsinstaller");
c = BuildmasterConfig = bot.getMaster()