def __init__(self, fast: bool, plugins_utility=BundledPluginsUtility(), maven_callable=MavenCallable):
        plugins_stop_condition = ['plugins-version', 'pluginsVersion']
        collectors = [GrepCount('plugins.version.one.plugins', lambda x: x == 'atlassian-plugin.xml',
                                'Should not be adding new version 1 plugins',
                                ['pluginsVersion="1"', 'plugins-version="1"'], plugins_stop_condition),
                      FileCount('plugins.count', lambda x: x == 'atlassian-plugin.xml',
                                'Count of plugins in JIRA codebase.').unchecked().neutral(),
                      GrepCountWithActivator('plugins.version.web.panels.to.soy',
                                             lambda x: x == 'atlassian-plugin.xml',
                                             'Should migrate web panels to soy templates',
                                             r'<\s*resource.+type\s*=\s*"velocity"',
                                             start_count=r'<\s*web-panel', stop_count=r'<\s*/\s*web-panel\s*>',
                                             use_regex=True),
                      FileCount('bundled.jars.in.plugins', lambda x: x.endswith('.jar'),
                                'Try and use provided jars instead of bundling your own. See '
                                'https://developer.atlassian.com/display/DOCS/How+to+Speed+Up+Plugin+Startup for more '
                                'details'),
                      MissingHostComponentsXml('plugins.missing.component.import.xml',
                          'Should be specifying a atlassian-plugins-host-components.xml to bypass host component '
                          'scanning. See https://developer.atlassian.com/display/DOCS/How+to+Speed+Up+Plugin+Startup#HowtoSpeedUpPluginStartup-Bypasshostcomponentscanning '
                          'for more details').unchecked(),
                      MissingOsgiManifest('plugins.missing.osgi.instructions',
                          'Should be specifying a non-empty instructions element so the SDK will generate an OSGi '
                          'manifest. See https://developer.atlassian.com/display/DOCS/How+to+Speed+Up+Plugin+Startup#HowtoSpeedUpPluginStartup-GeneratetheOSGimanifestatbuildtime '
                          'for more details'),
                      # Won't check the plugin xml minified until AMPS 4.2.4 is released.
                      PluginXmlMinified('plugins.xml.not.minified',
                          'Should be minifiying your atlassian-plugin.xml using plugin SDK version 4.2.4 or later').unchecked().rising()]

        super().__init__(collectors, 'Scan Bundled plugins JARS')
        self.plugins_utility = plugins_utility
        self.plugin_zip = None
        self.plugin_xml_info = None
        self.fast = fast
        self.maven_callable = maven_callable
Beispiel #2
0
 def __init__(self, stale_plugins=BundledPluginsUtility()):
     super().__init__()
     self.command = 'run'
     self.description = 'Runs JIRA using your code. This will download a tomcat for you, configure it and '\
                        'start JIRA on your local machine. This will not enable you to hotswap, JRebel or debug '\
                        'your running instance.'
     self.stale_plugins = stale_plugins
     self.prevent_post_commands = True
Beispiel #3
0
 def setUp(self):
     self.file_utils = MockFileUtils()
     self.finder = BundledPluginsUtility(self.file_utils)