Esempio n. 1
0
    def define_parser(self, parser):
        parser.add_argument(
            'replay_file',
            type=str,
            metavar='replay-file',
            help=
            'Replay file produced with jmake CI investigate, or absolute path to a custom file.'
        )
        parser.add_argument('--build-as-func',
                            action='store_true',
                            help='Force run as func test',
                            dest='force_func')
        parser.add_argument('--build-as-wd',
                            action='store_true',
                            help='Force run as wd test',
                            dest='force_wd')
        parser.add_argument(
            '-q',
            '--quick',
            action='store_true',
            help='Do not compile the tests - attempt to run only',
            dest='quick')

        self.sample_usage(
            parser,
            'Replay a test batch locally using files produced by "ci investigate" (using autocomplete):',
            ['./jmake ci replay [tab]'])
        self.sample_usage(
            parser,
            'Replay a custom prepared batch as func (webdriver) in /tmp/mybatch:',
            ['./jmake ci replay --run-as-func (--run-as-wd) /tmp/mybatch'])

        MavenCallable.add_maven_switches(parser)
        parser.autocomplete_contributor = lambda: os.listdir(
            os.sep.join(['target', 'replays']))
Esempio n. 2
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-nobp',
                         '--skip_bundled_plugins',
                         action='store_true',
                         help='checking bundled plugins will be skipped.',
                         dest='skip_bp')
Esempio n. 3
0
    def define_parser(self, parser):
        parser.add_argument(
            '-t',
            '--traceback',
            type=int,
            default=6,
            help=
            'Number of tests (including the failed one) in the run batch (for debugging tests that cause '
            'corruption to instance state).',
            dest='traceback')
        parser.add_argument('-n',
                            '--build-number',
                            type=int,
                            default=0,
                            help='Build number, or 0 for latest',
                            dest='build_number')
        parser.add_argument('type',
                            choices=['func', 'wd'],
                            default='func',
                            help='webdriver or func tests')

        self.sample_usage(
            parser,
            'Find out about failures on latest JBAC func/webdriver test build:',
            ['./jmake ci investigate [func wd]'])
        self.sample_usage(
            parser,
            'Find out about failures on specific build number on JBAC:',
            ['./jmake ci investigate [func wd] --build-number 1234'])
        self.sample_usage(parser,
                          'Replay the failures locally (see more help):',
                          ['./jmake ci replay --help'])

        MavenCallable.add_maven_switches(parser)
Esempio n. 4
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument(
         '-pc',
         '--pretty-charts',
         action='store_true',
         help='installs those pretty charts your boss likes.')
Esempio n. 5
0
    def define_parser(self, parser):
        MavenCallable.add_maven_switches(parser)

        parser.add_argument('room', help='the room to book.')
        parser.add_argument('from', help='start time.')
        parser.add_argument('till', help='finish time. obviously it will take longer so this will add extra 20 minutes')
        parser.add_argument('-f', '--force', action='store_true',
            help='cancels existing appointments in the conf room selected.')
Esempio n. 6
0
 def define_parser(self, parser):
     parser.add_argument('-bf',
                         '--func-batch-number',
                         type=int,
                         default=20,
                         help='Number of batches',
                         dest='func_batches')
     MavenCallable.add_maven_switches(parser)
Esempio n. 7
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('template',
                         help='template you need to pick.',
                         choices=[
                             'great-success', 'morale-booster',
                             'five-years-from-now-plan', 'health-and-safety'
                         ])
Esempio n. 8
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('deploy_host', help='host to deploy the fireball to')
     parser.add_argument('-r', '--resolve-artifacts',
                         help='the deploying script will attempt to build your ondemand webapp '
                              'in offline mode, but you local repo might not have some artifacts, like the scala maven plugin; '
                              'if you need to run this option your need to run it once - if the deployment script fails on missing artifacts.',
                         action='store_true', dest='resolve_artifacts')
