Page History
...
- The scenario is described with the JS7 - Git Repository Interface.
- CI/CD includes to perform the following steps
- in a test environment
- to store scheduling objects of a JOC Cockpit inventory to a local Git repository,
- to commit and to push changes to the remote Git repository.
- in a prod environment
- to copy changes from the remote test Git repository to the remote local prod Git repository,
- to pull push changes from the remote local prod Git repository to the local remote prod Git repository,
- to update the JOC Cockpit inventory from the local Git repository,
- to release and to deploy scheduling objects to Controllers and Agents.
- in a test environment
- The following examples assume that a local Git repository is set up in the test and prod environments, see PowerShell CLI 2.0 - Set up local Git Repository.
Steps to perform in the TEST Environment
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Import-Module JS7
Connect-JS7 -Url http://root:root@test-host:4446 -Id Controller | Out-Null
# Cleanup local repository by removing existing objects
Remove-JS7RepositoryItem -Folder /Accounting
# Store scheduling objects of the given folder and exclude draft versions to be used
Set-JS7RepositoryItem -Folder /Accounting -Recursive -NoDraft
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Find the repository sub-directory managed by JOC Cockpit cd /var/sos-berlin.com/js7/joc/jetty_base/resources/joc/repositories/rollout/Accounting # Follows Commit and push changes to the remote Git integration partrepository git add . git commit -m "changes to accounting jobs for v12.3" git push |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# add the oldtest repo as a remote repository git remote add oldrepo https://github.com/path/to/oldrepogit@github.com:sos-berlin/js7-demo-inventory-rollout-test.git # get the oldtest repo commits git remote update # examine the whole tree git log --all --oneline --graph --decorate # copy (/cherry-pick) the commits from the oldtest repo into your new local one git cherry-pick sha-of-commit-oneprod repo git cherry-pick sha-of-commit-two git cherry-pick sha-of-commit-three <commit-hash> # check yourlocal localprod repo is correct git log # push sendchanges yourto newremote treeprod (repo state) to github git push origin master # remove the now-unneeded reference to the test oldreporepo git remote remove oldrepo |
Explanation:
- Line 11: The <commit-hash> identifies commits performed to push scheduling objects to the test repository.
Pull Changes to local Git Repository
...
Overview
Content Tools