You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by so...@apache.org on 2017/03/10 15:20:23 UTC
[09/14] incubator-trafficcontrol git commit: run-build.sh not used
any more..; no repo env vars needed
run-build.sh not used any more..; no repo env vars needed
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/6dce7318
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/6dce7318
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/6dce7318
Branch: refs/heads/master
Commit: 6dce7318c28395f555712d2aae5515af96a3e199
Parents: 6b3afe2
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed Jan 25 20:36:18 2017 -0700
Committer: Phil Sorber <so...@apache.org>
Committed: Fri Mar 10 08:18:25 2017 -0700
----------------------------------------------------------------------
.../build/Dockerfile-traffic_monitor_golang | 22 +++---
.../docker/build/Dockerfile-traffic_stats | 4 +-
infrastructure/docker/build/docker-compose.yml | 71 ++++++--------------
infrastructure/docker/build/run-build.sh | 37 ----------
4 files changed, 32 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6dce7318/infrastructure/docker/build/Dockerfile-traffic_monitor_golang
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_monitor_golang b/infrastructure/docker/build/Dockerfile-traffic_monitor_golang
index 209d4b7..dc7c80d 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_monitor_golang
+++ b/infrastructure/docker/build/Dockerfile-traffic_monitor_golang
@@ -18,26 +18,26 @@ FROM centos:7
MAINTAINER Dan Kirkwood
+# top level of trafficcontrol directory must be mounted as a volume:
+# docker run --volume /trafficcontrol:$(pwd) ...
+VOLUME /trafficcontrol
+
+### Common for all sub-component builds
RUN yum -y install \
+ epel-release \
git \
rpm-build && \
yum -y clean all
-ENV GITREPO https://github.com/apache/incubator-trafficcontrol
-ENV BRANCH master
-
-WORKDIR /repo
-
-# Go specific
+### traffic_monitor_golang specific requirements
RUN yum -y install \
golang && \
yum -y clean all
###
-VOLUME ./artifacts:/artifacts
-
-ADD run-build.sh .
-
-CMD ./run-build.sh traffic_monitor_golang 2>&1 | tee /artifacts/build-traffic_monitor_golang.log
+WORKDIR /trafficcontrol
+CMD mkdir -p dist && \
+ ./build/build.sh traffic_monitor_golang 2>&1 | \
+ tee ./dist/build-traffic_monitor_golang.log
# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6dce7318/infrastructure/docker/build/Dockerfile-traffic_stats
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/Dockerfile-traffic_stats b/infrastructure/docker/build/Dockerfile-traffic_stats
index 0046bef..8346782 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_stats
+++ b/infrastructure/docker/build/Dockerfile-traffic_stats
@@ -37,7 +37,7 @@ RUN yum -y install \
WORKDIR /trafficcontrol
CMD mkdir -p dist && \
- ./build/build.sh traffic_ops 2>&1 | \
- tee ./dist/build-traffic_ops.log
+ ./build/build.sh traffic_stats 2>&1 | \
+ tee ./dist/build-traffic_stats.log
# vi:syntax=Dockerfile
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6dce7318/infrastructure/docker/build/docker-compose.yml
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml
index caa490a..16e4acd 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -15,86 +15,53 @@
# specific language governing permissions and limitations
# under the License.
---
-
-# Build configuration for trafficcontrol
-# Usage:
-# GITREPO=... BRANCH=... docker-compose up [<service>...]
-#
-# where GITREPO is https path to trafficcontrol clone
-# (default: https://github.com/apache/incubator-trafficcontrol)
-# and <branch> is name of branch to test
-# (default: master).
-#
-# [<service>...] (optional) is one or more of the services listed below, e.g.
-# traffic_ops_build. Default is to build all.
-#
-# All rpms are delivered to ./artifacts.
-#
-version: '2'
+version: '3'
services:
traffic_monitor_build:
image: traffic_monitor_builder
build:
- dockerfile: Dockerfile-traffic_monitor
- context: .
- environment:
- - GITREPO
- - BRANCH
+ dockerfile: infrastructure/docker/build/Dockerfile-traffic_monitor
+ context: ../../..
volumes:
- - ./artifacts:/artifacts
+ - ../../..:/trafficcontrol
traffic_monitor_golang_build:
image: traffic_monitor_golang_builder
build:
- dockerfile: Dockerfile-traffic_monitor_golang
- context: .
- environment:
- - GITREPO
- - BRANCH
+ dockerfile: infrastructure/docker/build/Dockerfile-traffic_monitor_golang
+ context: ../../..
volumes:
- - ./artifacts:/artifacts
+ - ../../..:/trafficcontrol
traffic_ops_build:
image: traffic_ops_builder
build:
- dockerfile: Dockerfile-traffic_ops
- context: .
- environment:
- - GITREPO
- - BRANCH
+ dockerfile: infrastructure/docker/build/Dockerfile-traffic_ops
+ context: ../../..
volumes:
- - ./artifacts:/artifacts
+ - ../../..:/trafficcontrol
traffic_portal_build:
image: traffic_portal_builder
build:
- dockerfile: Dockerfile-traffic_portal
- context: .
- environment:
- - GITREPO
- - BRANCH
+ dockerfile: infrastructure/docker/build/Dockerfile-traffic_portal
+ context: ../../..
volumes:
- - ./artifacts:/artifacts
+ - ../../..:/trafficcontrol
traffic_router_build:
image: traffic_router_builder
build:
- dockerfile: Dockerfile-traffic_router
- context: .
- environment:
- - GITREPO
- - BRANCH
+ dockerfile: infrastructure/docker/build/Dockerfile-traffic_router
+ context: ../../..
volumes:
- - ./artifacts:/artifacts
+ - ../../..:/trafficcontrol
traffic_stats_build:
image: traffic_stats_builder
build:
- dockerfile: Dockerfile-traffic_stats
- context: .
- environment:
- - GITREPO
- - BRANCH
+ dockerfile: infrastructure/docker/build/Dockerfile-traffic_stats
+ context: ../../..
volumes:
- - ./artifacts:/artifacts
+ - ../../..:/trafficcontrol
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6dce7318/infrastructure/docker/build/run-build.sh
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/run-build.sh b/infrastructure/docker/build/run-build.sh
deleted file mode 100755
index 58127d8..0000000
--- a/infrastructure/docker/build/run-build.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-target=$1
-[[ -z $target ]] && echo "No target specified"
-echo "Building $target"
-
-echo "GITREPO=${GITREPO:=https://github.com/apache/incubator-trafficcontrol}"
-echo "BRANCH=${BRANCH:=master}"
-
-dir=$(basename $GITREPO)
-set -x
-git clone "$GITREPO" -b "$BRANCH" $dir || echo "Clone failed: $!"
-
-cd $dir/$target
-./build/build_rpm.sh
-mkdir -p /artifacts
-cp ../dist/* /artifacts/.
-
-# Clean up for next build
-cd -
-rm -r $dir