Page History
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Import-Module JS7
Connect-JS7 -Url http://root:root@prod_host:4446 -Id 'Controller' | Out-Null
# Pull changes from remote Git repository
Invoke-JS7GitRepositoryPull -Folder '/Accounting' | Out-Null
|
Update JOC Cockpit Inventory from local Git Repository, Release and Deploy to Controller
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
# --- Parameterization ---
$url = 'http://root:root@prod_host:4446'
$controllerId = 'Controller'
$folder = '/Accounting'
$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 remote test repository to remote prod repository ---
# navigate to local repository folder on prod host
cd C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\resources\joc\repositories\rollout\Accounting
# 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 ---
# Pull changes
Invoke-JS7GitRepositoryPull -Folder $folder | Out-Null
# --- 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