Overview

Namespaces

  • Cron
  • None

Classes

  • _HtmlGrid_TableOut
  • _TransactionModel_RawSaveOperation
  • AccessControlComponent
  • AccessControlHelper
  • ActionListHelper
  • ActiveDirectoryUtils
  • AddCurrentPidToSchedulingShellCallLogs
  • AnonymousFunctionOperation
  • ArrayUtil
  • AssociationIntegrityBehavior
  • AtomicOperation
  • AuthenticationComponent
  • AuthenticationController
  • AuthenticationUser
  • AutocompleteDatasourceComponent
  • BaseModelComponent
  • Basics
  • CakeLayersHelper
  • CheckAndRunShell
  • ClassSearcher
  • CommandLineUtil
  • CommonValidationBehavior
  • ConfigurableShellCallsSchedulingTask
  • ConfigurationKey
  • ConfigurationKeys
  • ConfigurationKeysController
  • Context
  • ContextComponent
  • ContextHelper
  • Contexts
  • ControllerInspector
  • ControllerMenuHelper
  • CreateJournalingTables
  • CreateTableConfigurationKeys
  • CreateTableSchedulingConfigurableShellCalls
  • CreateTableSchedulingShellCallLogs
  • CreateTableSettedConfigurationKeys
  • CreateTableUserResetPasswordRequests
  • CreateTableUsers
  • CronSchedulingInstaller
  • CronValidationBehavior
  • CssBox
  • CssController
  • CssProperties
  • CssShell
  • CsvUtil
  • CustomDataModel
  • DatasourceDumperManager
  • DateTimeInput
  • DependencyShell
  • DetailHelper
  • DumperShell
  • ExtendedFieldsAccessControl
  • ExtendedFieldSet
  • ExtendedFieldSetHelper
  • ExtendedFieldsParser
  • ExtendedFormHelper
  • ExtendedHasManyAppModel
  • ExtendedOperationsBehavior
  • FieldDefinition
  • FieldRowDefinition
  • FieldSetDefinition
  • FieldSetLayoutHelper
  • FileOperations
  • FileOperations_Rename
  • FileOperations_SymLink
  • FileOperations_Touch
  • FileOperations_Unlink
  • FileSystem
  • FixConfigurationKeysPrimaryKey
  • FixSettedConfigurationKeysPrimaryKey
  • HasManyUtilsBehavior
  • HtmlDocument
  • HtmlGrid
  • HtmlGrid_Cell
  • HttpClient
  • HttpResponse
  • ImapClient
  • ImapMailBox
  • ImapParserShell
  • IncludePath
  • InputMasked
  • InputSearchable
  • InputsOnSubmit
  • InstallShell
  • JenkinsBuildShell
  • Journal
  • JournalDetail
  • JournalizedBehavior
  • JsonResponseComponent
  • LayoutsHelper
  • Ldap
  • LdapUtils
  • ListFieldSet
  • ListFieldSetHelper
  • ListsHelper
  • MailParser
  • Make
  • MenuHelper
  • MigrationAllPluginsShell
  • ModelOperations
  • ModelOperations_Delete
  • ModelOperations_Save
  • ModelTraverser
  • MysqlDumper
  • OpenLdapUtils
  • PaginatorUtilComponent
  • PaginatorUtilComponentFilter
  • PaginatorUtilHelper
  • Plugin
  • PluginManager
  • Reflections
  • RenameEnabledToActiveFromUsersTable
  • RunShellCallShell
  • ScaffoldUtilComponent
  • ScaffoldUtilHelper
  • Scheduling
  • SchedulingConfigurableShellCall
  • SchedulingConfigurableShellCallsController
  • SchedulingShellCallLog
  • SchedulingShellCallLogsController
  • SettedConfigurationKey
  • StuffreposPluginsRename
  • TimeZoneBehavior
  • TransactionModel
  • TransactionOperation
  • Translator
  • TranslatorShell
  • User
  • UserAuthenticationComponent
  • UserChangePassword
  • UserResetPassword
  • UserResetPasswordRequest
  • UserResetPasswordRequestSubmission
  • UsersController
  • ViewUtilHelper

Interfaces

  • AccessControlFilter
  • CommitableOperation
  • DatasourceDumper
  • MakeListener
  • SchedulingInstaller
  • TasksObject
  • UndoableOperation

Exceptions

  • LdapObjectNotWritableException
  • ModelTraverserException
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: class JenkinsBuildShell extends Shell {
 4: 
 5:     /**
 6:      * get the option parser.
 7:      *
 8:      * @return ConsoleOptionParser
 9:      */
10:     public function getOptionParser() {
11:         $parser = parent::getOptionParser();
12:         $parser->description("Configure database and execute tests.");
13:         $parser->addOptions(
14:                 array(
15:                     'login' => array(
16:                         'default' => 'jenkins',
17:                     ),
18:                     'password' => array(
19:                         'default' => 'jenkins',
20:                     ),
21:                 )
22:         );
23: 
24:         $parser->addArguments(array(
25:             'database' => array(
26:                 'required' => true,
27:             )
28:         ));
29:         return $parser;
30:     }
31: 
32:     public function main() {
33:         $this->_configureDatabase();
34:         $this->dispatchShell('Migrations.migration', 'run', '0');
35:         $this->dispatchShell('Base.migration_all_plugins', '--reset');
36:         $this->dispatchShell('test', 'PluginManager', 'AllLoadedPluginsNoMigrations');
37:     }
38: 
39:     private function _configureDatabase() {
40:         file_put_contents(APP . DS . 'Config' . DS . 'database.php', <<<EOT
41: <?php
42: 
43:         class DATABASE_CONFIG {
44: 
45:             public \$default = array(
46:                 'datasource' => 'Database/Mysql',
47:                 'host' => 'localhost',
48:                 'database' => '{$this->args[0]}',
49:                 'login' => '{$this->params['login']}',
50:                 'password' => '{$this->params['password']}',
51:                 'encoding' => 'utf8',
52:             );
53:             public \$test = array(
54:                 'datasource' => 'Database/Mysql',
55:                 'host' => 'localhost',
56:                 'database' => '{$this->args[0]}',
57:                 'login' => '{$this->params['login']}',
58:                 'password' => '{$this->params['password']}',
59:                 'encoding' => 'utf8',
60:                 'prefix' => 'test_',
61:             );
62: 
63:         }
64: EOT
65:         );
66:     }
67: 
68: }
API documentation generated by ApiGen 2.8.0