|
@@ -8,8 +8,6 @@ class minioUpdateCest
|
|
|
public function minioUpdate()
|
|
|
{
|
|
|
|
|
|
-
|
|
|
-
|
|
|
$s3 = new Aws\S3\S3Client([
|
|
|
'version' => 'latest',
|
|
|
'region' => 'sa-east-1',
|
|
@@ -21,20 +19,6 @@ $s3 = new Aws\S3\S3Client([
|
|
|
],
|
|
|
]);
|
|
|
|
|
|
-/* Send a PutObject request and get the result object.
|
|
|
-$insert = $s3->putObject([
|
|
|
- 'Bucket' => 'testbucket',
|
|
|
- 'Key' => 'testFer',
|
|
|
- 'Body' => 'Hello Fer!!'."\n"
|
|
|
-]);
|
|
|
-
|
|
|
-// Download the contents of the object.
|
|
|
-$retrive = $s3->getObject([
|
|
|
- 'Bucket' => 'testbucket',
|
|
|
- 'Key' => 'testFer',
|
|
|
- 'SaveAs' => 'testkey_local'
|
|
|
-]);
|
|
|
-*/
|
|
|
$head = shell_exec('git rev-parse HEAD');
|
|
|
$head = substr($head,0,-1);
|
|
|
$directorioA = array('01_login/','02_base/','03_ftth/','04_map/');
|
|
@@ -65,44 +49,39 @@ $retrive = $s3->getObject([
|
|
|
echo "Directorio '" . $dir . "' actualizado. Commit: " . $head . "\n" ;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//descargar HEAD~1
|
|
|
|
|
|
-$s3 = new Aws\S3\S3Client([
|
|
|
- 'version' => 'latest',
|
|
|
- 'region' => 'sa-east-1',
|
|
|
- 'endpoint' => 'https://s3.infra.flowdat.com/minio/login',
|
|
|
- 'use_path_style_endpoint' => true,
|
|
|
- 'credentials' => [
|
|
|
- 'key' => 'iksop',
|
|
|
- 'secret' => '8htoiwn44g204th',
|
|
|
- ],
|
|
|
-]);
|
|
|
- $head = shell_exec('git rev-parse HEAD~1');
|
|
|
- $head = substr($head,0,-1);
|
|
|
+ $s3 = new Aws\S3\S3Client([
|
|
|
+ 'version' => 'latest',
|
|
|
+ 'region' => 'sa-east-1',
|
|
|
+ 'endpoint' => 'https://s3.infra.flowdat.com/minio/login',
|
|
|
+ 'use_path_style_endpoint' => true,
|
|
|
+ 'credentials' => [
|
|
|
+ 'key' => 'iksop',
|
|
|
+ 'secret' => '8htoiwn44g204th',
|
|
|
+ ],
|
|
|
+ ]);
|
|
|
+
|
|
|
+ $head = shell_exec('git rev-parse HEAD~1');
|
|
|
+ $head = substr($head,0,-1);
|
|
|
|
|
|
- for ($i = 0; $i < 4; $i++)
|
|
|
- {
|
|
|
- $dir = $directorioA[$i];
|
|
|
- shell_exec('mkdir -p ./tests/to_compare/' . $head . "/" . $dir);
|
|
|
- }
|
|
|
+ for ($i = 0; $i < 4; $i++)
|
|
|
+ {
|
|
|
+ $dir = $directorioA[$i];
|
|
|
+ shell_exec('mkdir -p ./tests/to_compare/' . $head . "/" . $dir);
|
|
|
+ }
|
|
|
|
|
|
- $iterator = $s3->getIterator('ListObjects', array('Bucket'=> "testbucket",'Prefix'=> $head));
|
|
|
+ $iterator = $s3->getIterator('ListObjects', array('Bucket'=> "testbucket",'Prefix'=> $head));
|
|
|
|
|
|
- foreach ($iterator as $object) {
|
|
|
-// echo "Objeto cargado: " . $object['Key'];
|
|
|
-
|
|
|
- $retrive = $s3->getObject([
|
|
|
- 'Bucket' => 'testbucket',
|
|
|
- 'Key' => $object['Key'],
|
|
|
- 'SaveAs' => './tests/to_compare/' . $object['Key']
|
|
|
-]);
|
|
|
- echo "Se descargó el archivo " . $object['Key'] . "\n";
|
|
|
- }
|
|
|
-
|
|
|
+ foreach ($iterator as $object)
|
|
|
+ {
|
|
|
+// echo $object['Key'];
|
|
|
+ $retrive = $s3->getObject([
|
|
|
+ 'Bucket' => 'testbucket',
|
|
|
+ 'Key' => $object['Key'],
|
|
|
+ 'SaveAs' => './tests/to_compare/' . $object['Key']
|
|
|
+ ]);
|
|
|
+ echo "Se descargó el archivo " . $object['Key'] . "\n";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-// Print the body of the result by indexing into the result object.
|
|
|
-//echo $retrive['Body'];
|