Esempio n. 9
0
 def define_parser(self, parser):
     parser.add_argument('job_name', nargs='+', help='Job names to run')
     parser.add_argument('-bf',
                         '--func-batch-number',
                         type=int,
                         default=20,
                         help='Total number of func batches',
                         dest='func_batches')
     MavenCallable.add_maven_switches(parser)
Esempio n. 10
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-fb', '--findbugs', action='store_true',
         help='include findbugs check (requires maven 3).')
     parser.add_argument('-vd', '--verify-deps-only', action='store_true',
         help='only verify dependencies, without running tests.', dest='vdep')
     parser.add_argument('--skip-bundled-plugins', action='store_true',
         help='skips unit tests from bundled plugins.', dest='skip_bp')
     parser.add_argument('--skip-legacy-tests', action='store_true',
         help='skips legacy (integration) unit tests.', dest='skip_legacy')
Esempio n. 11
0
    def define_parser(self, parser):
        MavenCallable.add_maven_switches(parser)

        parser.add_argument('room', help='the room to book.')
        parser.add_argument('from', help='start time.')
        parser.add_argument(
            'till',
            help=
            'finish time. obviously it will take longer so this will add extra 20 minutes'
        )
        parser.add_argument(
            '-f',
            '--force',
            action='store_true',
            help='cancels existing appointments in the conf room selected.')
Esempio n. 12
0
    def define_parser(self, parser):
        parser.add_argument('replay_file', type=str, metavar='replay-file',
                            help='Replay file produced with jmake CI investigate, or absolute path to a custom file.')
        parser.add_argument('--build-as-func', action='store_true', help='Force run as func test', dest='force_func')
        parser.add_argument('--build-as-wd', action='store_true', help='Force run as wd test', dest='force_wd')
        parser.add_argument('-q', '--quick', action='store_true', help='Do not compile the tests - attempt to run only',
                            dest='quick')

        self.sample_usage(parser, 'Replay a test batch locally using files produced by "ci investigate" (using autocomplete):',
                          ['./jmake ci replay [tab]'])
        self.sample_usage(parser, 'Replay a custom prepared batch as func (webdriver) in /tmp/mybatch:',
                          ['./jmake ci replay --run-as-func (--run-as-wd) /tmp/mybatch'])


        MavenCallable.add_maven_switches(parser)
        parser.autocomplete_contributor = lambda : os.listdir(os.sep.join(['target', 'replays']))
Esempio n. 13
0
    def define_parser(self, parser):
        parser.add_argument('-t', '--traceback', type=int, default=6,
            help='Number of tests (including the failed one) in the run batch (for debugging tests that cause '
                 'corruption to instance state).',
            dest='traceback')
        parser.add_argument('-n', '--build-number', type=int, default=0, help='Build number, or 0 for latest',
            dest='build_number')
        parser.add_argument('type', choices=['func', 'wd'], default='func', help='webdriver or func tests')

        self.sample_usage(parser, 'Find out about failures on latest JBAC func/webdriver test build:',
                          ['./jmake ci investigate [func wd]'])
        self.sample_usage(parser, 'Find out about failures on specific build number on JBAC:',
                          ['./jmake ci investigate [func wd] --build-number 1234'])
        self.sample_usage(parser, 'Replay the failures locally (see more help):',
                          ['./jmake ci replay --help'])

        MavenCallable.add_maven_switches(parser)
Esempio n. 14
0
    def define_parser(self, parser):
        MavenCallable.add_maven_switches(parser)
        parser.add_argument(
            "--skip-idea-templates",
            action="store_true",
            help="installs the code style and comment " "templates into your IDEA config directory (global).",
            dest="skip_idea_templates",
        )
        parser.add_argument(
            "--skip-compiler", action="store_true", help="updates IDEA compiler settings.", dest="skip_compiler"
        )
        parser.add_argument(
            "--skip-run-configurations",
            action="store_true",
            help="injects JIRA run configurations " "into your workspace.",
            dest="skip_run_configurations",
        )
        parser.add_argument(
            "--skip-target-exclusions",
            action="store_true",
            help="excludes targets from ondemand and distribution projects ",
            dest="skip_target_exclusions",
        )
        parser.add_argument(
            "--skip-jmake-module",
            action="store_true",
            help="sets up jmake development module.",
            dest="skip_jmake_module",
        )
        parser.add_argument(
            "--skip-dev-profiles",
            action="store_true",
            help="enables development profiles in IDEA.",
            dest="skip_dev_profiles",
        )

        parser.add_argument(
            "-f",
            "--force",
            action="store_true",
            help="jmake will not blindly rewrite stuff " "in your workspace, unless you really want to.",
            dest="force",
        )
