Skip to Content
Aperture

Jobs

What a job is, how deploys work, and what happens on redeploy.

A job is a named unit of code inside a project. It's defined by a directory containing your code and a job.json manifest, and it's identified by its name, which is unique within the project.

Deploying

aperture-cli deploy <job> does the following:

  1. Runs the manifest's build command locally, if it has one.
  2. Zips the files listed in includes.
  3. Uploads the zip and the manifest fields to POST /api/v1/jobs/deploy.

The server saves the job definition right away and responds 201. A background worker then unpacks the zip into a fresh directory and swaps it in atomically, so files you removed since the last deploy disappear. When unpacking finishes, Aperture sends a job.deployment_succeeded or job.deployment_failed webhook.

The upload limit is 8 MB for the whole request.

Redeploying

Deploying a name that already exists in the project replaces that job. Every manifest field is overwritten, so removing a field from job.json and redeploying clears it, for example removing schedule stops the cron schedule.

Runs always use the job definition that is current when the run starts, so a run queued before a redeploy uses the new cmd.

The definition is updated before the new files are unpacked. A run that starts in the few seconds between the two can use the new command with the old files.

Missing secrets

If the manifest declares secrets that aren't set in the project yet, the deploy still succeeds but returns a warning (the CLI prints it). Runs fail with error_code: "missing_secrets" until you add them.

Updating and deleting

Jobs are created and changed only by deploying. There is currently no API, CLI command or dashboard action that deletes a job. See Limitations.

On this page