'latest', 'region' => 'sa-east-1', 'endpoint' => 'https://s3.infra.flowdat.com/minio/login', 'use_path_style_endpoint' => true, 'credentials' => [ 'key' => 'iksop', 'secret' => '8htoiwn44g204th', ], ]); //subo al HipChat $ROOM_ID="drone-ci"; $AUTH_TOKEN="umxTgNpdzUS4egXqpZvGmmYrpLWApANHBKUcciMk"; $MESSAGE1="Inicio Commit ID: " . $head; $MESSAGE2="Fin Commit ID: " . $head; shell_exec('curl -H "Content-Type: application/json" -X POST -d "{\"color\": \"purple\", \"message_format\": \"text\", \"message\": \"' . $MESSAGE1 . '\" }" https://api.hipchat.com/v2/room/' . $ROOM_ID . '/notification?auth_token=' . $AUTH_TOKEN); $directorioA = array('01_login/','02_base/','03_ftth/','04_map/','05_stats/'); for ($i = 0; $i < $cantdir; $i++) { $dir = $directorioA[$i]; $directorio = opendir("./tests/comp/" . $cliente . "/" . $fecha . "_" . $hora . "_" . $head . "/" . $dir); while ($archivo = readdir($directorio)) { if (is_dir($archivo)) { } else { $result = $s3->putObject(array( 'Bucket' => 'comparaciones', 'Key' => $cliente . "/" . $fecha . "_" . $hora . "_" . $head . '/' . $dir . $archivo, 'SourceFile' => './tests/comp/'.$cliente . "/" . $fecha . "_" . $hora . "_" . $head ."/" . $dir . $archivo )); // We can poll the object until it is accessible $s3->waitUntil('ObjectExists', array( 'Bucket' => 'comparaciones', 'Key' => $cliente . "/" .$fecha . "_" . $hora . "_" . $head . '/' . $dir . $archivo )); shell_exec('curl -H "Content-Type: multipart/related; boundary=boundary123456" -F "file=@tests/comp/'.$cliente."/" . $fecha . '_' . $hora . '_' . $head .'/' . $dir . $archivo.'" -X POST https://api.hipchat.com/v2/room/'.$ROOM_ID.'/share/file?auth_token='.$AUTH_TOKEN); } } echo "Directorio de comparación '" . $dir . "' actualizado. Fecha: " . $fecha . "_" . $hora . " Commit: " . $head . " Cliente: " . $cliente ."\n" ; } shell_exec('curl -H "Content-Type: application/json" -X POST -d "{\"color\": \"purple\", \"message_format\": \"text\", \"message\": \"' . $MESSAGE2 . '\" }" https://api.hipchat.com/v2/room/' . $ROOM_ID . '/notification?auth_token=' . $AUTH_TOKEN); } }