Edk2 ci build
edk2_ci_build ¶
Code that supports CI/CD via the ci_build invocable.
Contains a CIBuildSettingsManager that must be subclassed in a build settings file. This provides platform specific information to Edk2CiBuild invocable while allowing the invocable itself to remain platform agnostic.
CiBuildSettingsManager ¶
Platform specific settings for Edk2CiBuild.
Provide information necessary for stuart_ci_build.exe
or
edk2_ci_build.py
to successfully execute.
Example of Overriding CiBuildSettingsManager
from edk2toolext.invocables.edk2_ci_build import CiBuildSettingsManager
import yaml
class CiManager(CiBuildSettingsManager):
def GetDependencies(self):
return {
"Path": "/Common/MU",
"Url": "https://github.com/Microsoft/mu_tiano_plus.git"
}
GetName ¶
GetName() -> str
Get the name of the repo, platform, or product being build by CI.
Tip
Required Override in a subclass
Returns:
Type | Description |
---|---|
str
|
repo, platform, product |
GetPluginSettings ¶
GetPluginSettings() -> dict[str, Any]
Provide a dictionary of global settings for individual plugins.
Tip
Optional Override in a subclass
Warning
This sets the global plugin configurations. Edk2CiBuild automatically searches for, and loads, the package ci settings file if it exists. This file will override these settings. This file must be located at the base of the package named [Package].ci.yaml.
Ex: EmbeddedPkg/EmbeddedPkg.ci.yaml.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
plugin settings |
Edk2CiBuild ¶
Invocable supporting an iterative multi-package build and test process leveraging CI build plugins.
AddCommandLineOptions ¶
AddCommandLineOptions(
parser: argparse.ArgumentParser,
) -> None
Adds command line arguments to Edk2CiBuild.
RetrieveCommandLineOptions ¶
RetrieveCommandLineOptions(
args: argparse.Namespace,
) -> None
Retrieve command line options from the argparser.
GetSettingsClass ¶
GetSettingsClass() -> type
Returns the CiBuildSettingsManager class.
Warning
CiBuildSettingsManager must be subclassed in your platform settings file.
GetLoggingFileName ¶
GetLoggingFileName(loggerType: str) -> str
Returns the filename (CI_BUILDLOG) of where the logs for the Edk2CiBuild invocable are stored in.
merge_config
staticmethod
¶
merge_config(
gbl_config: dict,
pkg_config: dict,
descriptor: Optional[dict] = None,
) -> dict
Merge two configurations.
One global and one specificto the package to create the proper config for a plugin to execute.
Returns:
Type | Description |
---|---|
dict
|
Dictionary of config settings |