zrhoffman commented on a change in pull request #4972: URL: https://github.com/apache/trafficcontrol/pull/4972#discussion_r473299517
########## File path: .github/actions/run-ciab/entrypoint.sh ########## @@ -0,0 +1,52 @@ +#!/bin/sh -l +# 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. + +set -ex; +export COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 # use Docker BuildKit for better image building performance +( +cd dist; +mv -- */*.rpm .; +); + +docker-compose --version; +cd infrastructure/cdn-in-a-box; +make; # All RPMs should have already been built + +docker images; +logged_services='trafficrouter readiness'; +other_services='dns edge enroller mid origin trafficmonitor trafficops trafficops-perl trafficstats trafficvault'; +docker_compose='docker-compose -f ./docker-compose.yml -f ./docker-compose.readiness.yml'; +time $docker_compose build --parallel $logged_services $other_services; +$docker_compose up -d $logged_services $other_services; +$docker_compose logs -f $logged_services & Review comment: > It actually also looks like you explicitly call `docker-compose logs` later for other services. Instead of waiting on `docker-compose ps -q readiness`, you could set a timeout on `docker-compose logs -f readiness` to get it to print out the logs without needing job control or mixing output. `docker-compose ps -q readiness` just gets the container ID, the waiting waiting part is from `docker wait`. The script does not use job control. That said, timing out on `docker-compose logs` instead and then checking the container exit code with `docker inspect --format='{{.State.ExitCode}}' "$($docker_compose ps -q readiness)"` would let us keep the `errexit` option enabled. Changed in 5ef4ef753 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
