I have a GitLab CI/CD Job with the following definition:
compile:
stage: compile
tags:
- windows
- powershell
- bl653_8dc0_1053
artifacts:
paths:
- main.linenumbers.uwc
script:
- XComp_BL653_8DC0_1053.exe .\main.linenumbers.sb
- Test-Path -Path .\main.linenumbers.uwc
When the job executes, the XComp_BL653_8DC0_1053.exe application fails and returns exit code 7. However, the build still succeeds even though there was a non-zero exit code and no artifacts.
Executing "step_script" stage of the job script
00:02
$ XComp_BL653_8DC0_1053.exe .\main.linenumbers.sb
OnEvent EVTMR2 call HandlerTimer2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compile Error: (0x0453) TOK_UNKNOWN_EVENTFUNC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
File : main.linenumbers.sb
Line : 110
Source : OnEvent EVTMR2 call HandlerTimer2
: ----------------------------------^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Uploading artifacts for successful job
00:01
Version: 14.3.2
Git revision: e0218c92
Git branch: 14-3-stable
GO version: go1.13.8
Built: 2021-09-30T16:11:30+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform arch=amd64 os=windows pid=7216 revision=e0218c92 version=14.3.2
WARNING: main.linenumbers.uwc: no matching files
ERROR: No files to upload
Job succeeded
I can see that it never runs the Test-Path
line, so it is correctly exiting when the non-zero exit code happens, but why is it saying the build passes?
I'm using GitLab EE version 14.9. My runner is a PowerShell Executer on Windows 10.