Version and build and deploy.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
aminecmi 2022-08-12 22:37:32 +02:00
parent 4ba070d513
commit 36c578dc8c
2 changed files with 50 additions and 3 deletions

View File

@ -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

View File

@ -6,7 +6,7 @@
<artifactId>liste-de-courses</artifactId>
<groupId>fr.louveau-amine</groupId>
<version>1.3-SNAPSHOT</version>
<version>1.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>liste-de-courses</name>