--- /dev/null
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+# Ensure we fail the job if any steps fail.
+set -eu -o pipefail
+
+MAVEN_GROUP_ID=$(xmlstarlet sel \
+ -N "x=http://maven.apache.org/POM/4.0.0" \
+ -t \
+ --if "/x:project/x:groupId" \
+ -v "/x:project/x:groupId" \
+ --elif "/x:project/x:parent/x:groupId" \
+ -v "/x:project/x:parent/x:groupId" \
+ --else -o "" \
+ pom.xml 2>/dev/null)
+
+cd "$WORKSPACE/target"
+mv staged-site "$STREAM"
+zip -r maven-site.zip "$STREAM"
+lftools deploy nexus-zip "$NEXUS_URL" site "$MAVEN_GROUP_ID" maven-site.zip
healthy: 50
unhealthy: 40
+- builder:
+ # Deploys a maven site to Nexus using lftools nexus-zip command
+ name: opendaylight-infra-deploy-maven-site
+ builders:
+ - lf-provide-maven-settings:
+ global-settings-file: global-settings
+ settings-file: '{settings-file}'
+ - lf-infra-create-netrc:
+ server-id: opendaylight-site
+ - shell: !include-raw-escape:
+ - global-jjb/shell/lftools-install.sh
+ - opendaylight-infra-deploy-maven-site.sh
+ - lf-provide-maven-settings-cleanup
+
- builder:
name: opendaylight-infra-stack
# opendaylight-infra-stack.sh has a required variable {stack-template} that
branch: '{branch}'
refspec: 'refs/heads/{branch}'
artifacts: '{archive-artifacts}'
+ - string:
+ name: STREAM
+ default: '{stream}'
+ description: "String representing release name"
scm:
- gerrit-trigger-scm:
settings-type: cfp
global-settings: 'global-settings'
global-settings-type: cfp
- - maven-target:
- maven-version: 'mvn33'
- pom: deploy-site.xml
- goals: 'site:deploy -V -B -Dstream={stream}'
- java-opts:
- - '-Xmx2g'
- settings: '{mvn-settings}'
- settings-type: cfp
- global-settings: 'global-settings'
- global-settings-type: cfp
+ - opendaylight-infra-deploy-maven-site:
+ settings-file: '{mvn-settings}'
reporters:
- findbugs