How to Increase timeout for command in circle 2.0?

Hello.
We use circleci for build ipa file.

      - run:
          name: Fastlane
          command: bundle exec fastlane $FASTLANE_LANE

Its takes more than default 600s. I find docs only for v1.0 and try to

      - run:
          name: Fastlane
          command: bundle exec fastlane $FASTLANE_LANE:
              timeout: 1200

but got error Syntax Error while parsing circle.yml: mapping values are not allowed here in ‘reader’, line 22, column 55: … dle exec fastlane $FASTLANE_LANE: ^

How to Increase default timeout in circle 2.0???

Thanks. I update my code sample.

And Yes, I use four-space prefix.

1 Like

I think the problem is here bundle exec fastlane $FASTLANE_LANE:, specifically with the final colon. It’s confusing the Circle YAML parser. If you need it, I would try:

  - run:
      name: Fastlane
      command: "bundle exec fastlane $FASTLANE_LANE:"
          timeout: 1200

I am not familiar with the timeout key though, or what level of indentation is required there. What do the CircleCI docs say about that?

My question regarding circle 2.0 configuration.
I can find information ONLY for v1.0 https://circleci.com/docs/1.0/configuration/#modifiers

use 4 spaces before

timeout

    - bundle install: # note the colon here
        timeout: 240 # note the double indentation (four spaces) here

and in this case I use ‘final colon’.

Online parser (http://yaml-online-parser.appspot.com/) also show error

ERROR:

mapping values are not allowed here
in “”, line 22, column 55:
… dle exec fastlane $FASTLANE_LANE:

Lost my health with find solution :frowning:

Erm, your reply does not seem to bear any relation to my last post. Are you sure you read it? :smiley_cat:

I read, but maybe not understand what your means :frowning:

If you means use " command " - it’s not working.

And I’m not fully understand how not confuse the Circle YAML parser :frowning:
Regarding indentation - I try all combinations =) , but docs say use ‘double indentation (four spaces)’ … it’s not working.

Andy, I don’t remember running into timeouts with individual commands before, except when there is no output for a long-running command. In that case, you can specify a “no_output_timeout”. This is something we use. However, you need to put it inline with your name and command values. Example:

  - run:
      name: Fastlane
      command: bundle exec fastlane $FASTLANE_LANE
      no_output_timeout: 60m

If you search for “no_output_timeout” on this page there is a little more about it, including an example:
https://circleci.com/docs/2.0/configuration-reference/

1 Like

Thank you. it’s working!!!

1 Like