Exit code is 0 when catalog cannot be pushed
mhutter opened this issue · 1 comments
mhutter commented
When commodore can clone the cluster-catalog but not push to it, the command still exits without an error.
Since we use commodore in Gitlab pipelines, the pipeline is marked as "successful" even though no push to the catalog occurred.
See Jira ticket for example
Steps to Reproduce the Problem
- set up an access token that can clone the cluster-catalog but cannot push to the main/master branch
- run commodore with a change
Actual Behavior
commodore
exits with code 0
Logs:
> Commiting changes...
> Pushing catalog to remote...
Error lines received while fetching: error: failed to push some refs to 'https://gitlab-ci-token:[MASKED]@....git'
Catalog compiled! 🎉
Expected Behavior
commodore
exits with a code != 0
simu commented
Found the issue: we're currently not checking the result of the push to the catalog repo in
commodore/commodore/catalog.py
Line 103 in 660a48a