Skip to main content
Boost your DevOps efficiency! Dive into our latest white paper.Read Now

Pre-deploy Job

Configure a pre-deploy job to run essential tasks that must be completed before application deployments, such as database migrations or seedings.

A pre-deploy job runs as a pod before your application is deployed. If the pre-deploy job fails, the application deployment is aborted.

Adding a Pre-deploy Job Container

  1. In the Application Overview tab, click the three-dot menu in the top-right corner and select "Add pre-deploy job."
  2. Configure the pre-deploy job container:
    • Container registry: Select the container registry connection. Learn more about container registry connection here.
    • Image repository: Select the desired image repository.
    • Image tag: Select the image tag.
  3. Click "Confirm" to add the container. You will be redirected to the pre-deploy job tab to add environment variables required by the container.
  4. Whenever you deploy the application, the pre-deploy job will run first.
note

Best Practices for Pre-Deploy Job Containers

  1. Ephemeral: The job should be ephemeral. Job will be terminated if it runs for more than 8 minutes.
  2. Image Size: Use lightweight base images and minimize dependencies to reduce the attack surface and improve startup time.
  3. Idempotency: Ensure the job can be safely run multiple times without causing unintended side effects.
  4. Environment Configuration: It is advisable to use environment variables as inputs to your pre-deploy job instead of command line arguments in the startup command
  5. Logging: Implement comprehensive logging to capture job execution details for debugging in case of failures.

Can't find what you need?