RUN go mod download
RUN go mod tidy
-RUN cp go.mod go.sum /manifests/
-
#
#
#
RUN go mod tidy
+RUN cp go.mod go.sum /manifests/
+RUN grep gerrit /manifests/go.sum > /manifests/go_gerrit.sum
+
+
# unittest
COPY test/config-file.json test/config-file.json
ENV CFG_FILE=/opt/submgr/test/config-file.json
ENV RMR_SEED_RT=/opt/submgr/test/uta_rtg.rt
RUN go test -test.coverprofile /tmp/submgr_cover.out -count=1 -v ./pkg/control
-
-#-c -o submgr_test
-#RUN ./submgr_test -test.coverprofile /tmp/submgr_cover.out
-
RUN go tool cover -html=/tmp/submgr_cover.out -o /tmp/submgr_cover.html
# test formating (not important)
# By default this file is in the docker build directory,
# but the location can configured in the JJB template.
---
-tag: "0.4.0"
+tag: "0.4.0-1"
+++ /dev/null
-#
-#==================================================================================
-# Copyright (c) 2019 AT&T Intellectual Property.
-# Copyright (c) 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#==================================================================================
-#
-#
-# Abstract: Creates a dedicated namespace for Subscription Manager deployment and related stuff
-# Date: 28 May 2019
-#
-apiVersion: v1
-kind: Namespace
-metadata:
- name: example
-
+++ /dev/null
-#
-#==================================================================================
-# Copyright (c) 2019 AT&T Intellectual Property.
-# Copyright (c) 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#==================================================================================
-#
-#
-# Abstract: Configuration values for the Subscription Manager
-# Date: 4 Oct 2019
-#
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: submgrcfg
- namespace: ricplt
-data:
- # FQDN and port info of rtmgr
- submgrcfg: |
- "local":
- "host": ":8080"
- "logger":
- "level": 3
- "rmr":
- "protPort": "tcp:4560"
- "maxSize": 2072
- "numWorkers": 1
- "rtmgr":
- "hostAddr": "rtmgr"
- "port" : 8888
- "baseUrl" : "/ric/v1"
-
+++ /dev/null
-#
-#==================================================================================
-# Copyright (c) 2019 AT&T Intellectual Property.
-# Copyright (c) 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#==================================================================================
-#
-#
-# Abstract: Subscription Manager Kubernetes manifest
-# Date: 28 May 2019
-#
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: submgr
- namespace: ricplt
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: submgr
- template:
- metadata:
- labels:
- app: submgr
- spec:
- containers:
- - name: submgr
- image: jenkins:5000/submgr:test
- command: ["/run_submgr.sh"]
- env:
- - name: DBAAS_SERVICE_HOST
- value: service-ricplt-dbaas-tcp
- - name: SUBMGR_SEED_SN
- value: "1"
- - name: CFGFILE
- value: /cfg/submgr-config.yaml
- ports:
- - containerPort: 8080
- - containerPort: 4560
- - containerPort: 4561
- volumeMounts:
- - mountPath: /cfg
- name: submgrcfg
- readOnly: true
- volumes:
- - name: submgrcfg
- configMap:
- name: submgrcfg
- items:
- - key: submgrcfg
- path: submgr-config.yaml
- mode: 0644
+++ /dev/null
-#
-#==================================================================================
-# Copyright (c) 2019 AT&T Intellectual Property.
-# Copyright (c) 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#==================================================================================
-#
-#
-# Abstract: Subscription Manager service manifest
-# Date: 28 May 2019
-#
-kind: Service
-apiVersion: v1
-metadata:
- name: submgr
- namespace: example
-spec:
- selector:
- app: submgr
- clusterIP: None
- ports:
- - name: nbi
- port: 8080
- protocol: TCP
- - name: sbi-data
- port: 4560
- protocol: TCP
- - name: sbi-control
- port: 4561
- protocol: TCP
-