image: python:3.5.7

definitions:
  steps:
    - step: &build-step
        name: SonarQube analysis
        script:
          - pipe: sonarsource/sonarqube-scan:1.0.0
            variables:
              SONAR_HOST_URL: ${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
              SONAR_TOKEN: ${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.
  caches:
    sonar: ~/.sonar

clone:
  depth: full

pipelines:
  branches: 
    master: #ftp example
        - step: *build-step
        - step:
            script:
              - apt-get update # required to install zip
              - apt-get -qq install zip git git-ftp # required for packaging up the application
              #- git ftp init -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST
              - git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST
