Incorrect Compilation Script
Symptom
A task fails, and the log contains any of the following:
[ERROR] : script returned exit code 127, exitMessage is:command run failed.
Or [ERROR] : script returned exit code 1, exitMessage is:command run failed.
Or [ERROR] : script returned exit code 2, exitMessage is:command run failed
Cause Analysis
The compilation script configured in the parameter fails to be executed.
In the Linux environment, the exit code 0 indicates success, and a non-zero value indicates failure. However, each number has a different meaning:
1: common error. Check the log or logic.
2: incorrect syntax or parameter. Verify the input and syntax of the script.
127: command not found. Check whether the system environment variable contains the command.
Solution
Solution 1: Modify the compilation script command.
- Access the CodeArts Check service homepage.
- In the navigation pane, choose Code > Check. The code check page is displayed.
- Click the code check task name and go to the task details page, and choose Settings > Rule Sets.
- Click Configuration. In the displayed dialog box, check whether the compileScriptCmd is correct.
Note: Enter the compilation command that has been successfully executed locally.
- Click OK.
- Click Execute Check in the upper right corner to perform the check again.
Solution 2: If the script is correct, submit a service ticket and contact technical support engineers to check the build environment on the executor.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot