Skip to content

Commit aa7ec80

Browse files
author
Takashi Matsuo
committed
Use gcloud preview app versions for cleaning up.
1 parent 610315b commit aa7ec80

File tree

6 files changed

+48
-44
lines changed

6 files changed

+48
-44
lines changed

appengine/standard/phpmyadmin/composer.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

appengine/standard/phpmyadmin/tests/DeployTest.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,21 @@ public static function deploy($project_id, $e2e_test_version, $target)
157157

158158
public static function tearDownAfterClass()
159159
{
160-
$command = 'gcloud -q preview app modules delete phpmyadmin --version '
160+
$command = 'gcloud -q preview app versions delete --service phpmyadmin '
161161
. getenv(self::VERSION_ENV)
162162
. ' --project '
163163
. getenv(self::PROJECT_ENV);
164-
exec($command, $output, $ret);
165-
foreach ($output as $line) {
166-
self::output($line);
167-
}
168-
if ($ret === 0) {
169-
self::output('Successfully delete the version');
170-
return;
171-
} else {
172-
self::output('Retrying to delete the version');
164+
for ($i = 0; $i <= 3; $i++) {
165+
exec($command, $output, $ret);
166+
foreach ($output as $line) {
167+
self::output($line);
168+
}
169+
if ($ret === 0) {
170+
self::output('Successfully delete the version');
171+
return;
172+
} else {
173+
self::output('Retrying to delete the version');
174+
}
173175
}
174176
self::fail('Failed to delete the version.');
175177
}

appengine/wordpress/tests/FlexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function deploy($project_id, $e2e_test_version)
9595
public static function tearDownAfterClass()
9696
{
9797
for ($i = 0; $i <= 3; $i++) {
98-
exec('gcloud -q preview app modules delete default --version '
98+
exec('gcloud -q preview app versions delete --service default '
9999
. self::getVersion()
100100
. ' --project '
101101
. getenv(self::PROJECT_ENV),

appengine/wordpress/tests/StdTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function deploy($project_id, $e2e_test_version)
9595
public static function tearDownAfterClass()
9696
{
9797
for ($i = 0; $i <= 3; $i++) {
98-
exec('gcloud -q preview app modules delete default --version '
98+
exec('gcloud -q preview app versions delete --service default '
9999
. self::getVersion()
100100
. ' --project '
101101
. getenv(self::PROJECT_ENV),

testing/GaeApp.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,18 @@ public function stop()
172172
/**
173173
* Deletes the deployed app.
174174
*
175-
* @param string $module
175+
* @param string $service
176176
* @param int $retry optional number of retries upon failure
177177
*
178178
* @return bool true if the app is succesfully deleted, otherwise false
179179
*/
180180
public function delete(
181-
$module = 'default',
181+
$service = 'default',
182182
$retry = self::DEFAULT_RETRY
183183
) {
184-
$cmd = "gcloud -q " . self::GCLOUD_APP . " modules delete $module "
185-
. "--version " . $this->version . " --project " . $this->project;
184+
$cmd = "gcloud -q " . self::GCLOUD_APP . " versions delete "
185+
. "--service " . $service . " "
186+
. $this->version . " --project " . $this->project;
186187
$ret = $this->execWithRetry($cmd, $retry);
187188
return $ret;
188189
}

testing/install_test_deps.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ configure_gcloud()
4545
fi
4646
gcloud -q components install app-engine-python
4747
gcloud -q components install app-engine-php
48-
# pinning to 104.0.0 because 105.0.0 is broken for php app
49-
gcloud -q components update --version 104.0.0
48+
gcloud -q components update --version 106.0.0
49+
# Use gsutil for deploying appengine std apps.
50+
gcloud config set app/use_gsutil true
5051
}
5152

5253
install_php_cs_fixer()

0 commit comments

Comments
 (0)