From 772b7615c90fe0f812a3902af22721c95535c66c Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Wed, 30 Aug 2023 12:48:42 -0600 Subject: [PATCH] Do not ignore libraries necessary for the newer version of the TO client in the TM integration test dockerfiles --- .github/actions/tm-integration-tests/entrypoint.sh | 2 +- traffic_monitor/tests/_integration/Dockerfile | 13 +------------ .../tests/_integration/Dockerfile.dockerignore | 4 ++++ traffic_monitor/tools/testto/Dockerfile | 8 +------- .../tools/testto/Dockerfile.dockerignore | 3 +++ 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/actions/tm-integration-tests/entrypoint.sh b/.github/actions/tm-integration-tests/entrypoint.sh index 7e3e533f5c..978d60d6d2 100755 --- a/.github/actions/tm-integration-tests/entrypoint.sh +++ b/.github/actions/tm-integration-tests/entrypoint.sh @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. -set -e +set -o errexit -o nounset -o pipefail function wait_for_endpoint() { try=0 diff --git a/traffic_monitor/tests/_integration/Dockerfile b/traffic_monitor/tests/_integration/Dockerfile index cc47385e73..6944e3ccea 100644 --- a/traffic_monitor/tests/_integration/Dockerfile +++ b/traffic_monitor/tests/_integration/Dockerfile @@ -35,18 +35,7 @@ RUN dnf install -y initscripts epel-release jq git COPY traffic_monitor/tests/_integration/ /tm/ RUN mkdir -p ${GOPATH}/src/github.com/apache/trafficcontrol -COPY go.mod \ - go.sum \ - ${GOPATH}/src/github.com/apache/trafficcontrol/ -# config.go is included so that `go mod vendor` includes github.com/kelseyhightower/envconfig -# since dependencies within _integration are not considered -COPY cache-config/testing/ort-tests/config/config.go ${GOPATH}/src/github.com/apache/trafficcontrol/cache-config/testing/ort-tests/config/config.go -COPY lib ${GOPATH}/src/github.com/apache/trafficcontrol/lib -COPY vendor ${GOPATH}/src/github.com/apache/trafficcontrol/vendor -COPY traffic_monitor/ ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/ -COPY traffic_ops/toclientlib/ ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_ops/toclientlib/ -COPY traffic_ops/v4-client/ ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_ops/v4-client/ -COPY traffic_ops/v5-client/ ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_ops/v5-client/ +COPY . ${GOPATH}/src/github.com/apache/trafficcontrol WORKDIR ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tests/_integration/ RUN go mod vendor && \ diff --git a/traffic_monitor/tests/_integration/Dockerfile.dockerignore b/traffic_monitor/tests/_integration/Dockerfile.dockerignore index 5804f16dc4..4372cc42c5 100644 --- a/traffic_monitor/tests/_integration/Dockerfile.dockerignore +++ b/traffic_monitor/tests/_integration/Dockerfile.dockerignore @@ -15,6 +15,9 @@ # specific language governing permissions and limitations # under the License. * +!/cache-config/t3cutil/ +# config.go is included so that `go mod vendor` includes github.com/kelseyhightower/envconfig +# since dependencies within _integration are not considered !/cache-config/testing/ort-tests/config/config.go !/go.mod !/go.sum @@ -22,5 +25,6 @@ !/lib/ !/traffic_monitor !/traffic_ops/toclientlib +!/traffic_ops/traffic_ops_golang/test !/traffic_ops/v*-client !/vendor/ diff --git a/traffic_monitor/tools/testto/Dockerfile b/traffic_monitor/tools/testto/Dockerfile index d4573ceadd..f17c0d76e0 100644 --- a/traffic_monitor/tools/testto/Dockerfile +++ b/traffic_monitor/tools/testto/Dockerfile @@ -23,13 +23,7 @@ RUN dnf -y install golang git ENV GOPATH=/go RUN mkdir -p ${GOPATH}/src/github.com/apache/trafficcontrol -COPY go.mod \ - go.sum \ - ${GOPATH}/src/github.com/apache/trafficcontrol/ -COPY lib ${GOPATH}/src/github.com/apache/trafficcontrol/lib -COPY vendor ${GOPATH}/src/github.com/apache/trafficcontrol/vendor - -COPY traffic_monitor/tools/testto ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tools/testto +COPY . ${GOPATH}/src/github.com/apache/trafficcontrol/ WORKDIR ${GOPATH}/src/github.com/apache/trafficcontrol/traffic_monitor/tools/testto RUN go mod vendor && \ diff --git a/traffic_monitor/tools/testto/Dockerfile.dockerignore b/traffic_monitor/tools/testto/Dockerfile.dockerignore index 65f569bc20..803d738b96 100644 --- a/traffic_monitor/tools/testto/Dockerfile.dockerignore +++ b/traffic_monitor/tools/testto/Dockerfile.dockerignore @@ -18,5 +18,8 @@ !/go.mod !/go.sum !/lib/ +!/cache-config/t3cutil/ +!/traffic_ops/toclientlib +!/traffic_ops/v*-client !/traffic_monitor/tools/testto !/vendor/