Merge "Update cloud image Ubuntu18.04 mininet ovs"
[releng/builder.git] / jjb / opendaylight-infra-deploy-maven-site.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11
12 # Ensure we fail the job if any steps fail.
13 set -eu -o pipefail
14
15 # shellcheck disable=SC1090
16 . ~/lf-env.sh
17
18 lf-activate-venv --python python3 lftools
19
20 MAVEN_GROUP_ID=$(xmlstarlet sel \
21       -N "x=http://maven.apache.org/POM/4.0.0" \
22       -t \
23       --if "/x:project/x:groupId" \
24       -v "/x:project/x:groupId" \
25       --elif "/x:project/x:parent/x:groupId" \
26       -v "/x:project/x:parent/x:groupId" \
27       --else -o "" \
28       pom.xml 2>/dev/null)
29
30 cd "$WORKSPACE/target"
31 mv staged-site "$STREAM"
32 zip -r maven-site.zip "$STREAM"
33 lftools deploy nexus-zip "$NEXUS_URL" site "$MAVEN_GROUP_ID" maven-site.zip