Browse Source

更新 Jenkinsfile

release_toaliyun_real
温秋荣 6 years ago
parent
commit
6e004d7fac
1 changed files with 2 additions and 9 deletions
  1. +2
    -9
      Jenkinsfile

+ 2
- 9
Jenkinsfile View File

@@ -4,7 +4,7 @@ pipeline {
stage('检出') { stage('检出') {
steps { steps {
checkout([$class: 'GitSCM', branches: [[name: env.GIT_BUILD_REF]], checkout([$class: 'GitSCM', branches: [[name: env.GIT_BUILD_REF]],
userRemoteConfigs: [[url: env.GIT_REPO_URL, credentialsId: env.CREDENTIALS_ID]]])
userRemoteConfigs: [[url: env.GIT_REPO_URL, credentialsId: env.CREDENTIALS_ID]]])
} }
} }
stage('构建') { stage('构建') {
@@ -13,14 +13,7 @@ pipeline {
echo '构建中...' echo '构建中...'
sh 'mvn clean install -Dmaven.test.skip=true' sh 'mvn clean install -Dmaven.test.skip=true'
echo '构建完成.' echo '构建完成.'
script {
def exists = fileExists 'README.md'
if (!exists) {
writeFile(file: 'README.md', text: 'Helloworld')
}
}

archiveArtifacts(artifacts: 'README.md', fingerprint: true)
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true // 收集构建产物
} }
} }
stage('测试') { stage('测试') {


Loading…
Cancel
Save