diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b3156879 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +ui/**/dist \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index e69de29b..3baff653 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +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 { + withMaven(globalMavenSettingsConfig: 'bab2e7fd-587c-4284-9bd8-6b97dfeb2fab', jdk: 'jdk17', maven: 'maven396') { + dir("$WORKSPACE/das") { + sh 'mkdir -p "$WORKSPACE/das/src/main/resources/static"' + sh 'rsync -av --delete "$WORKSPACE/ui/dasadmin/dist/" "$WORKSPACE/das/src/main/resources/static"' + sh 'mvn -DskipTests -am clean package' + } + } + } + } + } +} \ No newline at end of file