This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 1ae0fed7e8 Have TPv2 reuse TPv1 builder (#7379)
1ae0fed7e8 is described below

commit 1ae0fed7e827f1ea3be26e7a04dafed369323e06
Author: Steve Hamrick <[email protected]>
AuthorDate: Fri Mar 3 11:57:32 2023 -0700

    Have TPv2 reuse TPv1 builder (#7379)
    
    * Reuse TPv1 image and override command
    
    * Dont modify host system
---
 build/build.sh                                        | 4 +++-
 infrastructure/docker/build/Dockerfile-traffic_portal | 6 ------
 infrastructure/docker/build/docker-compose.yml        | 8 +++-----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/build/build.sh b/build/build.sh
index ebb442a3f0..312840bc69 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -45,7 +45,6 @@ else
        done
 fi
 
-
 badproj=''
 goodproj=''
 for p in ${projects}; do
@@ -60,6 +59,9 @@ for p in ${projects}; do
                fi
                continue
        fi
+       if [ "$p" = traffic_portal_v2 ]; then
+               ln -s experimental/traffic-portal/ traffic_portal_v2
+       fi
        if [ "$p" = docs ]; then
                if isInGitTree; then
                        echo "-----  Building docs ..."
diff --git a/infrastructure/docker/build/Dockerfile-traffic_portal 
b/infrastructure/docker/build/Dockerfile-traffic_portal
index b7495f2213..a0b435ae32 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_portal
+++ b/infrastructure/docker/build/Dockerfile-traffic_portal
@@ -39,13 +39,7 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 RUN    curl -sL https://rpm.nodesource.com/setup_16.x | bash - && \
        yum -y install nodejs
 
-FROM common-dependencies as traffic_portal_v1
 RUN npm -g install make grunt-cli sass
 CMD /trafficcontrol/build/clean_build.sh traffic_portal
 
-FROM common-dependencies as traffic_portal_v2
-RUN mkdir -p /trafficcontrol/experimental/traffic-portal
-RUN ln -s /trafficcontrol/experimental/traffic-portal/ 
/trafficcontrol/traffic_portal_v2
-CMD /trafficcontrol/build/clean_build.sh traffic_portal_v2
-
 # vi:syntax=Dockerfile
diff --git a/infrastructure/docker/build/docker-compose.yml 
b/infrastructure/docker/build/docker-compose.yml
index 9df0ce818f..9ad893b25b 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -22,7 +22,7 @@ services:
     image: licenseweasel/weasel:v0.4
     volumes:
       - ../../..:/trafficcontrol:z
-    command: ['-f', '/trafficcontrol/dist/weasel.txt', '/trafficcontrol']
+    command: [ '-f', '/trafficcontrol/dist/weasel.txt', '/trafficcontrol' ]
 
   source:
     image: apache/traffic_source_tarballer:master
@@ -104,7 +104,6 @@ services:
     image: apache/traffic_portal_builder:master
     build:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_portal
-      target: traffic_portal_v1
       context: ../../..
       args:
         # Change BASE_IMAGE to centos when RHEL_VERSION=7
@@ -119,11 +118,9 @@ services:
       - ../../../.npm:/root/.npm:z
 
   traffic_portal_v2_build:
-    container_name: traffic_portal_v2
-    image: apache/traffic_portal_v2_builder:master
+    image: apache/traffic_portal_builder:master
     build:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_portal
-      target: traffic_portal_v2
       context: ../../..
       args:
         # Change BASE_IMAGE to centos when RHEL_VERSION=7
@@ -136,6 +133,7 @@ services:
     volumes:
       - ../../..:/trafficcontrol:z
       - ../../../.npm:/root/.npm:z
+    command: [ "/bin/bash", "-c", "/trafficcontrol/build/clean_build.sh 
traffic_portal_v2" ]
 
   traffic_router_build:
     image: apache/traffic_router_builder:master

Reply via email to