Search code examples
continuous-integrationgitlabcode-push

code-push whoami and code-push logout breaking job in gitlab pipeline if already logged out


I would like to be able to call code-push logout before calling login with a specific key within a stage of my gitlab pipeline. If the runner is already logged out I get an error: [Error] You are not currently logged in. Run the 'code-push login' command to authenticate with the CodePush server. that fails my job. Is there any way I can invoke this command without failing the job.


Solution

  • code-push cli doesn't have this functionality to disable Errors. You could use appcenter cli(https://github.com/Microsoft/appcenter-cli) with the same functionality. There is --quite filed which disable all errors for CI or other tasks.