gitlab runner catch error: no matching files
Is there a a way to catch a error if there are no matching files found or a batch file gave a error like this?
...
Rebuild complete.
Syntaxerror.
Syntaxerror.
Syntaxerror.
Uploading artifacts...
WARNING: Ticket/Ticket_111b: no matching files
WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok id=622 responseStatus=201 Created token=xxxxxx
Job succeeded
Result shows job was executed successly. how can gitlab-runner know the error in the batch file or the no matching files-warning?
gitlab YAML file:
before_script:
- xcopy /y /s "C:/Bauen" "%CI_PROJECT_DIR%"
stages:
- build
- deploy
build:
stage: build
script:
- build.cmd
artifacts:
expire_in: 1 week
name: "%CI_COMMIT_REF_NAME%"
paths:
- "%CI_COMMIT_REF_NAME%"
only:
- tags
except:
- master
build_master:
stage: build
script:
- buildm.cmd
artifacts:
expire_in: 1 week
name: "%CI_COMMIT_REF_NAME%"
paths:
- "%CI_COMMIT_REF_NAME%"
only:
- master
deploy:
stage: deploy
script:
- ./upload.cmd
dependencies:
- build_master
only:
- master
i have no clue how to make gitlab catch a error.