Esempio n. 15
0
    def define_parser(self, parser):
        MavenCallable.add_maven_switches(parser)
        parser.add_argument(
            '--skip-idea-templates',
            action='store_true',
            help='installs the code style and comment '
            'templates into your IDEA config directory (global).',
            dest='skip_idea_templates')
        parser.add_argument('--skip-compiler',
                            action='store_true',
                            help='updates IDEA compiler settings.',
                            dest='skip_compiler')
        parser.add_argument('--skip-run-configurations',
                            action='store_true',
                            help='injects JIRA run configurations '
                            'into your workspace.',
                            dest='skip_run_configurations')
        parser.add_argument(
            '--skip-target-exclusions',
            action='store_true',
            help='excludes targets from ondemand and distribution projects ',
            dest='skip_target_exclusions')
        parser.add_argument('--skip-jmake-module',
                            action='store_true',
                            help='sets up jmake development module.',
                            dest='skip_jmake_module')
        parser.add_argument('--skip-dev-profiles',
                            action='store_true',
                            help='enables development profiles in IDEA.',
                            dest='skip_dev_profiles')

        parser.add_argument('-f',
                            '--force',
                            action='store_true',
                            help='jmake will not blindly rewrite stuff '
                            'in your workspace, unless you really want to.',
                            dest='force')
Esempio n. 16
0
 def define_parser(self, parser):
     parser.add_argument('test_class', nargs='+', help='Test class to run')
     MavenCallable.add_maven_switches(parser)
Esempio n. 17
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
Esempio n. 18
0
 def define_parser(self, parser):
     parser.add_argument('test_class', nargs='+', help='Test class to run')
     MavenCallable.add_maven_switches(parser)
Esempio n. 19
0
 def define_parser(self, parser):
     parser.add_argument('job_name', nargs='+', help='Job names to run')
     parser.add_argument('-bf', '--func-batch-number', type=int, default=20, help='Total number of func batches',
         dest='func_batches')
     MavenCallable.add_maven_switches(parser)
Esempio n. 20
0
 def define_parser(self, parser):
     parser.add_argument('-bf', '--func-batch-number', type=int, default=20, help='Number of batches',
         dest='func_batches')
     MavenCallable.add_maven_switches(parser)
Esempio n. 21
0
 def define_parser(self, parser):
     parser.add_argument('-t', '--tests', help='Run only given webdriver tests', dest='tests')
     MavenCallable.add_maven_switches(parser)
Esempio n. 22
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-q', '--quick',
                         help='executes quick build of OnDemand. JIRA core components will be picked up '
                              '''from some location that only Maven knows (or more likely doesn't)''',
                         action='store_true')
Esempio n. 23
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-nobp', '--skip_bundled_plugins', action='store_true',
         help='checking bundled plugins will be skipped.', dest='skip_bp')
Esempio n. 24
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-r',
                         '--run',
                         action='store_true',
                         help='runs the unpacked JIRA package.')
