Skip to content

Edk2 ci setup

edk2_ci_setup

Code that supports CI/CD via the ci_setup invocable.

Contains a CISetupSettingsManager that must be subclassed in a build settings file. This provides platform specific information to Edk2CiSetup invocable while allowing the invocable itself to remain platform agnostic.

CiSetupSettingsManager

Platform specific settings for Edk2CiSetup.

Provide information necessary for stuart_ci_setup.exe or edk2_ci_setup.py to successfully execute.

!!! example: "Example of Overriding CiSetupSettingsManager"

from edk2toolext.invocables.edk2_ci_setup import CiSetupSettingsManager
class CiManager(CiSetupSettingsManager):
    def GetDependencies(self):
        return {
            "Path": "/Common/MU",
            "Url":  "https://github.com/Microsoft/mu_tiano_plus.git"
        }

GetDependencies

GetDependencies() -> Iterable[dict]

Get any Git Repository Dependendencies.

This list of repositories will be resolved during the setup step.

Tip

Optional Override in subclass

Tip

Return an iterable of dictionary objects with the following fields

{
    Path: <required> Workspace relative path
    Url: <required> Url of git repo
    Commit: <optional> Commit to checkout of repo
    Branch: <optional> Branch to checkout (will checkout most recent commit in branch)
    Full: <optional> Boolean to do shallow or Full checkout.  (default is False)
    ReferencePath: <optional> Workspace relative path to git repo to use as "reference"
}

Edk2CiBuildSetup

Invocable supporting an iterative multi-package build and test process leveraging CI build plugins.

Edk2CiBuildSetup sets up the necessary environment for Edk2CiBuild by preparing all necessary submodules.

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.

GetVerifyCheckRequired

GetVerifyCheckRequired() -> bool

Will not verify environment.

GetSettingsClass

GetSettingsClass() -> type

Returns the CiSetupSettingsManager class.

Warning

CiSetupSettingsManager must be subclassed in your platform settings file.

GetLoggingFileName

GetLoggingFileName(loggerType: str) -> str

Returns the filename (CISETUP) of where the logs for the Edk2CiBuild invocable are stored in.

Go

Go() -> int

Executes the core functionality of the Edk2CiSetup invocable.

main

main() -> None

Entry point invoke Edk2CiBuild.