Versions Compared

Key

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

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=http://joc-2-0-primary:7446 \
    --controller-id=controller \
    --user=root \
    --password=root \
    --job-resource=/ProductDemo/Variables/pdBusinessDate \
    --key=businessDate \
    --value=$(date +'%Y-%m-%d')

# updates the Job Resource argument "businessDate" from the current date
# the connection to JOC Cockpit is established by HTTP

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=http://joc-2-0-primary:7446 \
    --controller-id=controller \
    --user=root \
    --password=root \
    --job-resource=/ProductDemo/Variables/pdConfigurationData \
    --key=configurationData \
    --env-var=CONFIGURATION_DATA \
    --file=./config.ini

# updates the Job Resource argument "configurationData" from the file specified
# the connection to JOC Cockpit is established by HTTP "CONFIGURATION_DATA" environment variable will hold the path to the file

Update Job Resource from Encrypted Value

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=http://joc-2-0-primary:7446 \
    --controller-id=controller \
    --user=root
    --password=root \
    --job-resource=/ProductDemo/Variables/pdBusinessSecret \
    --key=businessSecret \
    --value=secret \
    --encrypt-public-key=./agent.pub
 
# updates the Job Resource variable "businessSecret" from some value
# the value of the variable will be encrypted using the Agent's public key
# an additional variable "encryptedKey" and an environment variable "ENCRYPTED_KEY" will be created that both hold the encrypted symmetric key

...

Code Block
titleExample for Update of a Job Resource Variable
linenumberstrue
./set_job_resource.sh \
    --url=http://joc-2-0-primary:7446 \
    --controller-id=controller \
    --user=root \
    --password=root \
    --job-resource=/ProductDemo/Variables/pdConfigurationDataSecret \
    --key=configurationDataSecret \
    --env-var=CONFIGURATION_DATA_SECRET \
    --file=./config.ini \
    --encrypt-public-key=./agent.pub \
    --encrypt-key-var=symmetricKey \
    --encrypt-key-env=SYMMETRIC_KEY

# updates the Job Resource variable "configurationDataSecret" from the file specified
# the contents of the file will be encrypted using the Agent's public key
# an additional variable "symmetricKey" and an environment variable "SYMMETRIC_KEY" will be created that both hold the encrypted symmetric key

...