Debugging Pipeline

# When is Debugging Pipeline Needed?

Debugging pipeline is needed when user-defined scripts are executed inside a docker container, and there are inconsistencies between the local and CI environments. In such cases, issues may arise during CI builds while everything works fine locally. To troubleshoot these issues, you can use the "Debugging Pipeline" feature and log into the pipeline's docker container for debugging purposes.

# How to Use it?

Before each pipeline execution, a pipeline docker container is launched to execute user scripts. By default, the docker container is destroyed after the build is completed. However, when the pipeline build environment exists, you can log into the docker container for debugging purposes.

Debugging pipeline is available in the following two scenarios:

  1. During the build process, you can login for debugging.
  2. On the log page, select the "Debug" option next to the "Rebuild" button, and then click the "Rebuild" button. For the newly triggered build, if you haven't logged in for debugging, the build environment will be preserved for 5 minutes after the build is completed. During this time, you can login for debugging. Afterward, the system will periodically check if any users are logged in for docker debugging. If no one is logged in, the environment will be automatically destroyed. However, if someone is logged in, the environment will continue to be preserved. The build environment is kept for a maximum of 1 hour.

# Debugging Tips

When clicking the "Rebuild" button, you can select the pipeline, Stage, and Job that you want to execute. This helps developers reproduce the problem environment more easily.