Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fail_build configuration #18

Merged
merged 1 commit into from Mar 22, 2018

Conversation

UnsafePointer
Copy link
Contributor

Similar to fail_build in scan, this defaults to true, which means scan will fail the build if unit tests fail. You can optionally set this option to false if you're handling this outside Fastlane.

This behaviour is helpful when you're using a reporting step on your CI pipeline, which will set the job status depending on the results of the report publishing.

For instance, on Jenkins:

pipeline {
  stages {
    stage('Build') {
      steps {
        sh 'bundle exec fastlane build'
      }
    }

    stage('Run unit tests') {
      steps {
        sh 'bundle exec fastlane test'
      }
    }
  }

  post {
    success {
      junit(testResults: '*_TestSummaries.xml') // This will set the job to unstable if unit tests failed
    }
  }
}

Similar to `fail_build` in scan, this defaults to true, which means
scan will fail the build if unit tests fail. You can optionally set
this option to false if you're handling this outside Fastlane.
Copy link
Member

@KrauseFx KrauseFx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks 👍

@KrauseFx KrauseFx merged commit 9fbedcb into fastlane-community:master Mar 22, 2018
@KrauseFx
Copy link
Member

Do you need a new release, or are you just using master?

@UnsafePointer
Copy link
Contributor Author

Given that the last release was some time ago, a new release would be really appreciated 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants