-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.sh
executable file
·51 lines (51 loc) · 1.76 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
#!/usr/bin/env bash
############################################################################
#
# AVI CONFIDENTIAL
# __________________
#
# [2013] - [2018] Avi Networks Incorporated
# All Rights Reserved.
#
# NOTICE: All information contained herein is, and remains the property
# of Avi Networks Incorporated and its suppliers, if any. The intellectual
# and technical concepts contained herein are proprietary to Avi Networks
# Incorporated, and its suppliers and are covered by U.S. and Foreign
# Patents, patents in process, and are protected by trade secret or
# copyright law, and other laws. Dissemination of this information or
# reproduction of this material is strictly forbidden unless prior written
# permission is obtained from Avi Networks Incorporated.
###
{
AVI_VERSION=22.1.4
GOLANG_VERSION=1.20.6
AKO_BRANCH=master
while getopts "v:hg:a:" OPTION
do
case $OPTION in
v)
AVI_VERSION="$OPTARG"
;;
g)
GOLANG_VERSION="$OPTARG"
;;
a)
AKO_BRANCH="$OPTARG"
;;
h)
echo "-v string specify AVI_VERSION, default value: $AVI_VERSION"
echo "-g string specify Golang version, default value: $GOLANG_VERSION"
echo "-a string specify AKO branch name, default value: $AKO_BRANCH"
exit 0
;;
esac
done
if [ $AVI_VERSION == "30.2.1" ]
then
BRANCH="eng"
else
BRANCH=$AVI_VERSION
fi
cd $(git rev-parse --show-toplevel)
docker build -t avinetworks/avitools:$AVI_VERSION --build-arg branch=$BRANCH --build-arg golang_version=$GOLANG_VERSION --build-arg ako_branch=$AKO_BRANCH -f Dockerfile .
}