Esempio n. 25
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-r', '--run', action='store_true', help='runs the unpacked JIRA package.')
Esempio n. 26
0
    def define_parser(self, parser):
        parser.add_argument('-p', '--jira-port', type=int, default=DEFAULT_HTTP_PORT, help='The tomcat port for JIRA', dest='port')
        parser.add_argument('-sp', '--jira-shutdown-port', default='auto',
                            help='The tomcat shutdown port for JIRA (default is "auto" and will be scanned for, starting from %s)' % DEFAULT_SHUTDOWN_PORT,
                            dest='sh_port')
        parser.add_argument('-j', '--jira-home', default=WorkspaceLayout.JIRA_HOME_DEFAULT_MARKER,
                            help='JIRA home directory',
                            dest='jira_home')
        parser.add_argument('-c', '--jira-context', default='/jira', help='JIRA web application context',
                            dest='jira_context')
        parser.add_argument('-w', '--jira-webapp', default=WorkspaceLayout.JIRA_WEBAPP,
                            help='JIRA web application directory', dest='jira_webapp_dir')
        parser.add_argument('-d', '--tomcat-dir', default=WorkspaceLayout.TOMCAT_DOWNLOAD,
                            help='Directory where tomcat will be downloaded', dest='tomcat_dir')
        parser.add_argument('-v', '--tomcat-version', default=WorkspaceBuilder.TOMCAT7,
                            choices=[WorkspaceBuilder.TOMCAT6, WorkspaceBuilder.TOMCAT7],
                            help='Version of tomcat to start',
                            dest='tomcat_version')
        parser.add_argument('-bp', '--bundled-plugins', action='store_true',
                            help='If this flag is set bundled plugins will be added to jira exploded directory and used',
                            dest='bundled_plugins')
        parser.add_argument('-bw', '--build-war', action='store_true',
                            help='If this flag is set jira.war will be produced otherwise only exploded directory is assembled',
                            dest='build_war')
        parser.add_argument('-ws', '--with-workspace', action='store_true',
                            help='If this flag is set - build in workspace mode. '
                                 'Maven will be run in parent of jira directory. '
                                 'It is assumed there is some pom.xml there.',
                            dest='with_workspace')
        parser.add_argument('-as', '--attach-sources', action='store_true',
                            help='If this flag is set build will generate sources jar', dest='attach_sources')
        parser.add_argument('-jr', '--jrebel', action='store_true',
                            help='If this flag is set tomcat will be started with jrebel agent', dest='jrebel')
        parser.add_argument('-rp', '--ref-plugin', action='store_true',
                            help='If this flag is set reference plugins will be deployed with JIRA', dest='ref_plugins')
        parser.add_argument('-tp', '--third-party-licensing', action='store_true',
                            help='If this flag is set, the LGPL list in the about page will be created',
                            dest='third_party_licensing')
        parser.add_argument('-in', '--instance-name',
                            help='this will name your instance, which means you will be able to '
                                 'run and maintain multiple ones on different ports', dest='instance_name',
                            default='work')
        parser.add_argument('control', choices=['shutdown', 'restart', 'quickstart', ''], default='', nargs='?',
                            help='Controls the instance:\n' +
                                 'shutdown shuts the running instance, respects instance names.'
                                 'restart restarts the running instance.' +
                                 'quickstart starts the instance without building it.')
        parser.add_argument('--override-dev-mode', dest='override_dev_mode', action='store_true',
                            help='JIRA will be started in dev mode by default. this overrides the dev_mode setting.')
        parser.add_argument('-J', dest='extra_jvm_flags', action='append',
                            help='Pass flag directly to the tomcat JVM. ' +
                                 'Flags are appended to the end of other JVM args, so you can (for example) '
                                 'override memory settings with -J-Xmx2g .')
        parser.add_argument('--max-perm-size', dest='max_perm_size', type=str, default='384m',
                            help='Amount of PermGen memory for the tomcat process')
        parser.add_argument('--xmx', dest='xmx', type=str, default='1024m',
            help='Maximum memory setting.')

        parser.add_argument('--plugin-resources', dest='plugin_resources', type=str, default='',
            help='Add all resource sub-folders for the plugin to resources scanned for changes by JIRA')

        parser.add_argument('--disable-plugin-resources', dest='disable_plugin_resources', action='store_true',
            help='Do not use reloadable plugin resources (good for standalone-like testing)')

        parser.add_argument('--enable-mail', dest='enable_mail', action='store_true',
                            help='Start JIRA with the mail handlers enabled even if in dev mode.')
        parser.add_argument('-sh', '--setup-home', dest='setup_home', action='store_true',
                            help='Setup JIRA home directory so you can directly login as admin:admin. '
                                 'If current JIRA home directory is not empty this parameter has no effect')

        parser.add_argument('--postgres', dest='postgres', action='store_true',
                            help='Sets up JIRA with local postgresql db. See ./jmake postgres --help.')

        parser.add_argument('--mysql', dest='mysql', action='store_true',
                            help='Sets up JIRA with local mysql db. See ./jmake mysql --help.')

        parser.add_argument('--ssl', dest='ssl', action='store_true',
                            help='Sets up JIRA with ssl. You also need a key produced with java keytool. Bother lukasz w. to '
                                 'add more how-to here.')

        self.sample_usage(parser, 'To pass more than one argument with -J use:', [
            './jmake run -J-Dfoo=bar -J-Dfee=baz',
            './jmake run -J "-Dfoo=bar -Dfee=baz"'])

        self.sample_usage(parser, 'To skip the setup steps on clean jirahome using hsqldb (will not work with real db):', [
            './jmake run --setup-home',
            './jmake debug --setup-home'
        ])

        MavenCallable.add_maven_switches(parser)
