Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
SaikrishnaBairamoni committed Dec 20, 2021
2 parents b8b207a + e68bfa5 commit c38f9ea
Show file tree
Hide file tree
Showing 96 changed files with 10,267 additions and 231 deletions.
51 changes: 51 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,49 @@ jobs:
command: |
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/v2xhubarm:latest
port_drayage_webservice_build_develop :
docker:
- image: cimg/openjdk:11.0.12
# Set working directory
working_directory: "/home/V2X-Hub"
steps:
- setup_remote_docker
- checkout
- run:
name: Maven Build JAR
# Build Port Drayage Web Service
command: |
cd tools/port-drayage-webservice/
mvn clean install
- run:
name: Build Docker Image and Push
# Build and push Port Drayage Web Service Docker images
command: |
cd tools/port-drayage-webservice/
docker build -t usdotfhwaops/port-drayage-webservice:latest .
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/port-drayage-webservice:latest
port_drayage_webservice_build :
docker:
- image: cimg/openjdk:11.0.12
# Set working directory
steps:
- setup_remote_docker
- checkout
- run:
name: Maven Build JAR
# Build Port Drayage Web Service
command: |
cd tools/port-drayage-webservice/
mvn clean install
- run:
name: Build Docker Image and Push
# Build and push Port Drayage Web Service Docker images
command: |
cd tools/port-drayage-webservice/
docker build -t usdotfhwaops/port-drayage-webservice:${CIRCLE_BRANCH,,} .
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/port-drayage-webservice:${CIRCLE_BRANCH,,}
workflows:
version: 2
build:
Expand All @@ -215,5 +258,13 @@ workflows:
- sonar-scanner_develop:
requires:
- docker_build_push_develop
- port_drayage_webservice_build_develop:
filters:
branches:
only: develop
- port_drayage_webservice_build:
filters:
branches:
ignore: develop


6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ Thumbs.db

#docker-compose variables
.env

#Maven build directory
tools/port-drayage-webservice/target/

#Java PKS for HTTPS setup
tools/port-drayage-webservice/src/main/resources/tutorial.jks
7 changes: 5 additions & 2 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sonar.modules= PedestrianPlugin, \
TmxTools, \
MessageLoggerPlugin, \
CommandPlugin, \
MobilityOperationPlugin, \
PortDrayagePlugin, \
ODELoggerPlugin, \
DsrcImmediateForwardPlugin, \
MessageReceiverPlugin
Expand All @@ -61,7 +61,7 @@ TmxUtils.sonar.projectBaseDir =/home/V2X-Hub/src/tmx/TmxUtils
CARMACloudPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/CARMACloudPlugin
CommandPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/CommandPlugin
CswPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/CswPlugin
MobilityOperationPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/MobilityOperationPlugin
PortDrayagePlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/PortDrayagePlugin
ODELoggerPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/ODELoggerPlugin
MessageLoggerPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/MessageLoggerPlugin
DmsPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/DmsPlugin
Expand All @@ -85,6 +85,7 @@ TmxTools.sonar.sources =src
TmxUtils.sonar.sources =src
MessageLoggerPlugin.sonar.sources =src
CswPlugin.sonar.sources =src
PortDrayagePlugin.sonar.sources =src
DmsPlugin.sonar.sources =src
DsrcImmediateForwardPlugin.sonar.sources =src
LocationPlugin.sonar.sources =src
Expand Down Expand Up @@ -113,6 +114,7 @@ MobilityOperationPlugin.sonar.sources =src
TmxUtils.sonar.cfamily.gcov.reportsPath =coverage
#MessageLoggerPlugin.sonar.cfamily.gcov.reportsPath =coverage
#CswPlugin.sonar.cfamily.gcov.reportsPath =coverage
#PortDrayagePlugin.sonar.cfamily.gcov.reportsPath =coverage
#DmsPlugin.sonar.cfamily.gcov.reportsPath =coverage
#DsrcImmediateForwardPlugin.sonar.cfamily.gcov.reportsPath =coverage
#LocationPlugin.sonar.cfamily.gcov.reportsPath =coverage
Expand All @@ -138,6 +140,7 @@ TmxUtils.sonar.tests=test
#TmxTools.sonar.tests=test
#MessageLoggerPlugin.sonar.tests=test
#CswPlugin.sonar.tests=test
#PortDrayagePlugin.sonar.tests=test
#DmsPlugin.sonar.tests=test
#DsrcImmediateForwardPlugin.sonar.tests=test
#LocationPlugin.sonar.tests=test
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ RUN make install
WORKDIR /home/V2X-Hub/ext/ccserver
RUN cmake .
RUN make
RUN make install

