Jenkinsfile 646 B

123456789101112131415161718192021
  1. pipeline {
  2. agent any
  3. stages {
  4. stage('拉取代码') {
  5. steps {
  6. checkout([$class: 'GitSCM', branches: [[name: '*/develop']], extensions: [], userRemoteConfigs: [[credentialsId: '9173ff70-448a-4fc2-a7b3-0105a8c615a7', url: 'git@10.170.11.57:mkcloud/back-end.git']]])
  7. }
  8. }
  9. stage('编译代码') {
  10. steps {
  11. sh 'mvn clean package -Dmaven.repo.local=/home/chenrj/mvnrep'
  12. }
  13. }
  14. stage('部署代码') {
  15. steps {
  16. sh '/var/lib/jenkins/workspace/mkcloud-back-end/deploy.sh'
  17. }
  18. }
  19. }
  20. }