Esempio n. 1
0
    def process_functest(args, executor, fileutils = FileUtils()):

        #probably this can be improved somehow - ask Min'an.

        runner_dir = os.sep.join(['jira-distribution', 'jira-func-tests-runner', 'target'])
        if not args.quick:
            maven = MavenCallable()
            maven.phase('package').project('jira-distribution/jira-func-tests-runner').option('-am')
            maven.profile('distribution')
            maven.property('maven.test.skip', 'true').property('jira.minify.skip', 'true').property('func.mode.plugins')
            maven.property('reference.plugins').property('jira.func.tests.runner.create').property('obrRepository', 'NONE')
            maven.property('skipSources')
            executor.append(maven.can_run_in_parallel())

            unpack_script = os.path.abspath(os.sep.join(['jira-distribution', 'jira-func-tests-runner', 'src', 'main', 'dist', 'prepare-runner.sh']))
            executor.append(SystemCallable(args, unpack_script, cwd=runner_dir))

        maven = MavenCallable(path = runner_dir)
        maven.phase('verify').profile('hallelujahClient').property('jira.security.disabled', 'true')

        if fileutils.file_exists(args.replay_file):
            replay_file = os.path.abspath(args.replay_file)
        else:
            replay_file = os.path.abspath(os.sep.join(['target', 'replays', args.replay_file]))
        maven.property('hallelujah.local.test.list', replay_file)

        maven.property('system.bamboo.agent.home', os.path.abspath(runner_dir))
        executor.append(maven)
Esempio n. 2
0
    def get_tasks_to_build_jira(self, args, workspace_utils=WorkspaceUtils()):

        if not args.manifesto_jira:
            #for workspace build maven must be executed from parent directory
            maven = MavenCallable(args)
            maven.phase('package')

            maven.profile('ondemand').project(OD_WEBAPP_PROJECT_DIR).option('-am')
            maven.property('jira.home', args.layout.jira_home())

            maven.projects.extend(workspace_utils.get_workspace_projects_without_jira(args))
            self.add_devmode_plugins(args, maven)

            if not args.attach_sources:
                maven.property('skipSources')
            maven.skip_tests()
            if args.third_party_licensing:
                maven.profiles.extend(['third-party-licensing'])

            # return builder and manifesto plugins job:
            return [maven]
        else:

            mavenClean = MavenCallable(args, path=OD_WEBAPP_PROJECT_DIR)
            mavenClean.phase('clean')

            return [mavenClean,
                    self.manifesto_jira(args, manifesto=self.manifesto),
                    self.__create_target_dir_for_exploded_webapp(),
                    SystemCallable(args, command='unzip *.war -d war/exploded', cwd=os.sep.join([OD_WEBAPP_PROJECT_DIR, 'target']))]
Esempio n. 3
0
def general_func_test_runner(args, additional_options=None):
    if not additional_options: additional_options = {}
    maven = MavenCallable(args)
    maven.projects = ['jira-distribution/jira-func-tests-runner']
    maven.option('-am')
    maven.profile('distribution')
    maven.phase('verify')
    maven.properties.update(additional_options)
    maven.property('system.bamboo.agent.home', os.path.abspath(os.sep.join(['jira-distribution', 'jira-func-tests-runner', 'target'])))
    return maven
Esempio n. 4
0
def ual_int_func_test_runner(args):
    maven = MavenCallable(args)
    maven.projects = ['jira-distribution/jira-webapp-dist', 'jira-distribution/jira-integration-tests']
    maven.option('-am')
    maven.profile('distribution')
    maven.phase('verify')
    maven.properties.update({'maven.test.unit.skip': 'true',
                             'jira.security.disabled': 'true',
                             'java.awt.headless': 'true',
                             'jira.minify.skip': 'true',
                             'func.mode.plugins': 'true'})
    return maven
