Exemplo n.º 1
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_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)
 def test_a_changelog(self):
     print('EXECUTING CHANGELOG TEST')
     cwd = TestTools.ChangeToSampleFolderAndGetCwd()
     arguments = []
     ChangelogSelections.HandleChangelogSelections(arguments)
     self.assertEqual(os.environ['VERSION'], '1.0.0')
     self.assertEqual(os.environ['VERSIONMAJOR'], '1')
     self.assertEqual(os.environ['VERSIONMINOR'], '0')
     os.chdir(cwd)
     print('DONE EXECUTING CHANGELOG TEST')
Exemplo n.º 3
0
def HandleManagement(arguments):
    if len(arguments) == 0:
        print(GetInfoMsg())

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

    ChangelogSelections.HandleChangelogSelections(arguments)
    SwarmSelections.HandleSwarmSelections(arguments)
    BuildSelections.HandleBuildSelections(arguments)
    TestSelections.HandleTestSelections(arguments)
    RunSelections.HandleRunSelections(arguments)
    PublishSelections.HandlePublishSelections(arguments)
Exemplo n.º 4
0
def GetInfoMsg():
    infoMsg = "Docker Build Management\r\n\r\n"
    infoMsg += "Run:\r\n"
    infoMsg += RunSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Build:\r\n"
    infoMsg += BuildSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Publish:\r\n"
    infoMsg += PublishSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Test:\r\n"
    infoMsg += TestSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Swarm Deployment of Domain Services:\r\n"
    infoMsg += SwarmSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Export Version From Changelog:\r\n"
    infoMsg += ChangelogSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Additional Info:\r\n"
    infoMsg += BuildTools.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Add '-help' to arguments to print this info again.\r\n\r\n"
    return infoMsg
Exemplo n.º 5
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)
Exemplo n.º 6
0
def GetInfoMsg():
    infoMsg = "Manage Docker Swarm\r\n"
    infoMsg += "Add '-start' to arguments to start development by deploying domain services in a swarm.\r\n"
    infoMsg += "Add '-stop' to arguments to stop development by stopping domain services in the swarm.\r\n"
    infoMsg += "Add '-restart' to arguments to restart swarm.\r\n"
    infoMsg += "Otherwise:\r\n\r\n"
    infoMsg += "Run:\r\n"
    infoMsg += RunSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Build:\r\n"
    infoMsg += BuildSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Publish:\r\n"
    infoMsg += PublishSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Test:\r\n"
    infoMsg += TestSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Swarm Deployment of Domain Services:\r\n"
    infoMsg += SwarmSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Export Version From Changelog:\r\n"
    infoMsg += ChangelogSelections.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Additional Info:\r\n"
    infoMsg += BuildTools.GetInfoMsg() + "\r\n\r\n"
    infoMsg += "Add '-help' to arguments to print this info again.\r\n\r\n"
    return infoMsg