Skip to content

Commit

Permalink
internal/apps: move setup-smoke-test (#2871)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixge authored Sep 17, 2024
1 parent 6d0e1b8 commit 1f0966d
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./internal/apps/setup-smoke-test/Dockerfile
file: ./internal/setup-smoke-test/Dockerfile
push: false
load: true
tags: smoke-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ FROM golang:$go-$build_env AS build-env

WORKDIR /src
COPY . .
WORKDIR /src/internal/apps/setup-smoke-test
WORKDIR /src/internal/setup-smoke-test

ARG build_with_cgo
RUN go env -w CGO_ENABLED=$build_with_cgo
Expand Down Expand Up @@ -67,15 +67,15 @@ RUN ldd smoke-test || true
# this image to preperly highlight the fact that the compiled program is running
# out of the box in it without any further installation.
FROM debian:11 AS debian11
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /usr/local/bin
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /usr/local/bin
CMD /usr/local/bin/smoke-test

# debian12 deployment environment
# IMPORTANT NOTE: Nothing else than the compiled program must be copied into
# this image to preperly highlight the fact that the compiled program is running
# out of the box in it without any further installation.
FROM debian:12 AS debian12
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /usr/local/bin
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /usr/local/bin
CMD /usr/local/bin/smoke-test

# alpine deployment environment
Expand All @@ -87,23 +87,23 @@ ARG build_with_cgo
RUN set -ex; if [ "$build_with_cgo" = "1" ]; then \
apk update && apk add libc6-compat; \
fi
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /usr/local/bin
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /usr/local/bin
CMD /usr/local/bin/smoke-test

# amazonlinux:2 deployment environment
# IMPORTANT NOTE: Nothing else than the compiled program must be copied into
# this image to preperly highlight the fact that the compiled program is running
# out of the box in it without any further installation.
FROM amazonlinux:2 AS al2
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /usr/local/bin
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /usr/local/bin
CMD /usr/local/bin/smoke-test

# amazonlinux:2023 deployment environment
# IMPORTANT NOTE: Nothing else than the compiled program must be copied into
# this image to preperly highlight the fact that the compiled program is running
# out of the box in it without any further installation.
FROM amazonlinux:2023 AS al2023
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /usr/local/bin
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /usr/local/bin
CMD /usr/local/bin/smoke-test

# busybox deployment environment
Expand All @@ -112,15 +112,15 @@ CMD /usr/local/bin/smoke-test
# out of the box in it without any further installation.
FROM busybox AS busybox
RUN mkdir -p /usr/local/bin
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /usr/local/bin
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /usr/local/bin
CMD /usr/local/bin/smoke-test

# scratch deployment environment - meant to be used with CGO_ENABLED=0
# IMPORTANT NOTE: Nothing else than the compiled program must be copied into
# this image to preperly highlight the fact that the compiled program is running
# out of the box in it without any further installation.
FROM scratch AS scratch
COPY --from=build-env /src/internal/apps/setup-smoke-test/smoke-test /
COPY --from=build-env /src/internal/setup-smoke-test/smoke-test /
ENTRYPOINT [ "/smoke-test" ]

# Final deployment environment - helper target to end up a single one
Expand Down
42 changes: 42 additions & 0 deletions internal/setup-smoke-test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module github.com/DataDog/dd-trace-go/internal/setup-smoke-test

go 1.22.0

require gopkg.in/DataDog/dd-trace-go.v1 v1.67.1

require (
github.com/DataDog/appsec-internal-go v1.7.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-go/v5 v5.3.0 // indirect
github.com/DataDog/go-libddwaf/v3 v3.3.0 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
github.com/DataDog/gostackparse v0.7.0 // indirect
github.com/DataDog/sketches-go v1.4.5 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 // indirect
github.com/ebitengine/purego v0.6.0-alpha.5 // indirect
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/outcaste-io/ristretto v0.2.3 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
Loading

0 comments on commit 1f0966d

Please sign in to comment.