mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
Merge branch 'gitlab-ci' into 'dev'
Gitlab ci See merge request chameleon-vision/Chameleon-Vision!29
This commit is contained in:
50
.gitlab-ci.yml
Normal file
50
.gitlab-ci.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
stages:
|
||||
- build_ui
|
||||
- build_jar
|
||||
- deploy
|
||||
|
||||
build_ui:
|
||||
stage: build_ui
|
||||
image: node:latest
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
script:
|
||||
- cd chameleon-client
|
||||
- npm install
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- chameleon-client/dist
|
||||
|
||||
build_jar:
|
||||
stage: build_jar
|
||||
image: maven:3.6.2-jdk-12
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
script:
|
||||
- rm -r Main/src/main/resources/web/*
|
||||
- mv chameleon-client/dist/* Main/src/main/resources/web
|
||||
- cd Main
|
||||
- mvn package
|
||||
artifacts:
|
||||
paths:
|
||||
- Main/target
|
||||
deploy:
|
||||
stage: deploy
|
||||
image: ubuntu:latest
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
before_script:
|
||||
- apt-get update
|
||||
- apt-get --yes install git ssh rsync
|
||||
- git submodule update --init --recursive
|
||||
script:
|
||||
- mkdir "${HOME}/.ssh"
|
||||
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
|
||||
- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_rsa"
|
||||
- chmod 700 "${HOME}/.ssh/id_rsa"
|
||||
- cd Main/target
|
||||
- rsync -e "ssh -o StrictHostKeyChecking=no" $(find . -name "chameleon-vision-*") "${SSH_HOST_ADRESS}"
|
||||
Reference in New Issue
Block a user