be0a451258c3fbd81d01f6b318d03145cee8fe97
[releng/global-jjb.git] / shell / common-variables.sh
1 #!/bin/bash -l
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 echo "---> common-variables.sh"
12 # This file contains a list of variables that are generally useful in many
13 # scripts. It is meant to be sourced in other scripts so that the variables can
14 # be called.
15
16 MAVEN_OPTIONS="$(echo --show-version \
17     --batch-mode \
18     -Djenkins \
19     "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer"\
20 ".Slf4jMavenTransferListener=warn" \
21     -Dmaven.repo.local=/tmp/r \
22     -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)"
23 echo "$MAVEN_OPTIONS"
24
25 # Activates the lftools virtualenv
26 lftools_activate() {
27     echo "WARNING: lftools_activate should no longer be used"\
28         "and will be removed in a future release."
29     virtualenv --quiet "/tmp/v/lftools"
30     set +u  # Ignore unbound variables in activate
31     # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
32     source "/tmp/v/lftools/bin/activate"
33     set -u  # Restore unbound variable checking
34 }