drone-sigh #57
32
.drone.yml
32
.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
|
||||
|
Loading…
Reference in New Issue
Block a user