Merge pull request #873 from appwrite/feat-docker-login-from-fucntions
Feat docker login from fucntions
This commit is contained in:
commit
f8e8f54a13
|
@ -35,6 +35,7 @@ install:
|
|||
script:
|
||||
- docker ps
|
||||
- docker-compose logs appwrite
|
||||
- docker-compose logs appwrite-worker-functions
|
||||
- docker-compose exec appwrite doctor
|
||||
- docker-compose exec appwrite vars
|
||||
- docker-compose exec appwrite test
|
||||
|
|
|
@ -29,7 +29,18 @@ $warmupStart = \microtime(true);
|
|||
|
||||
Co\run(function() use ($environments) { // Warmup: make sure images are ready to run fast 🚀
|
||||
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
|
||||
|
||||
|
||||
$dockerUser = App::getEnv('DOCKERHUB_PULL_USERNAME', null);
|
||||
$dockerPass = App::getEnv('DOCKERHUB_PULL_PASSWORD', null);
|
||||
|
||||
if($dockerUser) {
|
||||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
||||
Console::execute('docker login --username '.$dockerUser.' --password-stdin', $dockerPass, $stdout, $stderr);
|
||||
Console::log('Docker Login'. $stdout.$stderr);
|
||||
}
|
||||
|
||||
foreach($environments as $environment) {
|
||||
go(function() use ($environment) {
|
||||
$stdout = '';
|
||||
|
|
|
@ -286,6 +286,8 @@ services:
|
|||
- _APP_FUNCTIONS_MEMORY
|
||||
- _APP_FUNCTIONS_MEMORY_SWAP
|
||||
- _APP_USAGE_STATS
|
||||
- DOCKERHUB_PULL_USERNAME
|
||||
- DOCKERHUB_PULL_PASSWORD
|
||||
|
||||
appwrite-worker-mails:
|
||||
entrypoint: worker-mails
|
||||
|
|
|
@ -308,8 +308,6 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals('', $execution['body']['stderr']);
|
||||
$this->assertEquals(0, $execution['body']['time']);
|
||||
|
||||
// sleep(75);
|
||||
|
||||
// $execution = $this->client->call(Client::METHOD_GET, '/functions/'.$data['functionId'].'/executions/'.$executionId, array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
|
@ -561,7 +559,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
],
|
||||
];
|
||||
|
||||
sleep(count($envs) * 20);
|
||||
sleep(count($envs) * 15);
|
||||
fwrite(STDERR, ".");
|
||||
|
||||
/**
|
||||
|
@ -643,7 +641,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$executionId = $execution['body']['$id'] ?? '';
|
||||
$this->assertEquals(201, $execution['headers']['status-code']);
|
||||
|
||||
sleep(30);
|
||||
sleep(10);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -742,7 +740,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertEquals(201, $execution['headers']['status-code']);
|
||||
|
||||
sleep(15);
|
||||
sleep(10);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
|
Loading…
Reference in a new issue