Auto deployment of the workshop code so review can be done faster.
By leveraging the infra-structure setup by the Swarm team - at swarm-deploy.perforce.com.
swarm-deploy.perforce.com is the deploy host used by the Swarm team within Perforce. When a review starts Swarm trigger a deploy script via a HTTP request as described in the documentation.
Automatic deployment URL in Swarm is set to:
A directory "workshop" was created in the document root of swarm-deploy.
The deployment scripts (deploy.php and update.php) and the configuration (config.php) were updated to support the workshop project. Only the main project is configured (accepted).
deploy.php basically validates the URL parameters and do a GET on update.php to do the heavy lifting of:
Since the workshop code is stored in a stream depot, a virtual stream was created to include only the files required for Swarm - the files under swarm/tests are particular large so they are ignored in the stream spec.
Also note that since one cannot remap //workshop/swarm-deploy/swarm/... to //workshop/swarm-deploy/... a direcotry was created in an alternate location and a symlink was used to make the Swarm code available at the location required by the Apache configuration.
Review 1011064 tgray authored this 2 days ago for main, committed 4 days ago in 1010791
Deployment Trigger URL for review 1011064
<hr> Questions & comments => <a href="mailto:lcheung@perforce.com">lcheung@perforce.com</a>
WHAT & WHY ==== Auto deployment of the workshop code so review can be done faster. HOW === By leveraging the infra-structure setup by the Swarm team - at swarm-deploy.perforce.com. *swarm-deploy.perforce.com* is the deploy host used by the Swarm team within Perforce. When a review starts Swarm trigger a deploy script via a HTTP request as described in the [documentation](http://www.perforce.com/perforce/doc.current/manuals/swarm/quickstart.review_deployment.html). Automatic deployment URL in Swarm is set to: http://swarm-deploy.perforce.com/workshop/deploy/{review}/?change={change}&branch={branch}&project={project}&success={success}&fail={fail} A directory "workshop" was created in the document root of *swarm-deploy*. The deployment scripts (*deploy.php* and *update.php*) and the configuration (*config.php*) were updated to support the *workshop* project. Only the *main* project is configured (accepted). *deploy.php* basically validates the URL parameters and do a GET on *update.php* to do the heavy lifting of: - Creating a temp client on the Perforce server. - Syncing the workspace to the change specified. - Unshelving the shelved files from the review. - Resolving any conflicts. - Setting up a *.htaccess* file for the new DocumentRoot. - Creating a demo P4D instance from a ZIP file (defined in config.php) using the RSH hack. - Installing Swarm trigger for the P4D instance. - Setting up Swarm - token/config/email to file etc. Since the workshop code is stored in a stream depot, a virtual stream was created to include only the files required for Swarm - the files under *swarm/tests* are particular large so they are ignored in the stream spec. Also note that since one cannot remap *//workshop/swarm-deploy/swarm/...* to *//workshop/swarm-deploy/...* a direcotry was created in an alternate location and a symlink was used to make the Swarm code available at the location required by the Apache configuration. Notes ===== Review 1011064 tgray authored this 2 days ago for main, committed 4 days ago in 1010791 [Deployment Trigger URL for review 1011064](http://swarm-deploy.perforce.com/workshop/deploy/1011064?change=1010791&branch=main&project=workshop&success=https%3A%2F%2Fswarm.perforce.com%2Freviews%2F1011064%2Fdeploy%2Fsuccess%2F2611C8EE-E527-88DA-1EBC-FFE36680B31A%2F&fail=https%3A%2F%2Fswarm.perforce.com%2Freviews%2F1011064%2Fdeploy%2Ffail%2F2611C8EE-E527-88DA-1EBC-FFE36680B31A%2F) <hr> Questions & comments => <a href="mailto:lcheung@perforce.com">lcheung@perforce.com</a>