Page History
...
The below example includes use of the above cmdlets in a pipeline script.
Download PowerShell Script: Rollout-JS7FromTest.ps1
...
The below example includes use of the above cmdlets in a pipeline script.
Download PowerShell Script: Rollout-JS7ToProd.ps1
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
# --- Parameterization --- $url = 'http://root:root@localhost:4446' $controllerId = 'Controller' $folder = '/TestRepo/testMyFolder' $directory = 'C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\resources\joc\repositories\rollout\TestRepo' $repo = 'git@github.com:sos-berlin/js7-demo-inventory-rollout-test.git' $commitHash = '04b07d8' # --- Connection --- Import-Module JS7 Connect-JS7 -Url $url -Id $controllerId | Out-Null # --- Step 1: Cherry-pick changes from test repository to prod repository --- cd $directory # add the test repo as a remote repository git remote add oldrepo $repo # get the test repo commits git remote update # examine the whole tree git log --all --oneline --graph --decorate # copy/cherry-pick the commits from the test repo into your local prod repo git cherry-pick $commitHash # check local prod repo git log # push changes to remote prod repo git push origin master # remove the reference to the test repo git remote remove oldrepo # --- Step 2: Pull Changes to local Git Repository --- cd $directory # Pull changes git pull # --- Step 3: Cleanup repository and store scheduling objects to repository --- # Update the JOC Cockpit inventory from the local repository of the given folder Update-JS7FromRepositoryItem -Folder $folder # Release scheduling objects of the given folder Publish-JS7ReleasableItem -Folder $folder -Recursive -NoReleased # Deploy scheduling objects from the given folder to the Controller Publish-JS7DeployableItem -ControllerId $controllerId -Folder $folder -Recursive -NoDeployed # --- Connection --- Disconnect-JS7 |
...
Overview
Content Tools