Esempio n. 5
0
def webdriver_test_runner(args):
    maven = MavenCallable(args)
    maven.projects = ['jira-webdriver-tests']
    maven.option('-am')
    maven.profile('jmake-webdriver-tests')
    maven.phase('test')
    maven.properties.update({'failIfNoTests': 'false',
                             'maven.test.unit.skip': 'true',
                             'system.bamboo.agent.home': os.path.abspath(os.sep.join(['jira-distribution', 'jira-webdriver-tests-runner', 'target']))
    })
    if args.tests is not None:
        maven.properties.update({'test': args.tests})
    return maven
Esempio n. 6
0
def general_func_test_runner(args, additional_options=None):
    if not additional_options: additional_options = {}
    maven = MavenCallable(args)
    maven.projects = ['jira-distribution/jira-func-tests-runner']
    maven.option('-am')
    maven.profile('distribution')
    maven.phase('verify')
    maven.properties.update(additional_options)
    maven.property(
        'system.bamboo.agent.home',
        os.path.abspath(
            os.sep.join(
                ['jira-distribution', 'jira-func-tests-runner', 'target'])))
    return maven
Esempio n. 7
0
def ual_int_func_test_runner(args):
    maven = MavenCallable(args)
    maven.projects = [
        'jira-distribution/jira-webapp-dist',
        'jira-distribution/jira-integration-tests'
    ]
    maven.option('-am')
    maven.profile('distribution')
    maven.phase('verify')
    maven.properties.update({
        'maven.test.unit.skip': 'true',
        'jira.security.disabled': 'true',
        'java.awt.headless': 'true',
        'jira.minify.skip': 'true',
        'func.mode.plugins': 'true'
    })
    return maven
Esempio n. 8
0
def webdriver_test_runner(args):
    maven = MavenCallable(args)
    maven.projects = ['jira-webdriver-tests']
    maven.option('-am')
    maven.profile('jmake-webdriver-tests')
    maven.phase('test')
    maven.properties.update({
        'failIfNoTests':
        'false',
        'maven.test.unit.skip':
        'true',
        'system.bamboo.agent.home':
        os.path.abspath(
            os.sep.join(
                ['jira-distribution', 'jira-webdriver-tests-runner',
                 'target']))
    })
    if args.tests is not None:
        maven.properties.update({'test': args.tests})
    return maven
Esempio n. 9
0
    def process_functest(args, executor, fileutils=FileUtils()):

        #probably this can be improved somehow - ask Min'an.

        runner_dir = os.sep.join(
            ['jira-distribution', 'jira-func-tests-runner', 'target'])
        if not args.quick:
            maven = MavenCallable()
            maven.phase('package').project(
                'jira-distribution/jira-func-tests-runner').option('-am')
            maven.profile('distribution')
            maven.property('maven.test.skip', 'true').property(
                'jira.minify.skip', 'true').property('func.mode.plugins')
            maven.property('reference.plugins').property(
                'jira.func.tests.runner.create').property(
                    'obrRepository', 'NONE')
            maven.property('skipSources')
            executor.append(maven.can_run_in_parallel())

            unpack_script = os.path.abspath(
                os.sep.join([
                    'jira-distribution', 'jira-func-tests-runner', 'src',
                    'main', 'dist', 'prepare-runner.sh'
                ]))
            executor.append(SystemCallable(args, unpack_script,
                                           cwd=runner_dir))

        maven = MavenCallable(path=runner_dir)
        maven.phase('verify').profile('hallelujahClient').property(
            'jira.security.disabled', 'true')

        if fileutils.file_exists(args.replay_file):
            replay_file = os.path.abspath(args.replay_file)
        else:
            replay_file = os.path.abspath(
                os.sep.join(['target', 'replays', args.replay_file]))
        maven.property('hallelujah.local.test.list', replay_file)

        maven.property('system.bamboo.agent.home', os.path.abspath(runner_dir))
        executor.append(maven)