:java-version: Version of Java to set as the default Java.
Eg. openjdk8
+lf-infra-sonatype-clm
+---------------------
+
+Runs a Sonatype CLM scan against a Maven project and pushes results to
+Nexus IQ server.
+
+:Optional parameters:
+ :mvn-goals: The maven goals to perform for the build.
+ (default: clean install)
+
Job Templates
=============
:java-version: Version of Java to use for the build. (default: openjdk8)
:mvn-global-settings: The name of the Maven global settings to use for
Maven configuration. (default: global-settings)
+ :mvn-goals: The maven goals to perform for the build.
+ (default: clean install)
:mvn-opts: Sets MAVEN_OPTS. (default: '')
:mvn-params: Additional mvn parameters to pass to the cli. (default: '')
:mvn-version: Version of maven to use. (default: mvn35)
github-url: "https://github.com"
java-version: openjdk8
mvn-global-settings: global-settings
+ mvn-goals: clean install
mvn-opts: ""
mvn-params: ""
mvn-version: mvn35
- lf-provide-maven-settings:
global-settings-file: "{mvn-global-settings}"
settings-file: "{mvn-settings}"
- - shell: !include-raw-escape:
- - ../shell/common-variables.sh
- - ../shell/sonatype-clm.sh
+ - lf-infra-sonatype-clm:
+ mvn-goals: "{mvn-goals}"
- lf-provide-maven-settings-cleanup
- shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
- nexus-iq-policy-evaluator:
scan-patterns: "{obj:nexus_iq_scan_patterns}"
fail-build-network-error: true
+- builder:
+ name: lf-infra-sonatype-clm
+ # Run a CLM scan build with Maven
+ builders:
+ - inject:
+ properties-content: |
+ MAVEN_GOALS={mvn-goals}
+ - shell: !include-raw-escape:
+ - ../shell/common-variables.sh
+ - ../shell/sonatype-clm.sh
+
- job-template:
name: "{project-name}-maven-clm-{stream}"
id: gerrit-maven-clm
--- /dev/null
+---
+fixes:
+ - |
+ Allow maven goals to be configured in sonatype-clm.sh.
+ Set to "clean install" by default.
--- /dev/null
+---
+fixes:
+ - |
+ Download raw version of release-schema.yaml to compare against
+ release files using lftools.
--- /dev/null
+---
+upgrade:
+ - |
+ Projects using lf-release-jobs need to make sure they have the global
+ variable NEXUSPROXY added in Jenkins production and Jenkins sandbox
+ servers. The value of this variable should be the URL to the project's
+ Nexus server. Previous commit 118b7cbf171aca498d1a0a3a485bad990ad2e7b6
+ missed this variable.
+fixes:
+ - |
+ Avoid the usage of project specific variables. Do not use ODLNEXUSPROXY
+ var, but instead use a generalized variable.
NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
# Fetch the release-schema.yaml
-wget -q https://github.com/lfit/releng-global-jjb/blob/master/schema/release-schema.yaml
+wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/release-schema.yaml
release_files=$(git diff HEAD^1 --name-only -- "releases/")
echo "RELEASE FILES ARE AS FOLLOWS: $release_files"
echo "LOGS_SERVER: $LOGS_SERVER"
echo "NEXUS_URL: $NEXUS_URL"
echo "NEXUS_PATH: $NEXUS_PATH"
- echo "ODLNEXUSPROXY: $ODLNEXUSPROXY"
+ echo "NEXUSPROXY: $NEXUSPROXY"
echo "JENKINS_HOSTNAME: $JENKINS_HOSTNAME"
echo "SILO: $SILO"
echo "PROJECT: $PROJECT"
# Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters.
# shellcheck disable=SC2086
-$MVN clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index \
+$MVN $MAVEN_GOALS dependency:tree com.sonatype.clm:clm-maven-plugin:index \
--global-settings "$GLOBAL_SETTINGS_FILE" \
--settings "$SETTINGS_FILE" \
-DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo \