SQLclCI/CDAPEX

Your APEX pipeline might be lying to you: SQLcl exits 0 when apex import fails

SQLcl returns exit code 0 even when apex validate or apex import reports errors, so a CI job goes green with nothing deployed.

I tested an APEX CI/CD pipeline the hard way, and found a trap worth sharing.

SQLcl returns exit code 0 even when apex validate or apex import reports errors. I reproduced it with a broken .apx file, a missing path, and a wrong password. Every time: exit 0. Your GitHub Actions job shows green while nothing was deployed.

Two more things I didn't expect

  • apex validate is an offline compile check. It runs without a database connection, so it won't catch a bad password or a missing table.
  • A missing table isn't caught by apex import either. The import succeeds; the page fails when someone opens it.

What works

  1. Save each step's output to a log and fail the step unless it contains "Validation successful." or "Import successful."
  2. Pass the password on standard input (a heredoc), never on the command line.
  3. Create schema objects before the import, and smoke-test the app after deploying.

The full, step-by-step version is in the guide

CI/CD for APEX with GitHub Actions

Read the guide →

Get the Oracle + AI digest

One email when a new tested guide, template or APEX release note lands — English or Arabic. No spam; unsubscribe anytime.