Merge "Add CSIT job for DIDM discovery tests."
[releng/builder.git] / jjb / autorelease / include-raw-autorelease-maven-deploy.sh
1 #!/bin/bash
2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2015 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 mkdir -p hide/from/pom/files
13 cd hide/from/pom/files
14 mkdir -p m2repo/org/opendaylight/
15
16 (IFS='
17 '
18 for m in `xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' ../../../../pom.xml`; do
19     rsync -avz --exclude 'maven-metadata-local.xml' \
20                --exclude 'maven-metadata-*' \
21                --exclude '_remote.repositories' \
22                --exclude 'resolver-status.properties' \
23                "/tmp/r/org/opendaylight/$m" m2repo/org/opendaylight/
24 done)
25
26 # Add exception for integration project since they release under the
27 # integration top-level project.
28 rsync -avz --exclude 'maven-metadata-local.xml' \
29            --exclude 'maven-metadata-*' \
30            --exclude '_remote.repositories' \
31            --exclude 'resolver-status.properties' \
32            "/tmp/r/org/opendaylight/integration" m2repo/org/opendaylight/
33
34 mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \
35     -DrepositoryDirectory="`pwd`/m2repo" \
36     -DnexusUrl=http://nexus.opendaylight.org/ \
37     -DstagingProfileId="425e43800fea70" \
38     -DserverId="opendaylight.staging" \
39     -s $AUTORELEASE_SETTINGS \
40     -gs $ODL_GLOBAL_SETTINGS | tee $WORKSPACE/deploy-staged-repository.log