Versions Compared

Key

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

...

OperationObjectDocumentation
export / importAnyJS7 - Inventory Export and Import
import-deployController objects such as WorkflowsJS7 - Secure Deployment of Scheduling Objects
deploy / revokeAutomation objects such as WorkflowsJS7 - Deployment of Scheduling Objects
release / recallAutomation objects such as Schedules
store / removeAnyStore object to inventory / move objects to trash
restore / deleteAnyRestore removed objects or / delete removed objects from trash
revalidateAnyRevalidate objects from inventory folder


The script is offered for download and can be used as a command line interface for frequently used deployment operations:

  • The script is available for Linux and MacOS® using bash shell.
  • The script terminates with exit code 0 to signal successful execution, with exit code 1 for command line argument errors and with exit code 4 for non-recoverable errors. Exit code 3 signals that no matching objects have been found.
  • The script is intended as a baseline example for customization by JS7 users and by SOS within the scope of professional services. Examples make use of JS7 Release 2.7.2, bash 4.2, curl 7.29.0 and jq 1.6.0.

...

  • export
    • Allows to export scheduling objects such as workflows to an archive file in .zip or .tar.gz format. The command comes in two flavors:
      • export individual objects specified by the --path and --type options.
        • Should relative paths be used in the archive file then the --start-folder option and --use-short-path switch can be applied.
      • export objects from folders using the --folder option and --recursive switch.
        • Optionally the object type is specified and otherwise all objects will be exported.
        • Should relative paths be used in the archive file then the  --use-short-path switch can be applied.
    • The archive file is specified from the --file and --format options.
  • import
    • Imports an archive file to the inventory.
    • Users can specify if existing objects will be overwritten or if duplicate objects from the import file will be assigned a prefix or suffix or will be ignored.
  • import-deploy
    • Imports an archive file to the inventory and deploys the included objects. The operation is applicable if JOC Cockpit is operated for the high security levelHigh Security Level.
      • As a prerequisite the archive file must have been exported using the --for-signing switch.
      • Workflows and Job Resources from the archive file have been digitally signed by the user. Signature files have been added to the archive file.
    • On import the objects in the archive file are deployed to related Controllers as specified during export.
  • deploy
    • Allows to deploy Controller objects such as workflows. The command can be used in two flavors:
      • deploy individual objects specified by the --path and --type options.
      • deploy objects from folders using the --folder option and --recursive switch.
    • Deploying objects forwards them to Controllers and Agents.
  • revoke
    • Allows to undeploy Controller objects such as workflows. The command can be used in two flavors:
      • revoke individual objects specified by the --path and --type options.
      • revoke objects from folders using the --folder option and --recursive switch.
    • Revoking Controller objects deletes them from the Controller and Agents, objects remain in draft status in the inventory.
  • release
    • Allows to release Automation objects such as schedules. The command can be used in two flavors:
      • release individual objects specified by the --path and --type options.
      • release objects from folders using the --folder option and --recursive switch.
    • Rleasing Releasing Automation objects activates them for example for use by the Daily Plan.
  • recall
    • Allows to unrelease Automation objects such as schedules. The command can be used in two flavors:
      • recall individual objects specified by the --path and --type options.
      • recall objects from folders using the --folder option and --recursive switch.
    • Recalling Automation objects deactivates them from further use, objects remain in draft status in the inventory.
  • store
    • Allows to store an object such as a workflow or schedule from a file to the inventory.
      • The --file option specifies the file that holds the JSON representation of an object.
      • The --type option specifies the object type. 
      • The --path option specifies the folders and object name of the objects inventory location.
    • Objects are stored to the inventory in draft status and can be deployed or released using the related commands.
  • remove
    • Allows to remove objects such as workflows or schedules from the inventory. The command can be used in two flavors:
      • remove individual objects specified by the --path and --type options.
      • remove objects from folders recursively using the --folder option.
    • Controller objects such as workflows are removed from the Controller and from the inventory. Automation objects such as schedules are removed from the inventory.
    • Removing objects moves them to the trash from which they can be restored or deleted
  • restore
    • Allows to restore objects such as workflows or schedules from the trash. The command can be used in two flavors:
      • restore individual objects specified by the --path and --type options.
      • restore objects from folders recursively using the --folder option.
    • Restoring objects moves them from the trash to the inventory from which they can be deployed or released.
  • delete
    • Allows to delete objects such as workflows or schedules from the trash. The command can be used in two flavors:
      • delete individual objects specified by the --path and --type options.
      • delete objects from folders recursively using the --folder option.
    • Deleting objects will permanently wipe them from the trash.
  • revalidate
    • Allows to valildate objects such as workflows or schedules from the inventory, for example after import. The command can be used for inventory folders.

...

  • -h | --help
    • Displays usage.
  • -v | --verbose
    • Displays verbose log output that includes requests and responses with the JS7 REST Web Service.
    • When used twice as with -v -v then curl verbose output will be displayed.
  • -p | --password
    • Asks the user for interactive keyboard input of the password used for the account specified with the --user option..
    • The switch is used for secure interactive input as an alternative to use of the option --password=<password>.
  • -r | --recursive
    • Specifies that folders will be looked up recursively if the --folder option is used.
  • -d | --delete
    • Specifies that objects should be deleted from the inventory.
    • Deployable objects will be revoked from the Controller. Releasable objects will be recalled.
    -o | --overwrite
    • Specifies that objects with the same name and type will be overwritten when used with the import operation.
  • -s | --for-signing
    • Specifies that objects are exported for digital signing when used with the export operation. For JS7 environments operated for the high security level digitally signed objects can be imported using the import-deploy operation.
  • -u | --use-short-path
    • Specifies that relative object paths will be applied to archive files when used with the export operation.
    • An object path /a/b/c/workflow will be added as /c/workflow to the archive file. A folder /a/b/c will be added as /c to the archive file.
  • --no-draft
    • Specifies that no draft objects will be processed excluded when used with the export and deploy operations.
  • --no-deployed
    • Specifies that no deployed objects in deployed status will be processed when excluded when used with the export and deploy operations.
  • --no-released
    • Specifies that no that released objects in released status will be processed excluded when used with the export operation.
  • --no-invalid
    • Specifies that only valid invalid objects will be processed when excluded when used with the export operation.
  • --show-logs
    • Displays the log output created by the script if the --log-dir option is used.
  • --make-dirs
    • If directories are missing that are indicated with the --log-dir option then they will be created.

...