# xApp stuff
export DEF_FILE=../definitions/alarm-definition.json
+export PERF_DEF_FILE=../testresources/perf-alarm-definition.json
+export PERF_OBJ_FILE=../testresources/perf-alarm-object.json
GO111MODULE=on GO_ENABLED=0 GOOS=linux
# setup version tag
-if [ -f container-tag.yaml ]
+if [ -f build/container-tag.yaml ]
then
- tag=$(grep "tag:" container-tag.yaml | awk '{print $2}')
+ tag=$(grep "tag:" build/container-tag.yaml | awk '{print $2}')
else
tag="no-tag-found"
fi
ROOT_DIR=$PWD
+
+# compile the CLI
+cd ${ROOT_DIR}/cli && go build -a -installsuffix cgo alarm-cli.go
+
# Build
cd ${ROOT_DIR}/manager && go build -a -installsuffix cgo -ldflags "-X main.Version=$tag -X main.Hash=$hash" -o alarm-manager ./cmd/*.go
# And for the Alarm Manager
cd ${ROOT_DIR}/manager && go test -v -p 1 -coverprofile cover.out ./cmd/ -c -o ./manager_test && ./manager_test
-# Finally compile the CLI
-cd ${ROOT_DIR}/cli && go build -a -installsuffix cgo alarm-cli.go
-
echo "--> build_ubuntu.sh ends"