-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·56 lines (51 loc) · 1.2 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# Copyright (c) 2020-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
#include common scripts
. ./common.sh
usage="$(basename "$0") -- script for compile Go source and build docker images
usage:
-t,--tag tag name for docker images (default: next)
-o,--organization organization name for docker images (default: eclipse)
-r,--repository docker registry (default quay.io)
-h,--help show this help text"
#default
ORGANIZATION="eclipse"
TAG="next"
REPOSITORY="quay.io"
while [[ $# -gt 0 ]]
do
key="${1}"
case $key in
-t|--tag)
TAG="${2}"
shift
shift
;;
-o|--organization)
ORGANIZATION="${2}"
shift
shift
;;
-r|--repository)
REPOSITORY="${2}"
shift
shift
;;
-h|--help)
echo "$usage"
exit 0
;;
*) printf "illegal option: -%s\n" "$key"
echo "$usage"
exit 1
;;
esac
done
dockerBuild "${TAG}" "${ORGANIZATION}";