Beispiel #1
0
def HandleManagement(arguments):
    if len(arguments) == 0:
        print(GetInfoMsg())
        return

    SwarmTools.LoadEnvironmentVariables(arguments)
    SwarmTools.HandleDumpYamlData(arguments)
    
    if '-help' in arguments \
        and not('-stack' in arguments) \
        and not('-config' in arguments) \
        and not('-secret' in arguments) \
        and not('-network' in arguments):
        print(GetInfoMsg())
    elif '-start' in arguments:
        StartSwarm(arguments)
    elif '-stop' in arguments:
        StopSwarm(arguments)
    elif '-restart' in arguments:
        RestartSwarm(arguments)
    else:
        SwarmVolumes.HandleVolumes(arguments)
        SwarmConfigs.HandleConfigs(arguments)
        SwarmSecrets.HandleSecrets(arguments)
        SwarmNetworks.HandleNetworks(arguments)
        SwarmStacks.HandleStacks(arguments)
def HandleManagement(arguments):
    if len(arguments) == 0:
        print(GetInfoMsg())
        return

    if '-help' in arguments and len(arguments) == 1:
        print(GetInfoMsg())
        return
    
    SwarmTools.LoadEnvironmentVariables(
        arguments, BuildTools.DEFAULT_BUILD_MANAGEMENT_YAML_FILES)
    SetDefaultCommonEnvVariables()
    SwarmTools.HandleDumpYamlData(
        arguments, BuildTools.DEFAULT_BUILD_MANAGEMENT_YAML_FILES)
    ChangelogSelections.HandleChangelogSelections(arguments)

    index = 0
    while index < len(arguments):
        actionArgs, index = GetPositionalActionArguments(arguments, index)
        SwarmSelections.HandleSwarmSelections(actionArgs)
        BuildSelections.HandleBuildSelections(actionArgs)
        TestSelections.HandleTestSelections(actionArgs)
        RunSelections.HandleRunSelections(actionArgs)
        PublishSelections.HandlePublishSelections(actionArgs)
        PromoteSelections.HandlePromoteSelections(actionArgs)
Beispiel #3
0
def HandleManagement(arguments):
    if len(arguments) == 0:
        print(GetInfoMsg())
        return

    if '-help' in arguments and len(arguments) == 1:
        print(GetInfoMsg())
        return

    SwarmTools.LoadEnvironmentVariables(
        arguments, [BuildTools.DEFAULT_BUILD_MANAGEMENT_YAML_FILE])
    SwarmTools.HandleDumpYamlData(
        arguments, [BuildTools.DEFAULT_BUILD_MANAGEMENT_YAML_FILE])

    ChangelogSelections.HandleChangelogSelections(arguments)
    SwarmSelections.HandleSwarmSelections(arguments)
    BuildSelections.HandleBuildSelections(arguments)
    TestSelections.HandleTestSelections(arguments)
    RunSelections.HandleRunSelections(arguments)
    PublishSelections.HandlePublishSelections(arguments)