blob: 474911ddd9d67b84db78ec595be13edbf176076c [file] [log] [blame]
Bengt Thuree8957be52019-10-30 17:12:26 +11001#!/bin/bash
2
3# SPDX-License-Identifier: EPL-1.0
4##############################################################################
5# Copyright (c) 2019 The Linux Foundation and others.
6#
7# All rights reserved. This program and the accompanying materials
8# are made available under the terms of the Eclipse Public License v1.0
9# which accompanies this distribution, and is available at
10# http://www.eclipse.org/legal/epl-v10.html
11##############################################################################
12
13echo "---> run_releasedockerhub.sh"
14# Ensure we fail the job if any steps fail
15# Disable 'globbing'
16set -euf -o pipefail
17
18# shellcheck disable=SC1090
19source ~/lf-env.sh
20
Anil Belur3ff4a2b2020-03-03 19:32:24 +100021lf-activate-venv zipp==1.1.0 lftools
Bengt Thuree8957be52019-10-30 17:12:26 +110022
23if [ ! -v RELEASEDOCKERHUB_ORG ]
24then
25 echo "RELEASEDOCKERHUB_ORG is not defined. For onap set it to 'onap'"
26 exit 1
27fi
28
29cmd_str="--org $RELEASEDOCKERHUB_ORG"
30if [ -v RELEASEDOCKERHUB_SUMMARY ]
31then
32 cmd_str+=" --summary"
33fi
34if [ -v RELEASEDOCKERHUB_VERBOSE ]
35then
36 cmd_str+=" --verbose"
37fi
38if [ -v RELEASEDOCKERHUB_REPO ]
39then
40 cmd_str+=" --repo $RELEASEDOCKERHUB_REPO"
41fi
42if [ -v RELEASEDOCKERHUB_EXACT ]
43then
44 cmd_str+=" --exact"
45fi
46
47
48if [ -v RELEASEDOCKERHUB_COPY ]
49then
50 cmd_str+=" --copy"
51fi
52
53echo "cmd_str = >>$cmd_str<<"
54
55# Run the releasedockerhub command in lftools
56lftools nexus docker releasedockerhub $cmd_str