Cli: force:mdapi:deploy progress bar not rendering in CI/CD systems

Created on 16 Jan 2020  路  5Comments  路  Source: forcedotcom/cli

When utilizing the force:mdapi:deploy command in server-based CI/CD systems (such as Bitbucket Pipelines, CircleCI, TeamCity, etc.) these systems often don't have the same CLI UI refresh capabilities as local systems do.

This causes the output of the new progress bar to display nothing at all when a deployment / unit test run is occurring. Essentially, it reduces progress reports during deploys to nothing besides the system exit code at the end or JSON output if you're utilizing that functionality.

A runtime flag to show a line-by-line output for these types of server-based systems which stream output to a web browser would be an ideal resolution.

feature

Most helpful comment

Seems like this has been breaking our CI for the past few days.

Workaround I'd suggest in the meantime:

  • Avoid using sfdx update + lock SFDX to a stable version (such as 7.45.1 that worked for us)

sfdx plugins:install [email protected]

  • Add SFDX_USE_PROGRESS_BAR=false as an environment variable to keep your CI alive by spitting out build status on a regular basis (like the old progress bar used to do with stdout)

Happy CI-ing :)

All 5 comments

FYI, I've raised a bug relating to this progress bar issue in non-tty environments in the underlying library here: oclif/cli-ux#137.

We agree that for non-tty environments it is good to have the progress line by line. We are going to pass the progress to stderr behind an env var. This will show the progress as we had before and not include the progress bar. Please let us know if this solution will work for you?

The progress should be passed to stdout since it is not an error. The CLI progress bar component already supports this functionality but was accidentally disabled by oclif/cli-ux. It looks like the bug in oclif/cli-ux has been fixed so this should just work now.

Seems like this has been breaking our CI for the past few days.

Workaround I'd suggest in the meantime:

  • Avoid using sfdx update + lock SFDX to a stable version (such as 7.45.1 that worked for us)

sfdx plugins:install [email protected]

  • Add SFDX_USE_PROGRESS_BAR=false as an environment variable to keep your CI alive by spitting out build status on a regular basis (like the old progress bar used to do with stdout)

Happy CI-ing :)

We have added the env var SFDX_USE_PROGRESS_BAR if you set this to false you can get the previous output. Please also see this blog we published on terminal output and CI. I am closing this issue. Thank you all for the feedback.

Was this page helpful?
0 / 5 - 0 ratings