map/Jenkinsfile

32 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-06-19 16:38:12 +08:00
pipeline {
agent any
stages {
stage('拉取源码') {
steps {
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: 'd62224c5-69cf-474a-8845-c2c2bbe1fc00', url: 'https://git.jsspisoft.com/ry-das.git']])
}
}
stage('编译UI') {
steps {
nodejs(cacheLocationStrategy: workspace(), configId: '8e356590-2fee-4f1f-b0e9-5cea43299887', nodeJSInstallationName: 'nodejs202122') {
dir("$WORKSPACE/ui/dasadmin") {
sh "npm install"
sh "npm run build"
}
}
}
}
stage('编译后端') {
steps {
2024-06-19 16:59:09 +08:00
withMaven(globalMavenSettingsConfig: 'bab2e7fd-587c-4284-9bd8-6b97dfeb2fab', jdk: 'jdk17', maven: 'maven396') {
2024-06-19 16:48:57 +08:00
dir("$WORKSPACE/das") {
2024-06-19 17:26:45 +08:00
sh 'mkdir -p "$WORKSPACE/das/src/main/resources/static"'
sh 'rm -rf "$WORKSPACE/das/src/main/resources/static/*"'
sh 'cp -a "$WORKSPACE/ui/dasadmin/dist/*" "$WORKSPACE/das/src/main/resources/static/"'
sh 'mvn -DskipTests -am clean package'
2024-06-19 16:38:12 +08:00
}
}
}
}
}
}