You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/06/21 01:44:19 UTC

[GitHub] rguiliani closed pull request #731: [TC-192] Differentiates between goTM and javaTM rpm builds

rguiliani closed pull request #731: [TC-192] Differentiates between goTM and javaTM rpm builds
URL: https://github.com/apache/trafficcontrol/pull/731
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build/functions.sh b/build/functions.sh
index cdf8670bf..a27d6b184 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -76,7 +76,12 @@ function getVersion() {
 	local d="$1"
 	local vf="$d/VERSION"
 	[ -r $vf ] || { echo "Could not read $vf: $!"; exit 1; }
-	cat "$vf"
+	if [ "${TC_COMPILER}" == "go" ]; then
+		local version="$(cat ${vf})_go"
+		echo "${version}"
+	else
+		cat "$vf"
+	fi
 }
 
 # ---------------------------------------
@@ -118,6 +123,7 @@ function checkEnvironment {
 	echo "BUILD_NUMBER: $BUILD_NUMBER"
 	echo "RHEL_VERSION: $RHEL_VERSION"
 	echo "TC_VERSION: $TC_VERSION"
+	echo "TC_COMPILER: $TC_COMPILER"
 	echo "--------------------------------------------------"
 }
 
diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml
index 518ed86e1..9924d10c7 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -34,16 +34,15 @@ services:
     volumes:
       - ../../..:/trafficcontrol
 
-  # NOTE: Disabled since rpm name collides with current traffic_monitor.  To
-  # build golang version,  uncomment this section and use `docker-compose ...
-  # up traffic_monitor_golang_build`
-  # traffic_monitor_golang_build:
-  #   image: traffic_monitor_golang_builder
-  #   build:
-  #     dockerfile: infrastructure/docker/build/Dockerfile-traffic_monitor_golang
-  #     context: ../../..
-  #   volumes:
-  #     - ../../..:/trafficcontrol
+  traffic_monitor_golang_build:
+    image: traffic_monitor_golang_builder
+    build:
+      dockerfile: infrastructure/docker/build/Dockerfile-traffic_monitor_golang
+      context: ../../..
+    volumes:
+      - ../../..:/trafficcontrol
+    environment:
+      - TC_COMPILER=go
 
   traffic_ops_build:
     image: traffic_ops_builder


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services