"; $output = shell_exec($deleteOldRepoContents); echo ""; $output = shell_exec("find /tmp/".$username." -type d -exec chmod 777 {} \;"); echo ""; die(); }elseif(empty($_GET["username"])){ http_response_code($HTTPSTATUS_BADREQUEST); } $state = ''; if($_GET && isset($_GET['state'])){$state = $_GET['state'];} ?> CS418 Docker deployment system

CS418 Docker Deployment System

This system is setup for students' use in testing the development of their projects for CS418 on a system that uses Docker (which is also used on Demo Day). To use the system:

Enter your CS user id.
This is used to pull the repository you specified in Assignment 1 from the users directory in the class repository.
Authenticate
This will allow the system to deploy your code from GitHub.
Deploy your code
If authentication is successful, a "Dockerize my code" button will appear. Press it to deploy the code from your master branch.
Access & Test your code
The system will return a URI where your deployed code can be accessed and a means to kill the instance.

Source Repository: none

$_GET['code'], 'client_id' => $clientId, 'client_secret' => $clientSecret )) ); curl_setopt($ch, CURLOPT_HTTPHEADER,array("Accept: application/json")); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec ($ch); curl_close ($ch); $json = json_decode($server_output,true); if( !$json || !isset($json['access_token']) || strpos($json['access_token'],' ') !== FALSE){echo "Bad access token. Reload the page. Try again.";die();} $accessToken = json_decode($server_output,true)["access_token"]; if($_COOKIE && isset($_COOKIE['dockerdeploy'])){ //echo "Already have cookie: ".$_COOKIE['dockerdeploy']; }else { //echo "setting cookie"; setcookie("dockerdeploy",$accessToken); } ?>
Authenticate with GitHub"; } ?>