WORKDIR /home/V2X-Hub/ext/pdclient
RUN cmake .
RUN make
RUN make install

### setup and install v2x-hub core and plugins
Expand Down Expand Up @@ -101,8 +106,8 @@ RUN ln -s ../bin TimPlugin/bin
RUN zip TimPlugin.zip TimPlugin/bin/TimPlugin TimPlugin/manifest.json
RUN ln -s ../bin CARMACloudPlugin/bin
RUN zip CARMACloudPlugin.zip CARMACloudPlugin/bin/CARMACloudPlugin CARMACloudPlugin/manifest.json
RUN ln -s ../bin MobilityOperationPlugin/bin
RUN zip MobilityOperationPlugin.zip MobilityOperationPlugin/bin/MobilityOperationPlugin MobilityOperationPlugin/manifest.json
RUN ln -s ../bin PortDrayagePlugin/bin
RUN zip PortDrayagePlugin.zip PortDrayagePlugin/bin/PortDrayagePlugin PortDrayagePlugin/manifest.json
RUN ln -s ../bin ODELoggerPlugin/bin
RUN zip ODELoggerPlugin.zip ODELoggerPlugin/bin/ODELoggerPlugin ODELoggerPlugin/manifest.json

Expand Down
9 changes: 7 additions & 2 deletions configuration/amd64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ services:
- mysql_root_password
volumes:
- ./mysql/localhost.sql:/docker-entrypoint-initdb.d/localhost.sql
- ./mysql/port_drayage.sql:/docker-entrypoint-initdb.d/port_drayage.sql

php:
image: usdotfhwaops/php:latest
image: usdotfhwaops/php:6.2
container_name: php
network_mode: host
depends_on:
Expand All @@ -27,7 +28,7 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubamd:latest
image: usdotfhwaops/v2xhubamd:6.2
container_name: v2xhub
network_mode: host
restart: always
Expand All @@ -40,6 +41,10 @@ services:
volumes:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice:6.2
container_name: port_drayage_webservice
network_mode: host
secrets:
mysql_password:
file: ./secrets/mysql_password.txt
Expand Down
32 changes: 16 additions & 16 deletions configuration/amd64/mysql/localhost.sql

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions configuration/amd64/mysql/port_drayage.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
-- MySQL dump 10.13 Distrib 5.7.34, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: PORT_DRAYAGE
-- ------------------------------------------------------
-- Server version 5.7.35

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `PORT_DRAYAGE`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `PORT_DRAYAGE` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `PORT_DRAYAGE`;

--
-- Table structure for table `first_action`
--

