Version and build and deploy.
This commit is contained in:
parent
4ba070d513
commit
36c578dc8c
51
.drone.yml
51
.drone.yml
@ -1,6 +1,6 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
name: analyseAndBuild
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
@ -19,4 +19,51 @@ steps:
|
||||
SONAR_HOST_URL:
|
||||
from_secret: sonarScannerHostUrl
|
||||
SONAR_LOGIN:
|
||||
from_secret: sonarScannerLogin
|
||||
from_secret: sonarScannerLogin
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Deploy
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: maven:3-jdk-11
|
||||
commands:
|
||||
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true
|
||||
- name: scpFiles
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host: amine-louveau.fr
|
||||
username: ubuntu
|
||||
key:
|
||||
from_secret: privateKey
|
||||
port: 22
|
||||
target: /home/ubuntu/courses-jar
|
||||
source: target/*
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host: amine-louveau.fr
|
||||
user: ubuntu
|
||||
key:
|
||||
from_secret: privateKey
|
||||
command_timeout: 2m
|
||||
script:
|
||||
- sudo service ldc stop
|
||||
- cd /home/ubuntu/courses-jar
|
||||
- mv target/* ./
|
||||
- sudo chown ubuntu:ubuntu ./*
|
||||
- sudo mv ./liste-de-courses-1.4-SNAPSHOT-jar-with-dependencies.jar /usr/local/bin/ #todo change file to variable
|
||||
- cd /usr/local/bin/
|
||||
- sudo rm ldc.jar
|
||||
- sudo ln -s liste-de-courses-1.4-SNAPSHOT-jar-with-dependencies.jar ldc.jar #todo change file to variable
|
||||
- sudo service ldc start
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- production
|
Loading…
Reference in New Issue
Block a user