From 11a87347c44d8b9b89fbca444cd4673bc9c7a698 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Wed, 7 Feb 2018 13:55:39 +1000 Subject: [PATCH] Use deploy:deploy instead of nexus-staging-maven-plugin:deploy --- jenkins/maven-Jenkinsfile | 19 +++++++++++-------- zanata-maven-release | 8 ++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/jenkins/maven-Jenkinsfile b/jenkins/maven-Jenkinsfile index dd488dd..b959ba8 100644 --- a/jenkins/maven-Jenkinsfile +++ b/jenkins/maven-Jenkinsfile @@ -201,15 +201,18 @@ timestamps { script: "bash $WORKSPACE/zanata-pom-set-version ${artifactId}- $releaseVersion $PLATFORM_MAVEN_VERSION_PROJECT", ) } - stage('Nexus') { - sh "bash $WORKSPACE/zanata-nexus $PLATFORM_MAVEN_NEXUS_RELEASE_PROJECTS" - } - //stage('NexusStaging') { - // sh "bash $WORKSPACE/zanata-nexus-staging $PLATFORM_MAVEN_NEXUS_RELEASE_PROJECTS" - //} - //stage('NexusRelease') { - // sh "bash $WORKSPACE/zanata-nexus-release" + // We cannot use org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy here + // It generate following error + // [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (default-cli) on project build-tools: The packaging for this project did not assign a file to the build artifact + //stage('Nexus') { + // sh "bash $WORKSPACE/zanata-nexus $PLATFORM_MAVEN_NEXUS_RELEASE_PROJECTS" //} + stage('NexusStaging') { + sh "bash $WORKSPACE/zanata-nexus-staging $PLATFORM_MAVEN_NEXUS_RELEASE_PROJECTS" + } + stage('NexusRelease') { + sh "bash $WORKSPACE/zanata-nexus-release" + } stage('SetSnapshotVersion') { sh(returnStatus: true, script: "bash $WORKSPACE/zanata-pom-set-version ${artifactId}- $developmentVersion $PLATFORM_MAVEN_VERSION_PROJECT", diff --git a/zanata-maven-release b/zanata-maven-release index f219fdc..122872d 100755 --- a/zanata-maven-release +++ b/zanata-maven-release @@ -281,12 +281,12 @@ $ScriptDir/zanata-pom-set-version "$TagPrefix" "$ReleaseVersion" "$MavenVersionP ## Deploy to Nexus Staging print_status " deploy to nexus staging" -$ScriptDir/zanata-nexus "$NexusReleaseProjects" -#$ScriptDir/zanata-nexus-staging "$NexusReleaseProjects" +#$ScriptDir/zanata-nexus "$NexusReleaseProjects" +$ScriptDir/zanata-nexus-staging "$NexusReleaseProjects" ## Release artifact in nexus staging -#print_status " Release artifact in nexus staging" -#$ScriptDir/zanata-nexus-release "$NexusReleaseProjects" +print_status " Release artifact in nexus staging" +$ScriptDir/zanata-nexus-release "$NexusReleaseProjects" ## Set to development version print_status " Set to development version to $DevelopmentVersion"