---
stages:
  - sonarqube
  - upload_linux_artifact
sonarqube:
  image: sonarsource/sonar-scanner-cli:${SONAR_SCANNER_CLI_VERSION}
  stage: sonarqube
  variables:
    SONAR_PROJECT_BASE_DIR: "$CI_PROJECT_DIR"
  script:
    - /usr/bin/entrypoint.sh sonar-scanner -Dsonar.projectKey="$CI_PROJECT_NAME"
  tags:
    - sonarqube
upload_linux_artifact:
  script: ./build.sh --os=linux --arch=amd64 --upx
  artifacts:
    paths:
      - /home/maxadamo/go/bin/acme-downloader
upload_windows_artifact:
  script: ./build.sh --os=windows --arch=amd64 --upx
  artifacts:
    paths:
      - /home/maxadamo/go/bin/windows_amd64/acme-downloader.exe
upload_shell_script:
  artifacts:
    paths:
      - acme-downloader.sh

