Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CommandObjectDocumentation
getlist-item / store-item / update-item / delete-item

Scheduling Objects such as Workflows

clone  / checkout

Git Repository



add / commit / push / pull
get-credentials / store-credentials / delete-credentials

...

Code Block
languagebash
titleExample for Listing Objects from a Git Repository
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# list items from Git JOC Cockpit rollout repository
./deploy-git.sh list-item    "${request_options[@]}" --folder=/TestRepo --recursive

# list items from JOC Cockpit local repository
./deploy-git.sh list-item    "${request_options[@]}" --folder=/TestRepo --recursive --local

Storing Scheduling Objects to a Git Repository

...

Code Block
languagebash
titleExamples for Deleting Scheduling Objects from a Git Repository
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# delete items from rolloutJOC Cockpitrollout repository: folder
./deploy-git.sh delete-item "${request_options[@]}" --folder=/TestRepo/03_VariablesPassing

# delete items from JOC Cockpit rollout repository: object path and type
./deploy-git.sh delete-item "${request_options[@]}"  --path=/TestRepo/03_VariablesPassing/jdwVariablesAdHoc --type=WORKFLOW

# delete items from JOC Cockpit rollout repository: object path and type
./deploy-git.sh delete-item "${request_options[@]}"  --path=/TestRepo/51_JobTemplates/51_JobTemplate --type=JOBTEMPLATE

# delete items from JOC Cockpit local repository: object path and type
./deploy-git.sh delete-item "${request_options[@]}"  --path=/TestRepo/03_VariablesPassing/jdjVariablesJobResource --type=JOBRESOURCE --local

...

Code Block
languagebash
titleExamples for Updating the JOC Cockpit Inventory from a Git Repository
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# update inventory items from JOC Cockpit rollout repository: folder
./deploy-git.sh update-item "${request_options[@]}" --folder=/TestRepo

# update inventory items from JOC Cockpit local repository: folder
./deploy-git.sh update-item "${request_options[@]}" --folder=/TestRepo --local

# update inventory items from JOC Cockpit rollout repository: path and object type of object
./deploy-git.sh update-item "${request_options[@]}" --path=/TestRepo/03_VariablesPassing/jdwVariablesAdHoc --type=WORKFLOW

Deploying Scheduling Objects from a Git Repository

The operation will return the list of scheduling objects available in update the JOC Cockpit's Git repository from inventory items and will push changes to the remote Git repository.

Code Block
languagebash
titleExample for Deploying Objects from a Git Repository
linenumberstrue
# common options for connection to JS7 REST API
request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller)

# store inventory items to JOC Cockpit rollout repository: folder
./deploy-git.sh store-item    "${request_options[@]}" --folder=/TestRepo --recursive

# add items to JOC Cockpit rollout repository
./deploy-git.sh add           "${request_options[@]}" --folder=/TestRepo

# commit changes to JOC Cockpit rollout repository and keep commit hash
hash=$(./deploy-git.sh commit "${request_options[@]}" --folder=/TestRepo --message="v.1.23.34")

# pull changes from remote repository to JOC Cockpit rollout repository
./deploy-git.sh pull          "${request_options[@]}" --folder=/TestRepo

# push changes from JOC Cockpit rollout repository to remote repository
./deploy-git.sh push          "${request_options[@]}" --folder=/TestRepo

...