-
m431m authored
Co-authored-by:
Florent <florent@Air-de-neogeo.neogeo.local>
m431m authoredCo-authored-by:
Florent <florent@Air-de-neogeo.neogeo.local>
.gitlab-ci.yml 1.88 KiB
variables:
SONAR_TOKEN: "$SONAR_TOKEN"
SONAR_PROJECTKEY: "$CI_PROJECT_NAME"
SONAR_HOST_URL: "https://sonarqube.neogeo.fr"
GIT_DEPTH: 0
cache:
paths:
- node_modules/
stages:
- sonarqube
- build
- deploy
sonarqube-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
stage: sonarqube
script:
- sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=$CI_PROJECT_NAME -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.projectVersion=$CI_COMMIT_BRANCH
allow_failure: true
only:
- develop
- master
- draft
build_development:
stage: build
tags:
- build
image: node:14.16.0
script:
- npm install --unsafe-perm
- echo -e "
NODE_ENV=development\n
VUE_APP_LOCALE=fr-FR\n
DOMAIN=https://dev.pigma.neogeo.fr/fr\n
VUE_APP_DOMAIN=https://dev.pigma.neogeo.fr/\n
BASE_PATH=/\n
VUE_APP_NEXT_DEFAULT=/\n
VUE_APP_BASE_PATH=${BASE_PATH}\n
VUE_APP_LOGO=@/assets/logo.png\n
VUE_APP_TITLE=Login - Pigma\n
VUE_APP_CLIENT_NAME=PIGMA\n
VUE_APP_CLIENT_CONTACT_MAIL=pigma@gipatgeri.fr\n
VUE_APP_FAVICON_URL=${VUE_APP_DOMAIN}/assets/favicon.png\n
VUE_APP_LOGIN_API_PATH=/fr/login/\n
VUE_APP_ORGANISATION_API_PATH=/fr/organisation/\n
VUE_APP_USERGROUP_API_PATH=/fr/usergroup/\n" > .env
- npm run build
artifacts:
paths:
- dist
expire_in: 1 week
deploy-pigma-dev:
image: alpine
tags:
- deploy-dev
stage: deploy
when: manual
script:
- apk add --no-cache rsync openssh
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_dsa
- chmod 600 ~/.ssh/id_dsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- ls -lrth