Esempio n. 27
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('template', help='template you need to pick.', choices=['great-success', 'morale-booster',
                                                                                 'five-years-from-now-plan',
                                                                                 'health-and-safety'])
Esempio n. 28
0
    def define_parser(self, parser):
        parser.add_argument('-p',
                            '--jira-port',
                            type=int,
                            default=DEFAULT_HTTP_PORT,
                            help='The tomcat port for JIRA',
                            dest='port')
        parser.add_argument(
            '-sp',
            '--jira-shutdown-port',
            default='auto',
            help=
            'The tomcat shutdown port for JIRA (default is "auto" and will be scanned for, starting from %s)'
            % DEFAULT_SHUTDOWN_PORT,
            dest='sh_port')
        parser.add_argument('-j',
                            '--jira-home',
                            default=WorkspaceLayout.JIRA_HOME_DEFAULT_MARKER,
                            help='JIRA home directory',
                            dest='jira_home')
        parser.add_argument('-c',
                            '--jira-context',
                            default='/jira',
                            help='JIRA web application context',
                            dest='jira_context')
        parser.add_argument('-w',
                            '--jira-webapp',
                            default=WorkspaceLayout.JIRA_WEBAPP,
                            help='JIRA web application directory',
                            dest='jira_webapp_dir')
        parser.add_argument('-d',
                            '--tomcat-dir',
                            default=WorkspaceLayout.TOMCAT_DOWNLOAD,
                            help='Directory where tomcat will be downloaded',
                            dest='tomcat_dir')
        parser.add_argument(
            '-v',
            '--tomcat-version',
            default=WorkspaceBuilder.TOMCAT7,
            choices=[WorkspaceBuilder.TOMCAT6, WorkspaceBuilder.TOMCAT7],
            help='Version of tomcat to start',
            dest='tomcat_version')
        parser.add_argument(
            '-bp',
            '--bundled-plugins',
            action='store_true',
            help=
            'If this flag is set bundled plugins will be added to jira exploded directory and used',
            dest='bundled_plugins')
        parser.add_argument(
            '-bw',
            '--build-war',
            action='store_true',
            help=
            'If this flag is set jira.war will be produced otherwise only exploded directory is assembled',
            dest='build_war')
        parser.add_argument(
            '-ws',
            '--with-workspace',
            action='store_true',
            help='If this flag is set - build in workspace mode. '
            'Maven will be run in parent of jira directory. '
            'It is assumed there is some pom.xml there.',
            dest='with_workspace')
        parser.add_argument(
            '-as',
            '--attach-sources',
            action='store_true',
            help='If this flag is set build will generate sources jar',
            dest='attach_sources')
        parser.add_argument(
            '-jr',
            '--jrebel',
            action='store_true',
            help='If this flag is set tomcat will be started with jrebel agent',
            dest='jrebel')
        parser.add_argument(
            '-rp',
            '--ref-plugin',
            action='store_true',
            help=
            'If this flag is set reference plugins will be deployed with JIRA',
            dest='ref_plugins')
        parser.add_argument(
            '-tp',
            '--third-party-licensing',
            action='store_true',
            help=
            'If this flag is set, the LGPL list in the about page will be created',
            dest='third_party_licensing')
        parser.add_argument(
            '-in',
            '--instance-name',
            help='this will name your instance, which means you will be able to '
            'run and maintain multiple ones on different ports',
            dest='instance_name',
            default='work')
        parser.add_argument(
            'control',
            choices=['shutdown', 'restart', 'quickstart', ''],
            default='',
            nargs='?',
            help='Controls the instance:\n' +
            'shutdown shuts the running instance, respects instance names.'
            'restart restarts the running instance.' +
            'quickstart starts the instance without building it.')
        parser.add_argument(
            '--override-dev-mode',
            dest='override_dev_mode',
            action='store_true',
            help=
            'JIRA will be started in dev mode by default. this overrides the dev_mode setting.'
        )
        parser.add_argument(
            '-J',
            dest='extra_jvm_flags',
            action='append',
            help='Pass flag directly to the tomcat JVM. ' +
            'Flags are appended to the end of other JVM args, so you can (for example) '
            'override memory settings with -J-Xmx2g .')
        parser.add_argument(
            '--max-perm-size',
            dest='max_perm_size',
            type=str,
            default='384m',
            help='Amount of PermGen memory for the tomcat process')
        parser.add_argument('--xmx',
                            dest='xmx',
                            type=str,
                            default='1024m',
                            help='Maximum memory setting.')

        parser.add_argument(
            '--plugin-resources',
            dest='plugin_resources',
            type=str,
            default='',
            help=
            'Add all resource sub-folders for the plugin to resources scanned for changes by JIRA'
        )

        parser.add_argument(
            '--disable-plugin-resources',
            dest='disable_plugin_resources',
            action='store_true',
            help=
            'Do not use reloadable plugin resources (good for standalone-like testing)'
        )

        parser.add_argument(
            '--enable-mail',
            dest='enable_mail',
            action='store_true',
            help=
            'Start JIRA with the mail handlers enabled even if in dev mode.')
        parser.add_argument(
            '-sh',
            '--setup-home',
            dest='setup_home',
            action='store_true',
            help=
            'Setup JIRA home directory so you can directly login as admin:admin. '
            'If current JIRA home directory is not empty this parameter has no effect'
        )

        parser.add_argument(
            '--postgres',
            dest='postgres',
            action='store_true',
            help=
            'Sets up JIRA with local postgresql db. See ./jmake postgres --help.'
        )

        parser.add_argument(
            '--mysql',
            dest='mysql',
            action='store_true',
            help='Sets up JIRA with local mysql db. See ./jmake mysql --help.')

        parser.add_argument(
            '--ssl',
            dest='ssl',
            action='store_true',
            help=
            'Sets up JIRA with ssl. You also need a key produced with java keytool. Bother lukasz w. to '
            'add more how-to here.')

        self.sample_usage(parser,
                          'To pass more than one argument with -J use:', [
                              './jmake run -J-Dfoo=bar -J-Dfee=baz',
                              './jmake run -J "-Dfoo=bar -Dfee=baz"'
                          ])

        self.sample_usage(
            parser,
            'To skip the setup steps on clean jirahome using hsqldb (will not work with real db):',
            ['./jmake run --setup-home', './jmake debug --setup-home'])

        MavenCallable.add_maven_switches(parser)
Esempio n. 29
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
Esempio n. 30
0
 def define_parser(self, parser):
     MavenCallable.add_maven_switches(parser)
     parser.add_argument('-pc', '--pretty-charts', action='store_true',
         help='installs those pretty charts your boss likes.')
Esempio n. 31
0
 def define_parser(self, parser):
     parser.add_argument('-t',
                         '--tests',
                         help='Run only given webdriver tests',
                         dest='tests')
     MavenCallable.add_maven_switches(parser)