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

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

commit e8bef97e28051b6f81b5c9e263e7d335f98d3faf
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Wed Jun 13 08:32:54 2018 -0600

    updates to map the env vars properly
---
 traffic_ops/testing/api/docker/Dockerfile         | 20 ++++++++++++++------
 traffic_ops/testing/api/docker/docker-compose.yml | 12 ++++++------
 traffic_ops/testing/api/docker/run_admin_pl.sh    |  2 +-
 3 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/traffic_ops/testing/api/docker/Dockerfile 
b/traffic_ops/testing/api/docker/Dockerfile
index 5f48267..3f8f18e 100644
--- a/traffic_ops/testing/api/docker/Dockerfile
+++ b/traffic_ops/testing/api/docker/Dockerfile
@@ -14,28 +14,36 @@
 FROM trafficops-perl:latest
 MAINTAINER Dewayne Richardson <dewr...@apache.org>
 
+RUN yum -y install vim
+
 ARG TO_DIR=traffic_ops
-ARG TEST_ENV=$TEST_ENV
-ARG API_DOCKER_DIR=traffic_ops/testing/api/docker
+ARG API_DOCKER_DIR=.
 
 ARG TEST_DIR
-ARG TEST_ENV
+
 ENV TEST_DIR=$TEST_DIR
-ENV TEST_ENV=$TEST_ENV
+
+ARG DB_NAME
 ARG DB_SERVER
 ARG DB_PORT
+ARG DB_USER
+ARG DB_PASSWORD
+
+ENV DB_NAME=$DB_SERVER
 ENV DB_SERVER=$DB_SERVER
 ENV DB_PORT=$DB_PORT
+ENV DB_USER=$DB_SERVER
+ENV DB_PASSWORD=$DB_PASSWORD
 
 #COPY --from=trafficops-perl /opt/traffic_ops /opt/traffic_ops
 COPY --from=trafficops-perl /usr/local/go /usr/local/go
 
 ADD $API_DOCKER_DIR/$TO_RPM /
-ADD $API_DOCKER_DIR/run_admin_pl.sh /
 
 ENV PERL5LIB="/opt/traffic_ops/app/lib:/opt/traffic_ops/app/local/lib/perl5"
 
 WORKDIR /opt/traffic_ops/app
-RUN ./db/admin.pl --env=$TEST_ENV reset
+ADD ./run_admin_pl.sh .
+RUN ./run_admin_pl.sh
 
 #EXPOSE 60443
diff --git a/traffic_ops/testing/api/docker/docker-compose.yml 
b/traffic_ops/testing/api/docker/docker-compose.yml
index 19ef922..4b230be 100644
--- a/traffic_ops/testing/api/docker/docker-compose.yml
+++ b/traffic_ops/testing/api/docker/docker-compose.yml
@@ -14,19 +14,19 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+#../../../../infrastructure/cdn-in-a-box/traffic_ops/
+#infrastructure/cdn-in-a-box/traffic_ops/
+
 ---
-version: '3.6'
+version: '2.1'
 
 services:
   api_tests:
     build:
-      context: ../../../..
-      dockerfile: traffic_ops/testing/api/docker/Dockerfile
+      context: .
+      dockerfile: Dockerfile
       args:
         DB_SERVER: db
         DB_PORT: 5432
     env_file:
       - traffic-ops-test.env
-    volumes:
-      - incubator-trafficcontrol:/incubator-trafficcontrol
-      - conf:/conf
diff --git a/traffic_ops/testing/api/docker/run_admin_pl.sh 
b/traffic_ops/testing/api/docker/run_admin_pl.sh
index 438a6ed..fd44b70 100755
--- a/traffic_ops/testing/api/docker/run_admin_pl.sh
+++ b/traffic_ops/testing/api/docker/run_admin_pl.sh
@@ -51,4 +51,4 @@ test:
 EOF
 
 cd /opt/traffic_ops/app
-./db/admin.pl --env=$TEST_ENV reset
+./db/admin.pl --env=test reset

-- 
To stop receiving notification emails like this one, please contact
dang...@apache.org.

Reply via email to