Prerequisites

porter job contains commands for interacting with jobs.

porter job update-images

Updates the image tag of all jobs in a namespace which use a specific image. Note that for all jobs with version <= v0.4.0, this will trigger a new run of a manual job. However, for versions>= v0.5.0, this will not create a new run of the job.

Examples

To update all jobs deployed from the image repo my-image.registry.io with the new tag newtag, you can run:

porter job update-images --image-repo-uri my-image.registry.io --tag newtag

This command is namespace-scoped and uses the default namespace. To specify a different namespace, use the --namespace flag:

porter job update-images --namespace custom-namespace --image-repo-uri my-image.registry.io --tag newtag

porter job run

Manually runs a job and waits for it to complete. If the job completes successfully, this command exits with exit code 0. Otherwise, this command exits with exit code 1.

Examples

Run a job named job-example:

porter job run --name job-example

This command is namespace-scoped and uses the default namespace. To specify a different namespace, use the --namespace flag:

porter job run --name job-example --namespace custom-namespace

porter job wait

Waits for a job with a given name and namespace to complete a run. If the job completes successfully, this command exits with exit code 0. Otherwise, this command exits with exit code 1.

Examples

Wait for a job run of job-example to run:

porter job wait --name job-example

This command is namespace-scoped and uses the default namespace. To specify a different namespace, use the --namespace flag:

porter job wait --name job-example --namespace custom-namespace