示例#1
0
    def get_tasks_to_build_jira(self, args, workspace_utils=WorkspaceUtils()):
        #for workspace build maven must be executed from parent directory
        maven = MavenCallable(args)
        maven.phase('package')

        if not args.build_war:
            maven.property('jira.do.not.prepare.war')

        maven.project('jira-components/jira-webapp').option('-am')
        maven.property('jira.home', args.layout.jira_home())

        maven.projects.extend(
            workspace_utils.get_workspace_projects_without_jira(args))
        self.add_plugins_maven_goals(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 the bundled plugins
        return [
            maven, lambda logger: self.stale_plugins.remember_plugins_profiles(
                maven.profiles) or 0
        ]
示例#2
0
    def process_webdriver(args, executor, fileutils=FileUtils()):

        maven = MavenCallable()
        maven.project('jira-distribution/jira-webdriver-tests-runner').option(
            '-am')
        maven.phase('verify').profile('hallelujahClient').profile(
            'distribution')
        maven.property('maven.test.unit.skip', '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('jira.user.extra.jvmargs',
                       '"-Dhallelujah.local.test.list=%s"' % replay_file)
        maven.property('func.mode.plugins').property('reference.plugins')

        maven.property(
            'system.bamboo.agent.home',
            os.path.abspath(
                os.sep.join([
                    'jira-distribution', 'jira-webdriver-tests-runner',
                    'target'
                ])))
        executor.append(maven.can_run_in_parallel())
示例#3
0
    def __call__(self, args, executor):
        deploy_script_path = os.getcwd() + '/../ondemand-fireball/scripts/unicorn-deploy/dev-deploy.py'
        executor.append(lambda logger: logger.info('Checking if the deploy script is accessible.') or Callable.success)
        executor.append(lambda logger: Callable.success if os.path.isfile(deploy_script_path) else
        logger.error('Could not find the dev-deploy script. Ensure that it is located at ' + deploy_script_path) or
        Callable.do_not_proceed)

        if args.resolve_artifacts or args.mvn_clean:
            maven = MavenCallable(args, 'jira-ondemand-project')
            maven.require_mvn2()
            maven.project('jira-ondemand-webapp').option('-am')

            if args.resolve_artifacts:
                maven.phase('package').skip_tests()
            executor.append(maven)

        maven = MavenCallable(args)
        maven.phase('install').property('maven.test.skip')
        maven.project('jira-components/jira-webapp').option('-am')
        executor.append(maven.require_mvn2())

        script = SystemCallable(args,
                                '{0} --instance {1} --path jira-ondemand-webapp'.format(deploy_script_path,
                                                                                        args.deploy_host),
                                cwd='jira-ondemand-project')

        executor.append(script)
示例#4
0
    def __call__(self, args, executor):
        maven = MavenCallable(args)
        maven.project('jira-distribution/jira-standalone-distribution').option('-am')
        maven.phase('package').profile('distribution')
        maven.property('maven.test.unit.skip', 'true').property('maven.test.func.skip', 'true').property(
            'maven.test.selenium.skip', 'true')
        executor.append(maven)

        executor.append(SystemCallable(args, 'bin/unpackStandalone' + (' run' if args.run else '')))
示例#5
0
 def __call__(self, args, executor):
     maven = MavenCallable(args, process_utils=self.process_utils)
     try:
         maven.require_mvn3()
         maven.project('jira-components/jira-core').option('-am').phase('process-classes').profile('findbugs')
         if not args.skip_bp: maven.project('jira-components/jira-plugins/jira-bundled-plugins')
         executor.append(maven)
     except MavenVersionInaccessibleException as e:
         executor.append(maven.mvn3_inaccessible_msg_callable('findbugs', e))
示例#6
0
    def __call__(self, args, executor):
        maven = MavenCallable(args)
        try:
            maven.require_mvn3()
            maven.project('jira-components/jira-api').option('-am').phase('verify').property('performApiCheck')
            executor.append(maven)

        except MavenVersionInaccessibleException as e:
            executor.append(maven.mvn3_inaccessible_msg_callable('api-check', e))
示例#7
0
    def __call__(self, args, executor):
        maven = MavenCallable(args)
        try:
            maven.require_mvn3()
            maven.project('jira-components/jira-api').option('-am').phase(
                'verify').property('performApiCheck')
            executor.append(maven)

        except MavenVersionInaccessibleException as e:
            executor.append(
                maven.mvn3_inaccessible_msg_callable('api-check', e))
示例#8
0
 def define_install_actions(args, executor):
     if args.quick:
         maven = MavenCallable(args, 'jira-ondemand-project')
         maven.phase('install').skip_tests().profile('func-mode-plugins')
         executor.append(maven.require_mvn2())
     else:
         maven = MavenCallable(args)
         maven.phase('install')
         maven.project('jira-ondemand-project/jira-ondemand-webapp') \
             .project('jira-ondemand-project/jira-ondemand-acceptance-tests').option('-am')
         maven.skip_tests().profile('ondemand').profile('func-mode-plugins')
         executor.append(maven.require_mvn2())
示例#9
0
 def __call__(self, args, executor):
     maven = MavenCallable(args, process_utils=self.process_utils)
     try:
         maven.require_mvn3()
         maven.project('jira-components/jira-core').option('-am').phase(
             'process-classes').profile('findbugs')
         if not args.skip_bp:
             maven.project(
                 'jira-components/jira-plugins/jira-bundled-plugins')
         executor.append(maven)
     except MavenVersionInaccessibleException as e:
         executor.append(maven.mvn3_inaccessible_msg_callable(
             'findbugs', e))
示例#10
0
    def __call__(self, args, executor):
        maven = MavenCallable(args)
        maven.project('jira-distribution/jira-standalone-distribution').option(
            '-am')
        maven.phase('package').profile('distribution')
        maven.property('maven.test.unit.skip', 'true').property(
            'maven.test.func.skip',
            'true').property('maven.test.selenium.skip', 'true')
        executor.append(maven)

        executor.append(
            SystemCallable(
                args, 'bin/unpackStandalone' + (' run' if args.run else '')))
示例#11
0
    def __call__(self, args, executor):
        maven = MavenCallable(args)
        maven.project('jira-distribution/jira-webdriver-tests-runner').option('-am')
        maven.phase('integration-test').profile('distribution')
        maven.property('maven.test.unit.skip', 'true').property('maven.test.func.skip', 'true').property(
            'jira.security.disabled', 'true').property('dev.mode.plugins').property(
            'jira.functest.single.testclass', 'com.atlassian.jira.webtest.webdriver.qunit.TestQunit').property(
            'jira.minify.skip', 'true').property('func.mode.plugins').property('java.awt.headless', 'true')

        self.surefire.set_roots(maven.projects)
        executor.append(self.surefire.clean_executable())
        executor.append(maven)
        # because the qunit suite contains just the runner it will always be successful, unless the tests
        # cannot be ran. Thus, the report has to provide exit code (while it should run in post_commands):
        executor.append(self.surefire.report_executable())
示例#12
0
    def process_webdriver(args, executor, fileutils = FileUtils()):

        maven = MavenCallable()
        maven.project('jira-distribution/jira-webdriver-tests-runner').option('-am')
        maven.phase('verify').profile('hallelujahClient').profile('distribution')
        maven.property('maven.test.unit.skip', '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('jira.user.extra.jvmargs', '"-Dhallelujah.local.test.list=%s"' % replay_file)
        maven.property('func.mode.plugins').property('reference.plugins')

        maven.property('system.bamboo.agent.home', os.path.abspath(os.sep.join(['jira-distribution', 'jira-webdriver-tests-runner', 'target'])))
        executor.append(maven.can_run_in_parallel())
示例#13
0
    def __call__(self, args, executor):
        maven = MavenCallable(args)
        maven.project('jira-distribution/jira-webdriver-tests-runner').option(
            '-am')
        maven.phase('integration-test').profile('distribution')
        maven.property('maven.test.unit.skip', 'true').property(
            'maven.test.func.skip', 'true').property(
                'jira.security.disabled',
                'true').property('dev.mode.plugins').property(
                    'jira.functest.single.testclass',
                    'com.atlassian.jira.webtest.webdriver.qunit.TestQunit'
                ).property('jira.minify.skip',
                           'true').property('func.mode.plugins').property(
                               'java.awt.headless', 'true')

        self.surefire.set_roots(maven.projects)
        executor.append(self.surefire.clean_executable())
        executor.append(maven)
        # because the qunit suite contains just the runner it will always be successful, unless the tests
        # cannot be ran. Thus, the report has to provide exit code (while it should run in post_commands):
        executor.append(self.surefire.report_executable())
示例#14
0
    def get_tasks_to_build_jira(self, args, workspace_utils=WorkspaceUtils()):
        #for workspace build maven must be executed from parent directory
        maven = MavenCallable(args)
        maven.phase('package')

        if not args.build_war:
            maven.property('jira.do.not.prepare.war')

        maven.project('jira-components/jira-webapp').option('-am')
        maven.property('jira.home', args.layout.jira_home())

        maven.projects.extend(workspace_utils.get_workspace_projects_without_jira(args))
        self.add_plugins_maven_goals(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 the bundled plugins
        return [maven, lambda logger: self.stale_plugins.remember_plugins_profiles(maven.profiles) or 0]
示例#15
0
    def __call__(self, args, executor):

        if self.fileutils.file_exists(dependencies_tmp):
            executor.append(lambda logger: self.fileutils.remove(dependencies_tmp) or 0)

        maven = MavenCallable(args, process_utils=self.process_utils)
        maven.projects = ['jira-components/jira-tests-parent/jira-tests',
                          'jira-components/jira-tests-parent/jira-tests-unit']
        if not args.skip_legacy:
            maven.project('jira-components/jira-tests-parent/jira-tests-legacy')
        maven.option('-am')
        maven.phase('compile' if args.vdep else 'test')
        maven.property('verifyDependencies').property('jira.minify.skip', 'true').property('performApiCheck').property(
            'ajEnforcer')

        maven.property('maven.test.func.skip', 'true').property('maven.test.selenium.skip', 'true')
        if not args.skip_bp:
            report_projects = ['jira-components/jira-tests-parent',
                               'jira-func-tests',
                               'jira-components/jira-plugins']
            maven.project('jira-components/jira-plugins/jira-bundled-plugins')
        else:
            report_projects = ['jira-components/jira-tests-parent',
                               'jira-func-tests']
            maven.project('jira-func-tests')

        try:
            maven.require_mvn3().can_run_in_parallel()
        except MavenVersionInaccessibleException:
            pass

        self.surefire.set_roots(report_projects)
        executor.append(self.surefire.clean_executable())

        if args.findbugs:
            try:
                executor.append(maven.phase('test').profile('findbugs').require_mvn3())
            except MavenVersionInaccessibleException as e:
                executor.append(maven.mvn3_inaccessible_msg_callable('unit tests with findbugs', e))
        else:
            if args.vdep:
                executor.append(maven.phase('compile'))
            else:
                executor.append(maven.phase('test').option('--fail-at-end'))
                executor.append_post(self.surefire.report_executable())

        executor.append_post(DependenciesReport(args))