Skip to content

Commit 8642a2c

Browse files
authored
Merge branch 'develop-v4' into check/min-requirements
2 parents 540e885 + 532e096 commit 8642a2c

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

migrations/db/20181016052850_easyengine_insert_docker_images_version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ public function __construct() {
2727
*/
2828
public function up() {
2929

30-
EE::log( 'Checking/Pulling required images' );
30+
EE::log( 'Checking and Pulling required images. This may take some time.' );
3131
$images = EE\Utils\get_image_versions();
3232

3333
$query = '';
3434
foreach ( $images as $image => $tag ) {
35-
EE::debug( "Checking/Pulling docker image $image:$tag" );
36-
if ( ! \EE::exec( "docker pull ${image}:${tag}" ) ) {
35+
EE::log( "Checking and Pulling docker image $image:$tag" );
36+
if ( ! \EE::exec( "docker pull ${image}:${tag}", true, true ) ) {
3737
throw new \Exception( "Unable to pull ${image}:${tag}. Please check logs for more details." );
3838
}
3939
$query .= "INSERT INTO options VALUES( '${image}', '${tag}' );";

php/EE/Migration/SiteContainers.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,16 @@ public static function backup_restore( $source, $destination = '', $delete_diffe
182182
}
183183
}
184184

185+
/**
186+
* Function to delete file/directory.
187+
*
188+
* @param string|array $path_to_delete File(s)/Director(y/ies) to be deleted.
189+
*/
190+
public static function delete( $path_to_delete ) {
191+
$fs = new Filesystem();
192+
$fs->remove( $path_to_delete );
193+
}
194+
185195
/**
186196
* Function to reload site's nginx.
187197
*

php/EE/Runner.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,9 @@ private function init_ee() {
8585
private function migrate() {
8686
$rsp = new \EE\RevertableStepProcessor();
8787

88-
$version = Option::where( 'key', 'version' );
89-
if ( ! empty( $version ) ) {
90-
$rsp->add_step( 'ee-custom-container-migrations', 'EE\Migration\CustomContainerMigrations::execute_migrations' );
91-
$rsp->add_step( 'ee-docker-image-migrations', 'EE\Migration\Containers::start_container_migration' );
92-
}
9388
$rsp->add_step( 'ee-db-migrations', 'EE\Migration\Executor::execute_migrations' );
89+
$rsp->add_step( 'ee-custom-container-migrations', 'EE\Migration\CustomContainerMigrations::execute_migrations' );
90+
$rsp->add_step( 'ee-docker-image-migrations', 'EE\Migration\Containers::start_container_migration' );
9491
return $rsp->execute();
9592
}
9693

0 commit comments

Comments
 (0)