This commit is contained in:
parent
d1d0bbf4a3
commit
f82920efe2
32
.drone.yml
32
.drone.yml
@ -3,10 +3,22 @@ type: docker
|
|||||||
name: test
|
name: test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: createTag
|
- name: code-analysis
|
||||||
image: ubuntu:latest
|
image: mingc/android-build-box:latest
|
||||||
|
failure: ignore
|
||||||
commands:
|
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:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@ -42,6 +54,20 @@ steps:
|
|||||||
target: /home/ubuntu/
|
target: /home/ubuntu/
|
||||||
source: version.txt
|
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:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- promote
|
- promote
|
||||||
|
Loading…
Reference in New Issue
Block a user