DROP TABLE IF EXISTS `first_action`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `first_action` (
`cmv_id` varchar(20) NOT NULL,
`cargo_id` varchar(20) DEFAULT NULL,
`destination_lat` decimal(9,7) NOT NULL,
`destination_long` decimal(9,7) NOT NULL,
`operation` varchar(20) NOT NULL,
`action_id` varchar(36) NOT NULL,
`next_action` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `first_action`
--

LOCK TABLES `first_action` WRITE;
/*!40000 ALTER TABLE `first_action` DISABLE KEYS */;
INSERT INTO `first_action` VALUES ("123",'SOME_CARGO',38.9548890,-77.1481430,'PICKUP','4bea1c45-e421-11eb-a8cc-000c29ae389d','32320c8a-e422-11eb-a8cc-000c29ae389d');
/*!40000 ALTER TABLE `first_action` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `freight`
--

DROP TABLE IF EXISTS `freight`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `freight` (
`cmv_id` varchar(20) NOT NULL,
`cargo_id` varchar(20) DEFAULT NULL,
`destination_lat` decimal(9,7) NOT NULL,
`destination_long` decimal(9,7) NOT NULL,
`operation` varchar(20) NOT NULL,
`action_id` varchar(36) NOT NULL,
`next_action` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `freight`
--

LOCK TABLES `freight` WRITE;
/*!40000 ALTER TABLE `freight` DISABLE KEYS */;
INSERT INTO `freight` VALUES ("123",NULL,38.9549780,-77.1475790,'EXIT_STAGING_AREA','32320c8a-e422-11eb-a8cc-000c29ae389d','4ace39e6-ee36-11eb-9a03-0242ac130003'),("123",'SOME_CARGO',38.9548890,-77.1481430,'PICKUP','4bea1c45-e421-11eb-a8cc-000c29ae389d','32320c8a-e422-11eb-a8cc-000c29ae389d');
/*!40000 ALTER TABLE `freight` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-07-21 11:42:55
90 changes: 90 additions & 0 deletions configuration/amd64/mysql/suntrax/port_area_operations.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
-- MySQL dump 10.13 Distrib 5.7.36, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: PORT_DRAYAGE
-- ------------------------------------------------------
-- Server version 5.7.36

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `PORT_DRAYAGE`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `PORT_DRAYAGE` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `PORT_DRAYAGE`;

--
-- Table structure for table `first_action`
--

DROP TABLE IF EXISTS `first_action`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `first_action` (
`cmv_id` varchar(20) NOT NULL,
`cargo_id` varchar(20) DEFAULT NULL,
`destination_lat` decimal(9,7) NOT NULL,
`destination_long` decimal(9,7) NOT NULL,
`operation` varchar(20) NOT NULL,
`action_id` varchar(36) NOT NULL,
`next_action` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `first_action`
--

LOCK TABLES `first_action` WRITE;
/*!40000 ALTER TABLE `first_action` DISABLE KEYS */;
/*!40000 ALTER TABLE `first_action` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `freight`
--

DROP TABLE IF EXISTS `freight`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `freight` (
`cmv_id` varchar(20) NOT NULL,
`cargo_id` varchar(20) DEFAULT NULL,
`destination_lat` decimal(9,7) NOT NULL,
`destination_long` decimal(9,7) NOT NULL,
`operation` varchar(20) NOT NULL,
`action_id` varchar(36) NOT NULL,
`next_action` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `freight`
--

LOCK TABLES `freight` WRITE;
/*!40000 ALTER TABLE `freight` DISABLE KEYS */;
INSERT INTO `freight` VALUES ('DOT-80550',NULL,28.1128156,-81.8314745,'ENTER_PORT','4ace39e6-ee36-11eb-9a03-0242ac130003','67eadd3a-38b4-11ec-930a-000145098e4f'),('DOT-80550','CARGO_A',28.1119763,-81.8312035,'DROPOFF','67eadd3a-38b4-11ec-930a-000145098e4f','0bf7ebda-38b5-11ec-930a-000145098e4f'),('DOT-80550','CARGO_B',28.1117373,-81.8309654,'PICKUP','0bf7ebda-38b5-11ec-930a-000145098e4f','9230504d-38b5-11ec-930a-000145098e4f'),('DOT-80550','CARGO_B',28.1120500,-81.8306483,'PORT_CHECKPOINT','9230504d-38b5-11ec-930a-000145098e4f','511ad052-38b6-11ec-930a-000145098e4f'),('DOT-80550','CARGO_B',28.1138052,-81.8317502,'EXIT_PORT','511ad052-38b6-11ec-930a-000145098e4f','fc15d52a-3c0c-11ec-b00d-000145098e4f'),('DOT-80550','CARGO_B',28.1232336,-81.8347566,'ENTER_STAGING_AREA','fc15d52a-3c0c-11ec-b00d-000145098e4f','5ceaab82-515c-11ec-9e2c-000145098e47'),('DOT-10004',NULL,28.1128156,-81.8314745,'ENTER_PORT','84f6b797-52c2-11ec-9105-000145098e4f','c9bba171-52c2-11ec-9105-000145098e4f'),('DOT-10004','CARGO_A',28.1119763,-81.8312035,'DROPOFF','c9bba171-52c2-11ec-9105-000145098e4f','8e1d456a-52c3-11ec-9105-000145098e4f'),('DOT-10004','CARGO_B',28.1117373,-81.8309654,'PICKUP','8e1d456a-52c3-11ec-9105-000145098e4f','744be658-52c4-11ec-9105-000145098e4f'),('DOT-10004','CARGO_B',28.1120500,-81.8306483,'PORT_CHECKPOINT','744be658-52c4-11ec-9105-000145098e4f','a4b419b9-52c5-11ec-9105-000145098e4f'),('DOT-10004','CARGO_B',28.1138052,-81.8317502,'EXIT_PORT','a4b419b9-52c5-11ec-9105-000145098e4f','20b546e3-52c6-11ec-9105-000145098e4f'),('DOT-10004','CARGO_B',28.1232336,-81.8347566,'ENTER_STAGING_AREA','20b546e3-52c6-11ec-9105-000145098e4f','53875eba-52c7-11ec-9105-000145098e4f');
/*!40000 ALTER TABLE `freight` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-12-03 11:03:12
Loading

0 comments on commit c38f9ea

Please sign in to comment.