def build_release_candidate(self): aHandlingImg = HandlingImgs(self.arch_release_candidate) # Perform the deployment in arpgtestrc arpgtestrc = \ RobotpkgTests(anArchReleaseCandidate=self.arch_release_candidate, debug=int(aHandlingImg.robotpkg_mng_vars['verbosity'])) if arpgtestrc.perform_test_rc(): # If it worked then compile the package specified in targetpkg if 'targetpkg' in self.arch_release_candidate.robotpkg_mng_vars: # Test if this is a list or not if isinstance( anArchReleaseCandidate.robotpkg_mng_vars['targetpkg'], str): arpgtestrc.compile_package( anArchReleaseCandidate.robotpkg_mng_vars['targetpkg']) self.notify_ok( "Robotpkg helpers", "Compiling " + anArchReleaseCandidate.robotpkg_mng_vars['targetpkg'] + " succeeded") else: print(self.RED + "ERROR: In json file targetpkg is not a string" + self.NC) if isinstance( anArchReleaseCandidate. robotpkg_mng_vars['targetpkg'], list): print(self.RED + "use targetpkgs instead" + self.NC) self.notify_wrong( "Robotpkg helpers", "Error in JSON file - Use targetpkgs instead") else: # If we have a list of package to compile if 'targetpkgs' in self.arch_release_candidate.robotpkg_mng_vars: for pkg_name in self.arch_release_candidate.robotpkg_mng_vars[ 'targetpkgs']: arpgtestrc.compile_package(pkg_name) else: self.notify_wrong("Error while processing", "Wrong handling of packages")
def create_ramfs_dir(self): aHandlingImgs = HandlingImgs(ROBOTPKG_MNG_ROOT=self.rpkgmngroot, sub_ramfs_mnt_pt=self.sub_ramfsmntpt) aHandlingImgs.create_ramfs_dir()
def clean_integration_directory(self): aHandlingImgs = HandlingImgs(ROBOTPKG_MNG_ROOT=self.rpkgmngroot, sub_ramfs_mnt_pt=self.sub_ramfsmntpt) aHandlingImgs.clean_integration_directory()
def save_integration(self, filename=None): aHandlingImgs = HandlingImgs(ROBOTPKG_MNG_ROOT=self.rpkgmngroot, sub_ramfs_mnt_pt=self.sub_ramfsmntpt, sub_archives=self.sub_archives) aHandlingImgs.backup_rpkg_dir(tar_file_name=filename)
#!/usr/bin/python3 import os from robotpkg_helpers import HandlingImgs aHandlingImgs = HandlingImgs(ramfs_dir="/mnt/ramfs") aHandlingImgs.create_ramfs_dir()
#!/usr/bin/env python3 import os from robotpkg_helpers import HandlingImgs aHandlingImgs = HandlingImgs() aHandlingImgs.prepare_mng_dirs()
def restore_dir(self, filename): aHandlingImgs = HandlingImgs(ROBOTPKG_MNG_ROOT=self.rpkgmngroot, sub_ramfs_mnt_pt=self.sub_ramfsmntpt, sub_archives=self.sub_archives) aHandlingImgs.restore_from_backup_dir(tar_file_name=filename)
#!/usr/bin/python3 import os from robotpkg_helpers import HandlingImgs aHandlingImgs = HandlingImgs() print(aHandlingImgs.extract_group_name())