From 902baffe394e7dd4f900b6a775a6df307fafb8c5 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 20:49:13 +0100 Subject: [PATCH 1/9] [deb-x64] Remove entrypoint --- deb-x64/Dockerfile | 7 ------- setup_python.sh | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/deb-x64/Dockerfile b/deb-x64/Dockerfile index f20b0a02..a193ea00 100644 --- a/deb-x64/Dockerfile +++ b/deb-x64/Dockerfile @@ -158,7 +158,6 @@ RUN curl -Sl -O https://dd-agent-omnibus.s3.amazonaws.com/kernel-4.9-headers-deb # TODO: investigate if we could use gvm to do this for us. COPY ./setup_go.sh /setup_go.sh RUN ./setup_go.sh -COPY ./gobin.sh /etc/profile.d/ # Download and install golangci-lint RUN curl -sSfL -o golangci-lint-install.sh https://raw.githubusercontent.com/golangci/golangci-lint/v1.44.2/install.sh \ @@ -195,14 +194,8 @@ RUN chmod +x /build-gcc.sh \ && /build-gcc.sh \ && rm /build-gcc.sh -# Entrypoint -COPY ./entrypoint.sh / -RUN chmod +x /entrypoint.sh - # create the agent build folder within $GOPATH RUN mkdir -p /go/src/github.com/DataDog/datadog-agent # Force umask to 0022 RUN echo "umask 0022" >> /root/.bashrc - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/setup_python.sh b/setup_python.sh index 224a9e63..f682325a 100755 --- a/setup_python.sh +++ b/setup_python.sh @@ -99,3 +99,5 @@ fi # Add python3's invoke to the PATH even when ddpy3 is not active, since we want to use python3 invoke to run python2 tests ln -s ${CONDA_PATH}/envs/ddpy3/bin/inv /usr/local/bin + +echo "conda activate ddpy3" >> /root/.bashrc From 0b8b060acdc26ea0597749c5dcac6a05890099b9 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 21:04:19 +0100 Subject: [PATCH 2/9] [deb-arm] Remove entrypoint --- deb-arm/Dockerfile | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/deb-arm/Dockerfile b/deb-arm/Dockerfile index a49862e5..921921fb 100644 --- a/deb-arm/Dockerfile +++ b/deb-arm/Dockerfile @@ -16,7 +16,7 @@ RUN echo "${CURL_AARCH64_SHA256} curl-aarch64" | sha256sum --check FROM ${BASE_IMAGE} # Build Args -ARG GIMME_GO_VERSION=1.19.7 +ARG GO_VERSION=1.19.7 ARG CMAKE_VERSION=3.23.0 ARG CMAKE_SHA256="9f8d42ef0b33d1bea47afe15875435dac58503d6a3b58842b473fd811e6df172" ARG CLANG_VERSION=8.0.0 @@ -79,21 +79,21 @@ RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then \ fi RUN /bin/bash -l -c "gem install bundler --no-document" -# Gimme -RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme -RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check -RUN chmod +x /bin/gimme - -# GIMME_ARCH = GOARCH, so must be a valid entry from `goarchlist` here: -# https://github.com/golang/go/blob/master/src/go/build/syslist.go -# Also see https://github.com/travis-ci/gimme/blob/master/gimme#L880 +# Go RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then \ - GIMME_ARCH=arm64 gimme $GIMME_GO_VERSION ; \ - else \ - GIMME_ARCH=arm gimme $GIMME_GO_VERSION ; \ - fi + curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ + && echo "071ea7bf386fdd08df524859b878d99fc359e491e7ad65c1c1cc55b67972c882 /tmp/golang.tar.gz" | sha256sum --check \ + && tar -C /usr/local -xzf /tmp/golang.tar.gz \ + && rm -f /tmp/golang.tar.gz ; fi + +RUN if [ "$DD_TARGET_ARCH" = "armhf" ] ; then \ + curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-armv6l.tar.gz \ + && echo "93b1f621ddfc2c2b4e383e185fa7801e80f8b546918cb96afea2723677928312 /tmp/golang.tar.gz" | sha256sum --check \ + && tar -C /usr/local -xzf /tmp/golang.tar.gz \ + && rm -f /tmp/golang.tar.gz ; fi -COPY ./gobin.sh /etc/profile.d/ +ENV PATH="/usr/local/go/bin:${PATH}" +ENV PATH="${GOPATH}/bin:${PATH}" # CMake RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then set -ex \ @@ -119,14 +119,5 @@ RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then set -ex \ && /build-gcc.sh \ && rm /build-gcc.sh ; fi -# Entrypoint -COPY ./entrypoint.sh / -RUN chmod +x /entrypoint.sh - -# create the agent build folder within $GOPATH -RUN mkdir -p /go/src/github.com/DataDog/datadog-agent - # Force umask to 0022 RUN echo "umask 0022" >> /root/.bashrc - -ENTRYPOINT ["/entrypoint.sh"] From b1b8ec09586dfe760182a7b0da8d91587f9cdaf3 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 22:26:09 +0100 Subject: [PATCH 3/9] Fix rvm setup --- deb-arm/Dockerfile | 1 + deb-x64/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/deb-arm/Dockerfile b/deb-arm/Dockerfile index 921921fb..d8cef5ab 100644 --- a/deb-arm/Dockerfile +++ b/deb-arm/Dockerfile @@ -78,6 +78,7 @@ RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then \ /bin/bash -l -c "rvm install --with-openssl-dir=${CONDA_PATH} --with-arch='armv7-a' -C '--build' -C 'arm-linux-gnueabihf' 2.7 && rvm cleanup all" ; \ fi RUN /bin/bash -l -c "gem install bundler --no-document" +RUN echo 'source /usr/local/rvm/scripts/rvm' >> /root/.bashrc # Go RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then \ diff --git a/deb-x64/Dockerfile b/deb-x64/Dockerfile index a193ea00..1794a105 100644 --- a/deb-x64/Dockerfile +++ b/deb-x64/Dockerfile @@ -127,6 +127,7 @@ RUN curl -sSL -o get-rvm.sh https://raw.githubusercontent.com/rvm/rvm/1.29.12/bi RUN /bin/bash -l -c "rvm requirements" RUN /bin/bash -l -c "rvm install 2.7 --with-openssl-dir=${CONDA_PATH} && rvm cleanup all" RUN /bin/bash -l -c "gem install bundler --no-document" +RUN echo 'source /usr/local/rvm/scripts/rvm' >> /root/.bashrc # CMake RUN set -ex \ From 3aaa3b62df034367b6c077410f5b0d4d7013e1f3 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 23:50:28 +0100 Subject: [PATCH 4/9] [rpm-x64] Remove entrypoint --- rpm-x64/Dockerfile | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/rpm-x64/Dockerfile b/rpm-x64/Dockerfile index 98641a61..597636b6 100644 --- a/rpm-x64/Dockerfile +++ b/rpm-x64/Dockerfile @@ -13,7 +13,7 @@ ARG BASE_IMAGE # Build Args ARG GIT_VERSION=2.10.1 ARG GIT_SHA256="78553f786f1a66cb68983c170be482558028a3376056c0f2ed366f331b1e35f2" -ARG GIMME_GO_VERSION=1.19.7 +ARG GO_VERSION=1.19.7 ARG IBM_MQ_VERSION=9.2.4.0 ARG IBM_MQ_SHA256="d0d583eba72daf20b3762976f8831c2e23150ace90509520e12f8cda5b5bdb49" ARG CMAKE_VERSION=3.23.0 @@ -37,7 +37,7 @@ ARG GCC_SHA256=ab1974017834430de27fd803ade4389602a7d6ca1362496c57bef384b2a4cb07 ENV GOPATH /go ENV GIT_VERSION $GIT_VERSION ENV GIT_SHA256 $GIT_SHA256 -ENV GIMME_GO_VERSION $GIMME_GO_VERSION +ENV GO_VERSION $GO_VERSION ENV IBM_MQ_VERSION $IBM_MQ_VERSION ENV IBM_MQ_SHA256 $IBM_MQ_SHA256 ENV CMAKE_VERSION $CMAKE_VERSION @@ -163,6 +163,7 @@ RUN curl -sSL -o get-rvm.sh https://raw.githubusercontent.com/rvm/rvm/1.29.12/bi RUN /bin/bash -l -c "rvm requirements" RUN /bin/bash -l -c "rvm install 2.6 --with-openssl-dir=${CONDA_PATH} && rvm cleanup all" RUN /bin/bash -l -c "gem install bundler --no-document" +RUN echo 'source /usr/local/rvm/scripts/rvm' >> /root/.bashrc # Upgrade binutils RUN curl -sL -O "https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.gz" \ @@ -177,13 +178,13 @@ RUN curl -sL -O "https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.t # Override updated linker system-wide RUN ln -sf /usr/local/binutils/bin/ld /usr/bin/ld -# Gimme -RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme -RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check -RUN chmod +x /bin/gimme -RUN gimme $GIMME_GO_VERSION -COPY ./gobin.sh /etc/profile.d/ - +# Go +RUN curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ + && echo "7a75720c9b066ae1750f6bcc7052aba70fa3813f4223199ee2a2315fd3eb533d /tmp/golang.tar.gz" | sha256sum --check \ + && tar -C /usr/local -xzf /tmp/golang.tar.gz \ + && rm -f /tmp/golang.tar.gz +ENV PATH="/usr/local/go/bin:${PATH}" +ENV PATH="${GOPATH}/bin:${PATH}" # IBM MQ RUN mkdir -p /opt/mqm \ @@ -280,14 +281,5 @@ RUN chmod +x /build-gcc.sh \ && /build-gcc.sh \ && rm /build-gcc.sh -# Entrypoint -COPY ./entrypoint.sh / -RUN chmod +x /entrypoint.sh - -# create the agent build folder within $GOPATH -RUN mkdir -p /go/src/github.com/DataDog/datadog-agent - # Force umask to 0022 RUN echo "umask 0022" >> /root/.bashrc - -ENTRYPOINT ["/entrypoint.sh"] From 86bc51d9cbb7528c1f51cf1ad1e489f9cfcb9e95 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 23:51:20 +0100 Subject: [PATCH 5/9] [rpm-arm64] Remove entrypoint --- rpm-arm64/Dockerfile | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/rpm-arm64/Dockerfile b/rpm-arm64/Dockerfile index dac4f779..5a2b5c61 100644 --- a/rpm-arm64/Dockerfile +++ b/rpm-arm64/Dockerfile @@ -10,7 +10,7 @@ RUN echo "${CACERT_BUNDLE_SHA256} /cacert.pem" | sha256sum --check FROM ${BASE_IMAGE} # Build Args -ARG GIMME_GO_VERSION=1.19.7 +ARG GO_VERSION=1.19.7 ARG CMAKE_VERSION=3.23.0 ARG CMAKE_SHA256="9f8d42ef0b33d1bea47afe15875435dac58503d6a3b58842b473fd811e6df172" ARG CLANG_VERSION=8.0.0 @@ -21,7 +21,7 @@ ARG GCC_SHA256=ab1974017834430de27fd803ade4389602a7d6ca1362496c57bef384b2a4cb07 # Environment ENV GOPATH /go -ENV GIMME_GO_VERSION $GIMME_GO_VERSION +ENV GO_VERSION $GO_VERSION ENV CMAKE_VERSION $CMAKE_VERSION ENV CMAKE_SHA256 $CMAKE_SHA256 ENV CLANG_VERSION $CLANG_VERSION @@ -80,13 +80,15 @@ RUN curl -sSL -o get-rvm.sh https://raw.githubusercontent.com/rvm/rvm/1.29.12/bi RUN /bin/bash -l -c "rvm requirements" RUN /bin/bash -l -c "rvm install 2.7 --with-openssl-dir=${CONDA_PATH} && rvm cleanup all" RUN /bin/bash -l -c "gem install bundler --no-document" +RUN echo 'source /usr/local/rvm/scripts/rvm' >> /root/.bashrc -# Gimme -RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme -RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check -RUN chmod +x /bin/gimme -RUN gimme $GIMME_GO_VERSION -COPY ./gobin.sh /etc/profile.d/ +# Go +RUN curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-arm64.tar.gz \ + && echo "071ea7bf386fdd08df524859b878d99fc359e491e7ad65c1c1cc55b67972c882 /tmp/golang.tar.gz" | sha256sum --check \ + && tar -C /usr/local -xzf /tmp/golang.tar.gz \ + && rm -f /tmp/golang.tar.gz +ENV PATH="/usr/local/go/bin:${PATH}" +ENV PATH="${GOPATH}/bin:${PATH}" # CMake RUN set -ex \ @@ -111,14 +113,5 @@ RUN chmod +x /build-gcc.sh \ && /build-gcc.sh \ && rm /build-gcc.sh -# Entrypoint -COPY ./entrypoint.sh / -RUN chmod +x /entrypoint.sh - -# create the agent build folder within $GOPATH -RUN mkdir -p /go/src/github.com/DataDog/datadog-agent - # Force umask to 0022 RUN echo "umask 0022" >> /root/.bashrc - -ENTRYPOINT ["/entrypoint.sh"] From e89ba7b73742bcffa4062138a422cf991b1215d5 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 23:51:43 +0100 Subject: [PATCH 6/9] [rpm-armhf] Remove entrypoint --- rpm-armhf/Dockerfile | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/rpm-armhf/Dockerfile b/rpm-armhf/Dockerfile index 1dc82db1..7e84ba97 100644 --- a/rpm-armhf/Dockerfile +++ b/rpm-armhf/Dockerfile @@ -10,12 +10,12 @@ RUN echo "${CACERT_BUNDLE_SHA256} /cacert.pem" | sha256sum --check FROM ${BASE_IMAGE} # Build Args -ARG GIMME_GO_VERSION=1.19.7 +ARG GO_VERSION=1.19.7 ARG DD_TARGET_ARCH=armhf # Environment ENV GOPATH /go -ENV GIMME_GO_VERSION $GIMME_GO_VERSION +ENV GO_VERSION $GO_VERSION ENV DD_TARGET_ARCH $DD_TARGET_ARCH # configure yum and rpm for running on non-armv7l architectures @@ -81,6 +81,7 @@ RUN curl -sSL -o get-rvm.sh https://raw.githubusercontent.com/rvm/rvm/1.29.12/bi RUN /bin/bash -l -c "rvm requirements" RUN /bin/bash -l -c "rvm install --with-arch='armv7-a' -C '--build' -C 'arm-linux-gnueabihf' 2.7 && rvm cleanup all" RUN /bin/bash -l -c "gem install bundler --no-document" +RUN echo 'source /usr/local/rvm/scripts/rvm' >> /root/.bashrc # Pip & Invoke COPY ./python-packages-versions.txt /python-packages-versions.txt @@ -88,26 +89,13 @@ COPY ./setup_python.sh /setup_python.sh COPY ./requirements.txt ./requirements-py2.txt / RUN ./setup_python.sh -# Gimme -RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme -RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check -RUN chmod +x /bin/gimme - -# GIMME_ARCH = GOARCH, so must be a valid entry from `goarchlist` here: -# https://github.com/golang/go/blob/master/src/go/build/syslist.go -# Also see https://github.com/travis-ci/gimme/blob/master/gimme#L880 -RUN GIMME_ARCH=arm gimme $GIMME_GO_VERSION - -COPY ./gobin.sh /etc/profile.d/ - -# Entrypoint -COPY ./entrypoint.sh / -RUN chmod +x /entrypoint.sh - -# create the agent build folder within $GOPATH -RUN mkdir -p /go/src/github.com/DataDog/datadog-agent +# Go +RUN curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-armv6l.tar.gz \ + && echo "93b1f621ddfc2c2b4e383e185fa7801e80f8b546918cb96afea2723677928312 /tmp/golang.tar.gz" | sha256sum --check \ + && tar -C /usr/local -xzf /tmp/golang.tar.gz \ + && rm -f /tmp/golang.tar.gz +ENV PATH="/usr/local/go/bin:${PATH}" +ENV PATH="${GOPATH}/bin:${PATH}" # Force umask to 0022 RUN echo "umask 0022" >> /root/.bashrc - -ENTRYPOINT ["/entrypoint.sh"] From 615b8c3f5c82a0f389c6870a6d77f3991fd5ab6d Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Tue, 28 Feb 2023 23:54:15 +0100 Subject: [PATCH 7/9] [suse-x64] Remove entrypoint --- suse-x64/Dockerfile | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/suse-x64/Dockerfile b/suse-x64/Dockerfile index df963fc6..1b8d84a3 100644 --- a/suse-x64/Dockerfile +++ b/suse-x64/Dockerfile @@ -14,7 +14,7 @@ RUN echo "${CACERT_BUNDLE_SHA256} /cacert.pem" | sha256sum --check FROM opensuse/archive:42.1 # Build Args -ARG GIMME_GO_VERSION=1.19.7 +ARG GO_VERSION=1.19.7 ARG IBM_MQ_VERSION=9.2.4.0 ARG IBM_MQ_SHA256="d0d583eba72daf20b3762976f8831c2e23150ace90509520e12f8cda5b5bdb49" ARG CMAKE_VERSION=3.23.0 @@ -31,7 +31,7 @@ ARG GCC_SHA256=ab1974017834430de27fd803ade4389602a7d6ca1362496c57bef384b2a4cb07 # Environment ENV GOPATH /go -ENV GIMME_GO_VERSION $GIMME_GO_VERSION +ENV GO_VERSION $GO_VERSION ENV IBM_MQ_VERSION $IBM_MQ_VERSION ENV IBM_MQ_SHA256 $IBM_MQ_SHA256 ENV CMAKE_VERSION $CMAKE_VERSION @@ -46,8 +46,6 @@ ENV GCC_VERSION $GCC_VERSION ENV PATH="/opt/datadog/bin:${PATH}" -# Add our profile to the image that adds RVM and Conda to environment -COPY ./suse-x64/ddprofile.sh /etc/profile.d/ # Add /etc/profile to the image (taken from 42.3 image) -- it is missing from 42.1 the image COPY ./suse-x64/profile /etc/profile @@ -84,12 +82,13 @@ COPY --from=CURL_GETTER /cacert.pem /etc/ssl/certs/ca-certificates.crt COPY --from=CURL_GETTER /curl-amd64 /opt/datadog/bin/curl RUN chmod +x /opt/datadog/bin/curl -# Gimme -RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.5.4/gimme -RUN echo "03b295636d4e22870b6f6e9bc06a71d65311ae90d3d48cbc7071f82dd5837fbc /bin/gimme" | sha256sum --check -RUN chmod +x /bin/gimme -RUN gimme $GIMME_GO_VERSION -COPY ./gobin.sh /etc/profile.d/ +# Go +RUN curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ + && echo "7a75720c9b066ae1750f6bcc7052aba70fa3813f4223199ee2a2315fd3eb533d /tmp/golang.tar.gz" | sha256sum --check \ + && tar -C /usr/local -xzf /tmp/golang.tar.gz \ + && rm -f /tmp/golang.tar.gz +ENV PATH="/usr/local/go/bin:${PATH}" +ENV PATH="${GOPATH}/bin:${PATH}" # Add systemd headers COPY ./rpm-headers/systemd /usr/include/systemd @@ -121,6 +120,7 @@ RUN curl -sSL -o get-rvm.sh https://raw.githubusercontent.com/rvm/rvm/1.29.12/bi RUN bash -l -c "rvm autolibs disable" # do not try to fetch requirements from system repos RUN bash -l -c "rvm install 2.7 --with-openssl-dir=${CONDA_PATH} && rvm cleanup all" RUN bash -l -c "gem install bundler --no-document" +RUN echo 'source /usr/local/rvm/scripts/rvm' >> /root/.bashrc # CMake RUN set -ex \ @@ -172,14 +172,6 @@ RUN curl -sL -o /tmp/rpm-4.14.3.tar.bz2 http://ftp.rpm.org/releases/rpm-4.14.x/r RUN mkdir -p /usr/local/var/lib/rpm \ && cp /var/lib/rpm/Packages /usr/local/var/lib/rpm/Packages \ && /usr/local/bin/rpm --rebuilddb -# Entrypoint -COPY ./entrypoint.sh / -RUN chmod +x /entrypoint.sh - -# create the agent build folder within $GOPATH -RUN mkdir -p /go/src/github.com/DataDog/datadog-agent # Force umask to 0022 RUN echo "umask 0022" >> /root/.bashrc - -ENTRYPOINT ["/entrypoint.sh"] From e1a1bf4500e2a9817202ddc6aee50670af6fe374 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Wed, 1 Mar 2023 10:30:29 +0100 Subject: [PATCH 8/9] Remove unused line in test jobs --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85540fe2..f1475007 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -230,7 +230,7 @@ trigger_build_kernels: - git clone -b $AGENT_TESTING_BRANCH https://github.com/DataDog/datadog-agent /go/src/github.com/DataDog/datadog-agent - cd /go/src/github.com/DataDog/datadog-agent - VERSION="nightly" - - source /root/.bashrc && conda activate ddpy3 + - source /root/.bashrc - inv -e deps script: - inv -e agent.omnibus-build --release-version "$VERSION" --major-version "6" --python-runtimes "2,3" --base-dir /.omnibus --skip-deps From 572a6624a6ed485892da829c24218f82672cc696 Mon Sep 17 00:00:00 2001 From: Kylian Serrania Date: Wed, 1 Mar 2023 13:59:30 +0100 Subject: [PATCH 9/9] [deb-x64] Fix go path setup --- deb-x64/Dockerfile | 3 +++ setup_go.sh | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deb-x64/Dockerfile b/deb-x64/Dockerfile index 1794a105..aa008f43 100644 --- a/deb-x64/Dockerfile +++ b/deb-x64/Dockerfile @@ -160,6 +160,9 @@ RUN curl -Sl -O https://dd-agent-omnibus.s3.amazonaws.com/kernel-4.9-headers-deb COPY ./setup_go.sh /setup_go.sh RUN ./setup_go.sh +ENV PATH="/goroot/bin:$PATH" +ENV PATH="/go/bin:$PATH" + # Download and install golangci-lint RUN curl -sSfL -o golangci-lint-install.sh https://raw.githubusercontent.com/golangci/golangci-lint/v1.44.2/install.sh \ && echo "1c2edb726aad6bf7d260d95c370bd9ec0fb1a8651e6db6f77f250dd66067de0c golangci-lint-install.sh" | sha256sum --check \ diff --git a/setup_go.sh b/setup_go.sh index 740ccdfc..4c7a526e 100755 --- a/setup_go.sh +++ b/setup_go.sh @@ -42,9 +42,6 @@ ln -sf /usr/local/binutils/bin/ld /usr/bin/ld ./all.bash -# Update PATH to include the built go binaries -echo 'export PATH="/goroot/bin:$PATH"' >> /root/.bashrc - # Remove gimme rm -rf $HOME/.gimme rm /bin/gimme