title: How to use if-else condition on gitlabci
body: <p>How to use if else condition inside the gitlab-CI.</p>
  
  <p>I have below code:</p>
  
  <pre><code>deploy-dev:
    image: testimage
    environment: dev
    tags:
      - kubectl
    script:
     - kubectl apply -f demo1 --record=true
     - kubectl apply -f demo2 --record=true
  </code></pre>
  
  <p>Now I want to add a condition something like this</p>
  
  <pre><code>script:
      - (if [ "$flag" == "true" ]; then kubectl apply -f demo1 --record=true; else kubectl apply -f demo2 --record=true);
  </code></pre>
  
  <p>Could someone provide the correct syntax for the same? Is there any documentation for the conditions (if-else, for loop) in gitlabci?</p>