Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion local_tests/golang/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module app

go 1.20
go 1.22

require (
github.com/DataDog/datadog-lambda-go v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/Dockerfile.alpine.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG CMD_PATH
ARG BUILD_TAGS

RUN apk add --no-cache git make musl-dev gcc
COPY --from=golang:1.21-alpine /usr/local/go/ /usr/lib/go
COPY --from=golang:1.22-alpine /usr/local/go/ /usr/lib/go

ENV GOROOT /usr/lib/go
ENV GOPATH /go
Expand All @@ -29,7 +29,7 @@ WORKDIR /tmp/dd/datadog-agent/"${CMD_PATH}"
# add the current version number to the tags package before compilation

RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/.cache/go-build \
/usr/lib/go/bin/go build -ldflags="-w \
-X github.com/DataDog/datadog-agent/pkg/serverless/tags.currentExtensionVersion=$EXTENSION_VERSION" \
-tags "${BUILD_TAGS}" -o datadog-agent;
Expand Down
4 changes: 2 additions & 2 deletions scripts/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RUN arch="$(uname -m)"; \
if [ "${arch}" = 'x86_64' ]; then \
arch='amd64'; \
fi; \
wget -O go1.21.9.linux-${arch}.tar.gz https://go.dev/dl/go1.21.9.linux-${arch}.tar.gz; \
tar -C /usr/local -xzf go1.21.9.linux-${arch}.tar.gz
wget -O go1.22.5.linux-${arch}.tar.gz https://go.dev/dl/go1.22.5.linux-${arch}.tar.gz; \
tar -C /usr/local -xzf go1.22.5.linux-${arch}.tar.gz

# cache dependencies
COPY ./scripts/.cache/go.mod /tmp/dd/datadog-agent
Expand Down
2 changes: 1 addition & 1 deletion scripts/Dockerfile.race.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:experimental

FROM golang:1.21 as builder
FROM golang:1.22 as builder
ARG EXTENSION_VERSION
ARG ENABLE_RACE_DETECTION
ARG AGENT_VERSION
Expand Down
6 changes: 3 additions & 3 deletions scripts_v2/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ RUN arch="$(uname -m)"; \
if [ "${arch}" = 'x86_64' ]; then \
arch='amd64'; \
fi; \
wget -O go1.21.7.linux-${arch}.tar.gz https://go.dev/dl/go1.21.7.linux-${arch}.tar.gz; \
tar -C /usr/local -xzf go1.21.7.linux-${arch}.tar.gz
wget -O go1.22.5.linux-${arch}.tar.gz https://go.dev/dl/go1.22.5.linux-${arch}.tar.gz; \
tar -C /usr/local -xzf go1.22.5.linux-${arch}.tar.gz

RUN mkdir -p /tmp/dd

Expand All @@ -26,7 +26,7 @@ WORKDIR /tmp/dd/datadog-agent/"${CMD_PATH}"
# add the current version number to the tags package before compilation

RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/.cache/go-build \
if [ -z "$AGENT_VERSION" ]; then \
/usr/local/go/bin/go build -ldflags="-w \
-X github.com/DataDog/datadog-agent/pkg/serverless/tags.currentExtensionVersion=$EXTENSION_VERSION" \
Expand Down