diff --git a/.gitlab/Dockerfile b/.devcontainer/Dockerfile similarity index 100% rename from .gitlab/Dockerfile rename to .devcontainer/Dockerfile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..5c34a2a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "httpd-datadog", + "build": { + "dockerfile": "Dockerfile", + "context": "..", + "args": { + "ARCH": "${localEnv:ARCH:x86_64}" + } + } +} diff --git a/.devcontainer/devcontainer.mk b/.devcontainer/devcontainer.mk new file mode 100644 index 0000000..fd9b7c1 --- /dev/null +++ b/.devcontainer/devcontainer.mk @@ -0,0 +1,118 @@ +DEV_CONTAINER_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +DEV_CONTAINER_REPO_ROOT := $(abspath $(DEV_CONTAINER_DIR)/..) + +# When running inside the container, tools are available directly. +# Check for /.dockerenv (Docker) or KUBERNETES_SERVICE_HOST (Kubernetes CI). +ifneq ($(or $(wildcard /.dockerenv),$(KUBERNETES_SERVICE_HOST)),) + +DEVCONTAINER_RUN := + +.PHONY: dev-image +dev-image: + @true + +else + +# Fail fast with actionable guidance if deps/nginx-datadog isn't populated — +# without this check, the DEV_CONTAINER_HASH `find` below emits warnings and +# silently hashes an incomplete input set, producing a tag that doesn't +# match what CI computed and triggering confusing pull-then-fall-back-to- +# build behavior. +ifeq ($(wildcard $(DEV_CONTAINER_REPO_ROOT)/deps/nginx-datadog/build_env/Toolchain.cmake.x86_64),) +$(error deps/nginx-datadog submodule is not initialized. Run: git submodule update --init --recursive) +endif + +DEV_CONTAINER_REGISTRY ?= registry.ddbuild.io +DEV_CONTAINER_IMAGE_NAME ?= $(DEV_CONTAINER_REGISTRY)/ci/httpd-datadog + +# Match the hash computation in .gitlab/devcontainer.yml (devcontainer-image +# job): sha256 over .devcontainer/Dockerfile, deps/nginx-datadog/build_env/, +# and scripts/setup-httpd.py. +DEV_CONTAINER_HASH := $(shell cd $(DEV_CONTAINER_REPO_ROOT) && \ + find .devcontainer/Dockerfile deps/nginx-datadog/build_env/ scripts/setup-httpd.py -type f | sort | \ + while IFS= read -r f; do echo "--- $$f ---"; cat "$$f"; done | \ + (command -v sha256sum >/dev/null 2>&1 && sha256sum || shasum -a 256) | cut -d' ' -f1) + +DEV_CONTAINER_TAG := $(DEV_CONTAINER_HASH) +DEV_CONTAINER_IMAGE := $(DEV_CONTAINER_IMAGE_NAME):$(DEV_CONTAINER_TAG) + +# Map host arch (uname -m) to the Dockerfile's ARCH build-arg. +DEV_CONTAINER_HOST_ARCH := $(shell uname -m) +ifeq ($(DEV_CONTAINER_HOST_ARCH),arm64) +DEV_CONTAINER_ARCH := aarch64 +DEV_CONTAINER_PLATFORM := linux/arm64 +else ifeq ($(DEV_CONTAINER_HOST_ARCH),aarch64) +DEV_CONTAINER_ARCH := aarch64 +DEV_CONTAINER_PLATFORM := linux/arm64 +else +DEV_CONTAINER_ARCH := x86_64 +DEV_CONTAINER_PLATFORM := linux/amd64 +endif + +# For git worktrees, .git is a file pointing to a gitdir outside the repo root; +# bind-mount the git common-dir so `git` works inside the container. +DEV_CONTAINER_GIT_COMMON_DIR := $(shell cd $(DEV_CONTAINER_REPO_ROOT) && git rev-parse --path-format=absolute --git-common-dir 2>/dev/null) +ifneq ($(DEV_CONTAINER_GIT_COMMON_DIR),) +ifneq ($(DEV_CONTAINER_GIT_COMMON_DIR),$(DEV_CONTAINER_REPO_ROOT)/.git) +DEV_CONTAINER_GIT_MOUNT := -v $(DEV_CONTAINER_GIT_COMMON_DIR):$(DEV_CONTAINER_GIT_COMMON_DIR) +endif +endif + +DEVCONTAINER_RUN = docker run --rm \ + -v $(DEV_CONTAINER_REPO_ROOT):$(DEV_CONTAINER_REPO_ROOT) \ + $(DEV_CONTAINER_GIT_MOUNT) \ + -w $(DEV_CONTAINER_REPO_ROOT) \ + $(DEV_CONTAINER_IMAGE) + +# Ensure the dev container image is available locally. Prefer pulling from the +# registry (CI builds every tagged hash); fall back to a local build. +# Stale images with different tags are removed first. +.PHONY: dev-image +dev-image: + @if ! docker image inspect $(DEV_CONTAINER_IMAGE) >/dev/null 2>&1; then \ + stale=$$(docker images --format '{{.Repository}}:{{.Tag}}' $(DEV_CONTAINER_IMAGE_NAME) 2>/dev/null | grep -v ':$(DEV_CONTAINER_TAG)$$' || true); \ + if [ -n "$$stale" ]; then \ + echo "Removing stale dev container image(s): $$stale"; \ + docker rmi $$stale || true; \ + fi; \ + if docker pull $(DEV_CONTAINER_IMAGE) >/dev/null 2>&1; then \ + echo "Pulled $(DEV_CONTAINER_IMAGE)"; \ + else \ + echo "Building dev container image $(DEV_CONTAINER_IMAGE)..."; \ + docker buildx build \ + --platform $(DEV_CONTAINER_PLATFORM) \ + --build-arg ARCH=$(DEV_CONTAINER_ARCH) \ + --load \ + -t $(DEV_CONTAINER_IMAGE) \ + -f $(DEV_CONTAINER_REPO_ROOT)/.devcontainer/Dockerfile \ + $(DEV_CONTAINER_REPO_ROOT); \ + fi; \ + fi + +.PHONY: dev-shell +dev-shell: dev-image + docker run --rm -it \ + -v $(DEV_CONTAINER_REPO_ROOT):$(DEV_CONTAINER_REPO_ROOT) \ + $(DEV_CONTAINER_GIT_MOUNT) \ + -w $(DEV_CONTAINER_REPO_ROOT) \ + $(DEV_CONTAINER_IMAGE) \ + /bin/sh + +.PHONY: dev-image-clean +dev-image-clean: + @stale=$$(docker images --format '{{.Repository}}:{{.Tag}}' $(DEV_CONTAINER_IMAGE_NAME) 2>/dev/null | grep -v ':$(DEV_CONTAINER_TAG)$$' || true); \ + if [ -n "$$stale" ]; then \ + echo "Removing stale dev container image(s): $$stale"; \ + docker rmi $$stale; \ + else \ + echo "No stale dev container images found."; \ + fi + +endif + +# Always-available targets: $(DEVCONTAINER_RUN) is empty inside the container +# (the script runs directly) and `docker run …` outside, so one definition +# works in both modes. +.PHONY: test-integration +test-integration: dev-image + $(DEVCONTAINER_RUN) .devcontainer/run-integration-tests.sh diff --git a/.devcontainer/run-integration-tests.sh b/.devcontainer/run-integration-tests.sh new file mode 100755 index 0000000..84579ac --- /dev/null +++ b/.devcontainer/run-integration-tests.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# Build mod_datadog (with RUM) and run the full integration-test suite. +# Assumes it runs inside the devcontainer image (Alpine + musl sysroot + httpd +# at /httpd/httpd-build/ + uv). +# +# If MODULE_PATH is set in the environment, the cmake build is skipped and +# pytest is pointed at the pre-built module at that path. CI uses this to +# reuse the artifact produced by the build:$ARCH job instead of rebuilding +# from source inside the test job. +set -eux + +REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" +cd "$REPO_ROOT" + +ARCH="$(uname -m)" + +# Use a container-specific build tree to avoid colliding with host builds +# (host cmake would use Unix Makefiles; the ci-release preset uses Ninja). +BUILD_DIR="$REPO_ROOT/build-container" +DIST_DIR="$REPO_ROOT/dist-container" + +# Repo root is bind-mounted from the host; cmake complains otherwise. +git config --global --add safe.directory "$REPO_ROOT" + +if [ -z "${MODULE_PATH:-}" ]; then + cmake --preset=ci-release \ + -DHTTPD_DATADOG_ENABLE_RUM=ON \ + -DCMAKE_TOOLCHAIN_FILE="/sysroot/${ARCH}-none-linux-musl/Toolchain.cmake" \ + -B "$BUILD_DIR" . + cmake --build "$BUILD_DIR" -j + cmake --install "$BUILD_DIR" --prefix "$DIST_DIR" + MODULE_PATH="$DIST_DIR/lib/mod_datadog.so" +fi + +cd test/integration-test + +# Keep the venv outside the bind-mounted repo so a host-side `uv sync` +# (darwin/arm64 wheels) can't shadow the container's Linux one. +export UV_PROJECT_ENVIRONMENT=/root/.venv-httpd-datadog-tests + +uv sync + +# Pytest's early arg parser runs BEFORE conftest registers `--bin-path`. +# If we pass `--bin-path VALUE` (space-separated), that parser treats the +# value as a positional test path and uses its parent as rootdir, which +# then prevents conftest from loading. The `=` syntax keeps the option and +# its value in a single token and avoids that race. +uv run pytest \ + --bin-path=/httpd/httpd-build/bin/apachectl \ + --module-path="$MODULE_PATH" \ + --log-dir="$REPO_ROOT/logs" \ + -v "$@" diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 8fcd549..7c4bf54 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -19,7 +19,10 @@ jobs: needs: format runs-on: ubuntu-22.04 container: - # See in Makefile where this image comes from. + # Public mirror of the GitLab-built image defined in .devcontainer/Dockerfile + # (hash-computed by .gitlab/devcontainer.yml). Bump by copying a newer tag + # via `docker pull registry.ddbuild.io/ci/httpd-datadog: && docker tag + # ... && docker push datadog/docker-library:httpd-datadog-ci-`. image: datadog/docker-library:httpd-datadog-ci-28219c0ef3e00f1e3d5afcab61a73a5e9bd2a9b957d7545556711cce2a6262cd steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -44,7 +47,10 @@ jobs: needs: build runs-on: ubuntu-22.04 container: - # See in Makefile where this image comes from. + # Public mirror of the GitLab-built image defined in .devcontainer/Dockerfile + # (hash-computed by .gitlab/devcontainer.yml). Bump by copying a newer tag + # via `docker pull registry.ddbuild.io/ci/httpd-datadog: && docker tag + # ... && docker push datadog/docker-library:httpd-datadog-ci-`. image: datadog/docker-library:httpd-datadog-ci-28219c0ef3e00f1e3d5afcab61a73a5e9bd2a9b957d7545556711cce2a6262cd env: DD_ENV: ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a7539b..db5a214 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,10 @@ jobs: build: runs-on: ubuntu-22.04 container: - # See in Makefile where this image comes from. + # Public mirror of the GitLab-built image defined in .devcontainer/Dockerfile + # (hash-computed by .gitlab/devcontainer.yml). Bump by copying a newer tag + # via `docker pull registry.ddbuild.io/ci/httpd-datadog: && docker tag + # ... && docker push datadog/docker-library:httpd-datadog-ci-`. image: datadog/docker-library:httpd-datadog-ci-28219c0ef3e00f1e3d5afcab61a73a5e9bd2a9b957d7545556711cce2a6262cd steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 72414ee..3b87ccb 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -19,7 +19,10 @@ jobs: build-artifacts: runs-on: ubuntu-22.04 container: - # See in Makefile where this image comes from. + # Public mirror of the GitLab-built image defined in .devcontainer/Dockerfile + # (hash-computed by .gitlab/devcontainer.yml). Bump by copying a newer tag + # via `docker pull registry.ddbuild.io/ci/httpd-datadog: && docker tag + # ... && docker push datadog/docker-library:httpd-datadog-ci-`. image: datadog/docker-library:httpd-datadog-ci-28219c0ef3e00f1e3d5afcab61a73a5e9bd2a9b957d7545556711cce2a6262cd steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 diff --git a/.gitignore b/.gitignore index 75feb22..92a9c5e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,10 +23,13 @@ compile_commands.json __pycache__/ +build-container/ build-rum/ build/ +dist-container/ httpd-*/ httpd/ +/logs/ venv/ test/integration-test/.coverage diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a328df..84d9753 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,6 @@ +include: + - local: .gitlab/devcontainer.yml + variables: CI_DOCKER_IMAGE_BASE: registry.ddbuild.io/ci/httpd-datadog GIT_SUBMODULE_STRATEGY: recursive @@ -20,7 +23,7 @@ stages: # Template jobs (hidden, reusable) .build-template: stage: build - image: $CI_DOCKER_IMAGE_BASE:$CI_IMAGE_HASH + image: $DEVCONTAINER_IMAGE script: - git config --global --add safe.directory $PWD - > @@ -42,97 +45,23 @@ stages: .test-rum-template: stage: test - image: $CI_DOCKER_IMAGE_BASE:$CI_IMAGE_HASH - script: - - cd $CI_PROJECT_DIR/test/integration-test && uv sync && uv run pytest scenarios --module-path $CI_PROJECT_DIR/artifacts/$ARCH/mod_datadog.so --bin-path /httpd/httpd-build/bin/apachectl --log-dir $CI_PROJECT_DIR/logs -m requires_rum -v - -build-ci-image: - stage: ci-image - tags: ["arch:$ARCH"] - image: registry.ddbuild.io/images/docker:27.3.1 - parallel: - matrix: - - ARCH: amd64 - TOOLCHAIN_ARCH: x86_64 - - ARCH: arm64 - TOOLCHAIN_ARCH: aarch64 + image: $DEVCONTAINER_IMAGE + # Same `--flag=VALUE` reasoning as run-integration-tests.sh: pytest's early + # arg parser runs before conftest registers these custom options, so the + # space-separated form gets read as a positional test path and skips + # conftest. script: - - | - FILES=$(find .gitlab/Dockerfile deps/nginx-datadog/build_env/ scripts/setup-httpd.py -type f | sort) - HASH=$(for f in $FILES; do echo "--- $f ---"; cat "$f"; done | sha256sum | cut -d ' ' -f 1) - - echo "CI_IMAGE_HASH=$HASH" >> ci-image.env - - IMAGE_TAG="$CI_DOCKER_IMAGE_BASE/$ARCH:$HASH" - - | - if docker buildx imagetools inspect "$IMAGE_TAG" > /dev/null 2>&1; then - echo "Image $IMAGE_TAG already exists. Skipping build." - else - docker buildx build \ - --tag $IMAGE_TAG \ - --platform linux/$ARCH \ - --build-arg ARCH=$TOOLCHAIN_ARCH \ - --push \ - --file .gitlab/Dockerfile \ - . - echo "Image $IMAGE_TAG built for $ARCH." - fi - artifacts: - reports: - dotenv: ci-image.env - -create-ci-manifest: - stage: ci-image - needs: - - build-ci-image - tags: ["arch:amd64"] - image: registry.ddbuild.io/images/docker:27.3.1 - script: - - MANIFEST_TAG="$CI_DOCKER_IMAGE_BASE:$CI_IMAGE_HASH" - - | - if docker buildx imagetools inspect "$MANIFEST_TAG" > /dev/null 2>&1; then - echo "Multi-arch manifest $MANIFEST_TAG already exists. Skipping." - else - docker buildx imagetools create \ - --tag "$MANIFEST_TAG" \ - "$CI_DOCKER_IMAGE_BASE/amd64:$CI_IMAGE_HASH" \ - "$CI_DOCKER_IMAGE_BASE/arm64:$CI_IMAGE_HASH" - fi - -nydusify-ci-image: - stage: ci-image - needs: - - build-ci-image - - create-ci-manifest - allow_failure: true - tags: ["arch:amd64"] - image: registry.ddbuild.io/images/nydus:v98111448-6d7c7d0-v2.3.8-dd - variables: - DDSIGN_SKIP_SIGNING: "true" - script: - - | - IMAGE="$CI_DOCKER_IMAGE_BASE:$CI_IMAGE_HASH" - REPO="${IMAGE%:*}" - - # Resolve a platform manifest digest from the multi-arch index - DIGEST=$(crane manifest "$IMAGE" 2>/dev/null | jq -r '(.manifests // [])[0].digest // empty' 2>/dev/null) - if [ -n "$DIGEST" ]; then - MANIFEST=$(crane manifest "${REPO}@${DIGEST}" 2>/dev/null) - else - MANIFEST=$(crane manifest "$IMAGE" 2>/dev/null) - fi - - # Check if the platform manifest already contains nydus layers - if echo "$MANIFEST" | jq -e '[.layers[].mediaType] | any(contains("nydus"))' > /dev/null 2>&1; then - echo "$IMAGE is already nydusified. Skipping." - else - echo "Converting $IMAGE with nydusify..." - nydus-convert "$IMAGE" "$IMAGE" - fi + - cd $CI_PROJECT_DIR/test/integration-test && uv sync && uv run pytest scenarios --module-path=$CI_PROJECT_DIR/artifacts/$ARCH/mod_datadog.so --bin-path=/httpd/httpd-build/bin/apachectl --log-dir=$CI_PROJECT_DIR/logs -m requires_rum -v build:amd64: extends: .build-template needs: - - build-ci-image - - create-ci-manifest + - job: devcontainer-image + parallel: + matrix: + - ARCH: amd64 + TOOLCHAIN_ARCH: x86_64 + artifacts: true variables: ARCH: amd64 TOOLCHAIN_ARCH: x86_64 @@ -141,8 +70,12 @@ build:amd64: build:arm64: extends: .build-template needs: - - build-ci-image - - create-ci-manifest + - job: devcontainer-image + parallel: + matrix: + - ARCH: arm64 + TOOLCHAIN_ARCH: aarch64 + artifacts: true variables: ARCH: arm64 TOOLCHAIN_ARCH: aarch64 @@ -151,7 +84,12 @@ build:arm64: test-rum:amd64: extends: .test-rum-template needs: - - build-ci-image + - job: devcontainer-image + parallel: + matrix: + - ARCH: amd64 + TOOLCHAIN_ARCH: x86_64 + artifacts: true - job: "build:amd64" variables: ARCH: amd64 @@ -160,7 +98,12 @@ test-rum:amd64: test-rum:arm64: extends: .test-rum-template needs: - - build-ci-image + - job: devcontainer-image + parallel: + matrix: + - ARCH: arm64 + TOOLCHAIN_ARCH: aarch64 + artifacts: true - job: "build:arm64" variables: ARCH: arm64 diff --git a/.gitlab/devcontainer.yml b/.gitlab/devcontainer.yml new file mode 100644 index 0000000..8f0f464 --- /dev/null +++ b/.gitlab/devcontainer.yml @@ -0,0 +1,89 @@ +--- +# Build pipeline for the devcontainer image used by every downstream CI +# job that compiles mod_datadog or runs integration tests. The image is +# content-addressed: its tag is a sha256 over the Dockerfile plus the +# upstream toolchain files it pulls from, so the jobs here only rebuild +# when one of those inputs actually changes. + +variables: + NYDUS_DD_IMAGE: registry.ddbuild.io/images/nydus:v98111448-6d7c7d0-v2.3.8-dd + +# Build (or reuse) the devcontainer image per arch: hash the inputs, skip if +# the registry already has the tag, otherwise buildx build + push + nydusify +# in-place. The nydusified per-arch images are then stitched into a +# multi-arch manifest by `create-ci-manifest` below. +devcontainer-image: + stage: ci-image + tags: ["arch:$ARCH"] + image: $NYDUS_DD_IMAGE + variables: + DDSIGN_SKIP_SIGNING: "true" + parallel: + matrix: + - ARCH: amd64 + TOOLCHAIN_ARCH: x86_64 + - ARCH: arm64 + TOOLCHAIN_ARCH: aarch64 + script: + - | + FILES=$(find .devcontainer/Dockerfile deps/nginx-datadog/build_env/ scripts/setup-httpd.py -type f | sort) + HASH=$(for f in $FILES; do echo "--- $f ---"; cat "$f"; done | sha256sum | cut -d ' ' -f 1) + - IMAGE_TAG="$CI_DOCKER_IMAGE_BASE/$ARCH:$HASH" + - echo "CI_IMAGE_HASH=$HASH" >> ci-image.env + # Export DEVCONTAINER_IMAGE as the arch-specific ref so each consumer + # runs on its own arch's image without blocking on create-ci-manifest. + # Downstream jobs scope their `needs:` to their matrix slot to pick up + # the matching value. + - echo "DEVCONTAINER_IMAGE=$IMAGE_TAG" >> ci-image.env + - | + if crane manifest "$IMAGE_TAG" >/dev/null 2>&1; then + echo "Image $IMAGE_TAG already exists. Skipping build." + else + docker buildx build \ + --tag "$IMAGE_TAG" \ + --platform linux/$ARCH \ + --build-arg ARCH=$TOOLCHAIN_ARCH \ + --push \ + --file .devcontainer/Dockerfile \ + . + echo "Image $IMAGE_TAG built for $ARCH." + fi + - | + MANIFEST=$(crane manifest "$IMAGE_TAG" 2>/dev/null) || { + echo "WARNING: failed to fetch manifest for $IMAGE_TAG — skipping nydus conversion" + exit 0 + } + if echo "$MANIFEST" | jq -e '[.layers[].mediaType] | any(contains("nydus"))' >/dev/null 2>&1; then + echo "$IMAGE_TAG already has nydus layers. Skipping conversion." + else + echo "Converting $IMAGE_TAG to nydus in place..." + nydus-convert "$IMAGE_TAG" "$IMAGE_TAG" || \ + echo "WARNING: nydus conversion failed — continuing without nydus layers" + fi + artifacts: + reports: + dotenv: ci-image.env + +# Combine the per-arch (nydusified) images into a single multi-arch manifest +# at $CI_DOCKER_IMAGE_BASE:$CI_IMAGE_HASH so external consumers (other +# pipelines, GitHub Actions) can pin by the bare tag. Internal build/test +# jobs reference the per-arch image directly via $DEVCONTAINER_IMAGE and +# don't wait for this job. +create-ci-manifest: + stage: ci-image + needs: + - devcontainer-image + tags: ["arch:amd64"] + image: $NYDUS_DD_IMAGE + script: + - MANIFEST_TAG="$CI_DOCKER_IMAGE_BASE:$CI_IMAGE_HASH" + - | + if crane manifest "$MANIFEST_TAG" >/dev/null 2>&1 && \ + docker buildx imagetools inspect "$MANIFEST_TAG" --format '{{json .Manifest}}' 2>/dev/null | jq -e '.manifests | length >= 2' >/dev/null 2>&1; then + echo "Multi-arch manifest $MANIFEST_TAG already exists. Skipping." + else + docker buildx imagetools create \ + --tag "$MANIFEST_TAG" \ + "$CI_DOCKER_IMAGE_BASE/amd64:$CI_IMAGE_HASH" \ + "$CI_DOCKER_IMAGE_BASE/arm64:$CI_IMAGE_HASH" + fi diff --git a/Makefile b/Makefile index 4360495..3b5374c 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1 @@ -# The CI image used for some GitHub jobs is built by the GitLab build-ci-image job. -# The hash is computed by this GitLab job from the files used to build the image. -# -# Whenever this image needs to be updated, one should: -# - Get the hash from a run of the GitLab build-ci-image job. -# - Copy this hash here, and in the GitHub workflow files. -# - Run: make replicate-ci-image-for-github. - -CI_DOCKER_IMAGE_HASH ?= 28219c0ef3e00f1e3d5afcab61a73a5e9bd2a9b957d7545556711cce2a6262cd -CI_IMAGE_FROM_GITLAB ?= registry.ddbuild.io/ci/httpd-datadog/amd64:$(CI_DOCKER_IMAGE_HASH) -CI_IMAGE_IN_PUBLIC_REPO_FOR_GITHUB ?= datadog/docker-library:httpd-datadog-ci-$(CI_DOCKER_IMAGE_HASH) - -.PHONY: replicate-ci-image-for-github -replicate-ci-image-for-github: - docker pull $(CI_IMAGE_FROM_GITLAB) - docker tag $(CI_IMAGE_FROM_GITLAB) $(CI_IMAGE_IN_PUBLIC_REPO_FOR_GITHUB) - docker push $(CI_IMAGE_IN_PUBLIC_REPO_FOR_GITHUB) +include .devcontainer/devcontainer.mk