Frequently Asked Questions
About 473 wordsAbout 2 min
Before reporting an issue, please check the common questions below and feedback to see if the issue already exists.
If you can't find an answer, please submit an issue
in feedback
.
Why Didn't the Pipeline Trigger?
To troubleshoot pipeline trigger issues, first understand the workflow from trigger to execution.
Taking the push
event as an example:
Where
skip detection
includesifNewBranch
,ifModify
, refer to syntax.
You can investigate step by step following this workflow:
- Was the code pushed to remote?
- Does the corresponding branch have
.cnb.yml
? - Was a
push
event pipeline configured? - Did it hit skip detection?
Why Does It Work Locally But Fail in CI?
To troubleshoot this, first clarify the differences between local and CI environments:
Local | CI Environment | |
---|---|---|
Network | Local network (e.g., office intranet) | CI machine's network |
Files | All files in local directory | Git repository branch code |
Environment | Native | Specified Docker container environment |
Shell | Locally specified | sh |
Understanding these differences, we can troubleshoot step by step:
- Are you accessing resources only available on local intranet?
- Are there uncommitted files?
- Do build dependency files match .gitignore?
- Run the same image locally to get the same build environment as CI for debugging.
The default image for Cloud Native Build
is cnbcool/default-build-env.
You can execute the following command to enter the default CI environment for debugging:
docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) cnbcool/default-build-env sh
If another image is declared as the pipeline build environment, replace cnbcool/default-build-env
in the above command with the corresponding image address.
How to Log into Pipeline Container for Debugging?
Refer to Login Debugging
Why Do Script Results Differ Between Pipeline Execution and Login Debugging?
Pipelines use sh by default, while login debugging uses bash.
If you confirm the specified pipeline container supports bash (the default pipeline container does, but custom containers may not), you can change the execution script to bash xxx.sh
or bash -c '{original statement}'
.
No Output Timeout
If a job has no log output for over 10 minutes, it will be terminated. Consider adding logs, such as using the verbose parameter for npm install
.
Note this is different from job timeout declarations and cannot be modified via configuration.
Why Did Pipeline Fail Without Code Changes?
Check if dependent resources have changed, such as:
- Plugin task declares image version as latest - has the image changed?
- CI configuration files reference other repository files - have those files changed?
- Possible network fluctuations - try Rebuild.