# Timeout parameter not able to use in pipeline: sonarcloud-quality-gate

**URL:** <https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093>\
**Category:** SonarQube Cloud\
**Tags:** bitbucketcloud, scanner\
**Created:** [September 12, 2020, 9:26am UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093 "2020-09-12T09:26:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiao](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xiao/32/15089_2.png) [@xiao](https://community.sonarsource.com/u/xiao)\
**Post date:** [September 12, 2020, 9:26am UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093/1 "2020-09-12T09:26:48Z")

</div>

I just got below error when running pipeline with the sonarcloud-quality-gate configuration

- Error observed (

```auto
✖ Unknown error: unsupported operand type(s) for //: 'str' and 'int' 

```

)

- Steps to reproduce (  
Pipeline configuration as:

```auto
          - pipe: sonarsource/sonarcloud-scan:1.1.0
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.3
            variables:
              SONAR_QUALITY_GATE_TIMEOUT: 60

```

)

- Potential workaround: remove the variables

---

<div class="post-metadata">

**Author:** ![AlxO](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alxo/32/3225_2.png) [@AlxO](https://community.sonarsource.com/u/AlxO)\
**Post date:** [September 15, 2020, 10:01am UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093/2 "2020-09-15T10:01:42Z")

</div>

Hi @xiao,

Could you specify what is your working environment, especially what ALM you are using?

Thanks,  
@AlxO

---

<div class="post-metadata">

**Author:** ![xiao](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xiao/32/15089_2.png) [@xiao](https://community.sonarsource.com/u/xiao)\
**Post date:** [September 15, 2020, 10:21am UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093/3 "2020-09-15T10:21:15Z")

</div>

Hi Alex,

We are using bitbucket pipeline for manage our python code.  
The detail configuration of this part in pipeline yaml file is like:

> **Summary**
>
> ```auto
> definitions:
> services:
> docker:
> memory: 2048
> steps:
> - step: &code-style
> name: "Code Style"
> script:
> - pycodestyle --config .pycodestyle **/**.py
> - step: &sonar-scan
> image: atlassian/default-image:2
> name: "Sonar Scan and Quality Gate"
> size: 2x
> caches:
> - docker
> script:
> - pipe: sonarsource/sonarcloud-scan:1.1.0
> - pipe: sonarsource/sonarcloud-quality-gate:0.1.3
> variables:
> SONAR_QUALITY_GATE_TIMEOUT: 60
> 
> ```

---

<div class="post-metadata">

**Author:** ![AlxO](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alxo/32/3225_2.png) [@AlxO](https://community.sonarsource.com/u/AlxO)\
**Post date:** [September 15, 2020, 11:49am UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093/4 "2020-09-15T11:49:38Z")

</div>

Hi @xiao,

[This documentation](https://bitbucket.org/sonarsource/sonarcloud-quality-gate/src/master/) suggest putting the variable between simple quotes, e.g.:

> ```
> SONAR_QUALITY_GATE_TIMEOUT: '<int>' # Optional
> 
> ```

variables:  
SONAR\_QUALITY\_GATE\_TIMEOUT: ‘60’

I don’t know if this correct, but did you try that?

---

<div class="post-metadata">

**Author:** ![xiao](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xiao/32/15089_2.png) [@xiao](https://community.sonarsource.com/u/xiao)\
**Post date:** [September 15, 2020, 1:48pm UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093/5 "2020-09-15T13:48:15Z")

</div>

Hi Alex,

I tried both, with and without simple quotes, both got the same error:

```auto
✖ Unknown error: unsupported operand type(s) for //: 'str' and 'int'

```

---

<div class="post-metadata">

**Author:** ![janos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/janos/32/60_2.png) [@janos](https://community.sonarsource.com/u/janos)\
**Post date:** [September 16, 2020, 5:42pm UTC](https://community.sonarsource.com/t/timeout-parameter-not-able-to-use-in-pipeline-sonarcloud-quality-gate/31093/7 "2020-09-16T17:42:39Z")

</div>

Thank you for reporting this.

I confirm there is a problem, it’s impossible to use the `SONAR_QUALITY_GATE_TIMEOUT` variable at the moment. You have no choice but to omit it, and let the pipe use the default timeout (5 minutes).

I created ticket to track this bug: [https://jira.sonarsource.com/browse/SCCOMM-44](https://jira.sonarsource.com/browse/SCCOMM-44)
