2019-11-24 11:43:36 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
tools {
|
|
|
|
maven 'Default'
|
|
|
|
jdk 'java-11-openjdk-amd64'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Initialize') {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
echo "PATH = ${PATH}"
|
|
|
|
echo "M2_HOME = ${M2_HOME}"
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2019-11-24 12:06:12 +01:00
|
|
|
echo 'Building...'
|
2019-11-24 11:43:36 +01:00
|
|
|
sh '''
|
|
|
|
cd BackEnd
|
|
|
|
mvn clean install -Dmaven.test.skip=true
|
|
|
|
sh '''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Test') {
|
|
|
|
steps {
|
2019-11-24 12:06:12 +01:00
|
|
|
echo 'Testing...'
|
2019-11-24 11:43:36 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Deploy') {
|
|
|
|
steps {
|
2019-11-24 12:06:12 +01:00
|
|
|
echo 'Deploying...'
|
2019-11-24 11:43:36 +01:00
|
|
|
}
|
|
|
|
}
|
2019-11-24 12:08:41 +01:00
|
|
|
stage('Front-end') {
|
|
|
|
agent {
|
2019-11-24 13:18:54 +01:00
|
|
|
dockerfile true
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
HOME = '.'
|
2019-11-24 12:08:41 +01:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
echo 'Building FrontEnd...'
|
|
|
|
sh '''
|
2019-11-24 12:45:42 +01:00
|
|
|
[ ! -d "Punktonerzy" ] && git clone https://git.wmi.amu.edu.pl/s416178/Punktonerzy.git
|
2019-11-24 12:22:33 +01:00
|
|
|
cd Punktonerzy
|
2019-11-24 12:37:29 +01:00
|
|
|
git pull
|
2019-11-24 12:08:41 +01:00
|
|
|
cd FrontEnd
|
|
|
|
npm install
|
2019-11-24 13:21:00 +01:00
|
|
|
npm run ng build --prod
|
2019-11-24 12:08:41 +01:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-11-24 11:43:36 +01:00
|
|
|
}
|
|
|
|
}
|