From 8421dadca27173dda6df59cb71c5ba82d4e86e65 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 18 Aug 2018 16:44:52 -0400 Subject: [PATCH] Refactor staging-profile-id out of mvn-parameters This was originally a bad design decision. We should not be forcing staging-profile-id variable against all users of lf-infra-maven-parameters when only the staging job needs it. This patch moves custom parameter definitions to the maven-stage job and removes staging-profile-id requirement from all other jobs. Change-Id: I58fe4c43c851cd9e61ddec847529b0dcb91e0af1 Signed-off-by: Thanh Ha --- jjb/lf-macros.yaml | 6 ------ jjb/lf-maven-jobs.yaml | 33 ++++++++++++++++++++------------- jjb/lf-python-jobs.yaml | 1 - 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/jjb/lf-macros.yaml b/jjb/lf-macros.yaml index bc1ce586..9db7dc30 100644 --- a/jjb/lf-macros.yaml +++ b/jjb/lf-macros.yaml @@ -310,12 +310,6 @@ # yamllint disable-line rule:line-length default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn' description: 'Maven selector to be used by shell scripts' - - string: - name: STAGING_PROFILE_ID - default: '{staging-profile-id}' - description: | - Nexus staging profile ID. - - parameter: name: lf-infra-openstack-parameters diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 7a574700..0b2a20d7 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -128,8 +128,6 @@ mvn-opts: '{mvn-opts}' mvn-params: '{mvn-params}' mvn-version: '{mvn-version}' - # Staging repos do not make sense for CLM jobs so set it blank. - staging-profile-id: '{staging-profile-id}' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' @@ -169,7 +167,6 @@ mvn-params: '' mvn-version: mvn35 nexus-iq-stage: 'build' - staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -194,8 +191,6 @@ mvn-opts: '{mvn-opts}' mvn-params: '{mvn-params}' mvn-version: '{mvn-version}' - # Staging repos do not make sense for CLM jobs so set it blank. - staging-profile-id: '{staging-profile-id}' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' @@ -320,7 +315,6 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn35 - staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true @@ -441,7 +435,6 @@ mvn-opts: '' mvn-params: '' mvn-version: mvn35 - staging-profile-id: '' # Unused by the javadoc jobs stream: master submodule-recursive: true @@ -556,7 +549,6 @@ mvn-params: '-Dmerge' mvn-version: mvn35 nexus-cut-dirs: 6 # Number of dirs in the Nexus path to remove for wget -r. - staging-profile-id: '' # Unused by this job. stream: master submodule-recursive: true @@ -711,6 +703,26 @@ # Job Configuration # ##################### + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + - lf-infra-maven-parameters: + mvn-opts: '{mvn-opts}' + mvn-params: '{mvn-params}' + mvn-version: '{mvn-version}' + staging-profile-id: '{staging-profile-id}' + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. + - string: + name: STAGING_PROFILE_ID + default: '{staging-profile-id}' + description: Nexus staging profile ID. + builders: - lf-jacoco-nojava-workaround - lf-maven-install: @@ -814,7 +826,6 @@ mvn-params: '' mvn-version: mvn35 sonar-mvn-goal: 'sonar:sonar' - staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -836,8 +847,6 @@ mvn-opts: '{mvn-opts}' mvn-params: '{mvn-params}' mvn-version: '{mvn-version}' - # Staging repos do not make sense for Sonar jobs so set it blank. - staging-profile-id: '' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' @@ -967,7 +976,6 @@ mvn-opts: '' mvn-params: '-Dstream=$STREAM' mvn-version: mvn35 - staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true @@ -1097,7 +1105,6 @@ mvn-opts: '' mvn-params: '-Dstream=$STREAM' mvn-version: mvn35 - staging-profile-id: '' # Unused by this job stream: master submodule-recursive: true diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index 441e5381..a191c094 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -96,7 +96,6 @@ github-url: 'https://github.com' java-version: openjdk8 nexus-iq-cli-version: 1.44.0-01 - staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true -- 2.16.6