Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • seco-ne/yocto/infrastructure/gitlab-ci
1 result
Show changes
Commits on Source (2)
......@@ -30,8 +30,9 @@ def integrate_into_manifest(
# Checkout manifest
try:
manifest_repo = Repo.clone_from(clone_url.url, manifest_dir)
manifest_repo.heads[integration_base].checkout()
manifest_repo = Repo.clone_from(
clone_url.url, manifest_dir, branch=integration_base
)
except GitCommandError as e:
sys.exit("ERROR: could not clone manifest repository\n" + str(e))
except IndexError as e:
......
......@@ -5,6 +5,7 @@ import json
import os
import sys
import shutil
import subprocess
def main():
......@@ -21,6 +22,11 @@ def main():
dest="release_dir",
required=True,
)
parser.add_argument(
"--sdk-dir",
help="""Yocto sdk directory""",
dest="sdk_dir",
)
args, _ = parser.parse_known_args()
......@@ -34,6 +40,7 @@ def main():
machine = buildvars["MACHINE"]
version = buildvars["DISTRO_VERSION"]
sdkname = buildvars["TOOLCHAIN_OUTPUTNAME"]
artifacts_image = buildvars["DISTRO_IMAGES"].split()
artifacts_all = buildvars["DISTRO_RELEASE_ARTEFACTS"].split()
......@@ -61,6 +68,21 @@ def main():
print("Copy: %s -> %s" % (target_file, source_file))
shutil.copyfile(source_file, target_file, follow_symlinks=True)
# Handle SDK if available
if args.sdk_dir is not "":
sdkfile = "{}.sh".format(sdkname)
sdkfilepath = "{}/{}".format(args.sdk_dir, sdkfile)
sdkoutput_dir = "{}/sdk".format(output_dir)
sdkfile_parts = "{}/{}.part".format(sdkoutput_dir, sdkfile)
if os.path.exists(sdkfilepath):
print("Copy and split SDK from ", sdkfilepath)
os.makedirs(sdkoutput_dir, exist_ok=True)
subprocess.run(
["split", "-b", "512M", sdkfilepath, sdkfile_parts], check=True
)
else:
print("Skipping SDK, not found at ", sdkfilepath)
if __name__ == "__main__":
main()