From f82920efe274026d73359e364e4a0d8f6ec4777c Mon Sep 17 00:00:00 2001 From: aminecmi Date: Wed, 14 Sep 2022 11:58:38 +0200 Subject: [PATCH] Should be ok. --- .drone.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 66664ca..3de36e6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,10 +3,22 @@ type: docker name: test steps: - - name: createTag - image: ubuntu:latest + - name: code-analysis + image: mingc/android-build-box:latest + failure: ignore commands: - - echo "toto" + - ls -la + - ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" + environment: + SONAR_HOST_URL: + from_secret: sonarScannerHostUrl + SONAR_LOGIN: + from_secret: sonarScannerLogin + + - name: build + image: mingc/android-build-box:latest + commands: + - ./gradlew :androidApp:build -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false trigger: event: - push @@ -42,6 +54,20 @@ steps: target: /home/ubuntu/ source: version.txt + - name: deploy + image: appleboy/drone-ssh + settings: + host: amine-louveau.fr + user: ubuntu + key: + from_secret: privateKey + command_timeout: 2m + script: + - cd /home/ubuntu + - sudo rm -rf /var/www/amine/version.txt + - sudo chown www-data:www-data ./version.txt + - sudo mv version.txt /var/www/amine/ + trigger: event: - promote