Fix OS_CLOUD export for image validation
[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.Slf4jMavenTransferListener=warn \
20     -Dmaven.repo.local=/tmp/r \
21     -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)"
22 echo "$MAVEN_OPTIONS"
23
24 # Activates the lftools virtualenv
25 lftools_activate() {
26     virtualenv --quiet "/tmp/v/lftools"
27     set +u  # Ignore unbound variables in activate
28     # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
29     source "/tmp/v/lftools/bin/activate"
30     set -u  # Restore unbound variable checking
31 }