Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / csit / plans / sdnc / setup.sh
index 9178358..7c953a3 100644 (file)
@@ -39,14 +39,19 @@ mkdir ${WORKSPACE}/archives/pnf-simulator
 git clone "https://gerrit.onap.org/r/integration/simulators/pnf-simulator" ${WORKSPACE}/archives/pnf-simulator
 
 # Fix docker-compose to add nexus repo for onap dockers
+PNF_SIM_REGISTRY=nexus3.onap.org:10001
+PNF_SIM_VERSION=1.0.5
 mv ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/docker-compose.yml ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/docker-compose.yml.orig
-cat ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/docker-compose.yml.orig | sed -e "s/image: onap/image: nexus3.onap.org:10001\/onap/" > ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/docker-compose.yml
+cat ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/docker-compose.yml.orig | sed -re "s/image: onap\/org.onap.integration.simulators.(.*$)/image: $PNF_SIM_REGISTRY\/onap\/org.onap.integration.simulators.\1:$PNF_SIM_VERSION/"  > ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/docker-compose.yml
 
 # Remove carriage returns (if any) from netopeer start script
 mv ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh.orig
 cat ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh.orig | sed -e "s/\r$//g" > ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh
 chmod 755 ${WORKSPACE}/archives/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh
 
+# generate fresh certificates for netconfserver [INT-2269]
+
+./generate_certs.sh "${WORKSPACE}"/archives/pnf-simulator/netconfsimulator/tls
 
 # Start Netconf Simulator Container with docker-compose and configuration from docker-compose.yml
 docker-compose -f "${WORKSPACE}"/archives/pnf-simulator/netconfsimulator/docker-compose.yml up -d