2022-07-19 19:57:14 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
steps:
|
2022-07-22 18:45:41 +00:00
|
|
|
- name: code-analysis
|
|
|
|
image: sonarsource/sonar-scanner-cli
|
2022-07-22 19:46:00 +00:00
|
|
|
detach: true
|
|
|
|
failure: ignore
|
2022-07-22 18:45:41 +00:00
|
|
|
commands:
|
|
|
|
- ls -la
|
|
|
|
- sonar-scanner -Dsonar.projectKey=LDC-WWW -Dsonar.sources=. -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN
|
2022-07-22 19:46:00 +00:00
|
|
|
environment:
|
|
|
|
SONAR_HOST_URL:
|
|
|
|
from_secret: sonarScannerHostUrl
|
|
|
|
SONAR_LOGIN:
|
|
|
|
from_secret: sonarScannerLogin
|
2022-07-22 18:45:41 +00:00
|
|
|
|
2022-07-20 06:54:22 +00:00
|
|
|
|
2022-07-19 19:57:14 +00:00
|
|
|
- name: build
|
|
|
|
image: node:14
|
|
|
|
commands:
|
|
|
|
- npm install
|
|
|
|
- echo $VUE_APP_API_BASE_URL
|
|
|
|
- npm run lint
|
|
|
|
- npm run build:prod
|
|
|
|
environment:
|
|
|
|
VUE_APP_API_BASE_URL:
|
|
|
|
from_secret: baseurl
|
|
|
|
|
|
|
|
- name: scp files
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host: amine-louveau.fr
|
|
|
|
username: ubuntu
|
|
|
|
key:
|
|
|
|
from_secret: privateKey
|
|
|
|
port: 22
|
|
|
|
target: /home/ubuntu/courses
|
|
|
|
source: dist/*
|
2022-07-19 19:59:26 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|