Toolboxcategory cloud |
ViewsPersonal toolsSSCM GetFrom Seapine Labs
[edit] SSCM GetAbout In Surround SCM, it is easy to create a Get trigger when you have a defined working directory. It is more complicated to perform a Get to any other location because the trigger requires a Get to path. The SSCMGet program allows you to enter a path to perform a Get to. This path is the root location and should represent a root repository location in Surround SCM that the trigger recursively monitors for changes. The repository path is then used (without the mainline name) to determine the Get path for subdirectories. [edit] InstallationUnzip SSCMGet to a directory on the Surround SCM Server side where you want to run the application. [edit] RunningSince there are so many arguments it is best to run the program through a batch, but it would be possible to setup a trigger to include all the required arguments without using a batch file. These instructions will be written assuming a batch file is used. It is necessary to setup a Surround trigger which will execute the script. The "Run Executable" settings require the path to the script itself, the repository/filename and the branch name. Here is an example of what the trigger settings would look like. C:\Scripts\SSCMGet.bat "%SSCM_REPOSITORY%/%SSCM_FILE%" "%SSCM_BRANCH%" The SSCMGet.exe program requires the following arguments in this order.
\\WebServer1\wwwroot
"Mainline/Project 1/src/wwwroot"
"Mainline/Project 1/src/wwwroot/default.htm"
Here is an example batch command that is not run from a trigger. SSCMget.exe administrator:admin localhost:4900 C:\Temp\SSCMGetTest "Mainline/Project 1/src/wwwroot" "Mainline/Project 1/src/wwwroot/default.htm" Here is the same command but run as a trigger. "C:\Scripts\SSCMget.exe" administrator:admin localhost:4900 C:\Temp\SSCMGetTest Mainline/Project1 %1 %2 [edit] Example ScenarioHere is an outline of how the script functions and how a user can implement it properly. The path to my web server's home directory is currently set to '\\WebServer1\wwwroot' and I store my HTML documents in a Surround repository with the path of 'Mainline/Project 1/src/wwwroot'. I want to write a trigger that will update the \\WebServer1\wwwroot path with any changes recursively, however I do not want to setup a working directory to use that path (maybe the user only has CLI access). Using SSCMGet I can pass the following arguments. sscmget.exe buildbot:seapine scmserver:4900 "\\WebServer1\wwwroot" "Mainline/Project 1/src/wwwroot" "Mainline/Project 1/src/wwwroot/docs/images/pic.gif" "Mainline" When I run the program an "sscm get" is performed. The SSCMGet.exe program will remove this part of the repository path "Mainline/Project 1/src/wwwroot" and use the remaining portion of the repository and filename path to copy the file out to "\\WebServer1\wwwroot\docs\images\pic.gif". To automate this as a trigger I can use the same command in a batch file only needing to replace the last two arguments with input variables. sscmget.exe buildbot:seapine scmserver:4900 "\\WebServer1\wwwroot" "Mainline/Project 1/src/wwwroot" %1 %2 Then setup a trigger which points to the batch file itself and includes "%SSCM_REPOSITORY%/%SSCM_FILE%" "%SSCM_BRANCH%" which are the necessary two arguments that represent the repository/filename location of the file and the branch name. The script can be adapted in several ways. I can also run the script this way with the same results: sscmget.exe buildbot:seapine scmserver:4900 "\\WebServer1" "Mainline/Project 1/src" %1 %2 [edit] Downloads[edit] Release Notes1.0.1
[edit] Known Issues
|
|


