Support for NETCONF Get command to get xapp configuration in O1 client
[ric-plt/o1.git] / agent / build_o1agent.sh
1 #
2 #     http://www.apache.org/licenses/LICENSE-2.0
3 #
4 #  Unless required by applicable law or agreed to in writing, software
5 #  distributed under the License is distributed on an "AS IS" BASIS,
6 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7 #  See the License for the specific language governing permissions and
8 #  limitations under the License.
9 #
10 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
11 #   platform project (RICP).
12 #
13
14
15 set -e
16 set -x
17
18 # setup version tag
19 if [ -f ../container-tag.yaml ]
20 then
21     tag=$(grep "tag:" ../container-tag.yaml | awk '{print $2}')
22 else
23     tag="-"
24 fi
25
26 hash=$(git rev-parse --short HEAD || true)
27
28 export GOPATH=$HOME/go
29 export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
30 export CFG_FILE=config/config-file.json
31 export RMR_SEED_RT=config/uta_rtg_ut.rt
32 GO111MODULE=on GO_ENABLED=0 GOOS=linux
33
34 # Build o1mediator
35 go build -a -installsuffix cgo -ldflags "-X main.Version=$tag -X main.Hash=$hash" -o o1agent ./cmd/o1agent.go
36
37 # Run o1agent UT
38 go test -v -p 1 -cover -coverprofile=/go/src/ws/agent/coverage.out ./...