From 2d23287ae4db5b45f3d3fe26915da79fb0b35073 Mon Sep 17 00:00:00 2001 From: Alexandre Menasria Date: Tue, 3 Dec 2024 10:07:13 +0100 Subject: [PATCH] [CI] Remove last CircleCI bits --- .github/CODEOWNERS | 3 -- .gitlab-ci.yml | 79 ---------------------------------- circleci/Dockerfile | 100 -------------------------------------------- 3 files changed, 182 deletions(-) delete mode 100644 circleci/Dockerfile diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 01fe97aa..6ad9539f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -29,9 +29,6 @@ tasks/update_go.py @DataDog/agent-shared-components /system-probe_arm64/ @DataDog/ebpf-platform @DataDog/agent-devx-infra /system-probe_x64/ @DataDog/ebpf-platform @DataDog/agent-devx-infra -# CircleCI image -/circleci/ @DataDog/agent-devx-loops @DataDog/agent-devx-infra - # Linux test & build images /deb-arm/ @DataDog/agent-devx-loops @DataDog/agent-delivery @DataDog/agent-devx-infra /deb-x64/ @DataDog/agent-devx-loops @DataDog/agent-delivery @DataDog/agent-devx-infra diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1462d53..d5b577d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -290,33 +290,6 @@ build_kernel_version_testing_arm64: DOCKERFILE: kernel-version-testing/kernel-version-testing_arm64/Dockerfile IMAGE: kernel-version-testing_arm64 -build_circleci_runner: - extends: [.x64] - stage: build - rules: - - if: $CI_COMMIT_TAG == null - variables: - DOCKERFILE: circleci/Dockerfile - IMAGE: circleci-runner - script: - # Dockerhub login - - DOCKER_REGISTRY_LOGIN=$(aws ssm get-parameter --region us-east-1 --name ci.datadog-agent.docker_hub_login --with-decryption --query "Parameter.Value" --out text) - - aws ssm get-parameter --region us-east-1 --name ci.datadog-agent.docker_hub_pwd --with-decryption --query "Parameter.Value" --out text | docker login --username "$DOCKER_REGISTRY_LOGIN" --password-stdin docker.io - # Build - - GO_BUILD_ARGS=$(cat go.env | sed -e 's/^/--build-arg /' | tr '\n' ' ') - - docker build --build-arg BASE_IMAGE=$BASE_IMAGE --build-arg DD_TARGET_ARCH=$DD_TARGET_ARCH $GO_BUILD_ARGS $CUSTOM_BUILD_ARGS --tag datadog/agent-buildimages-${IMAGE}${ECR_TEST_ONLY}:$IMAGE_VERSION --file $DOCKERFILE . - - | - if [ "$CI_PIPELINE_SOURCE" != "schedule" ]; then - docker push datadog/agent-buildimages-${IMAGE}${ECR_TEST_ONLY}:$IMAGE_VERSION - fi - after_script: - - if [ "${CI_JOB_STATUS}" != 'success' ]; then echo -e "\033[0;32m\033[1mBuild failed.\033[0m"; exit 0; fi - - | - if [ "$CI_PIPELINE_SOURCE" != "schedule" ]; then - echo -e "\033[0;32m\033[1mImage datadog/agent-buildimages-${IMAGE}${ECR_TEST_ONLY}:$IMAGE_VERSION is available.\033[0m" - else - echo -e "\033[0;33m\033[1mScheduled pipeline, image push skipped.\033[0m" - fi build_gitlab_agent_deploy: extends: [.build, .x64] @@ -513,58 +486,6 @@ release_windows: - IMAGE: windows_ltsc2022_x64 DOCKERHUB_TAG_PREFIX: ltsc2022 -release_circleci_runner: - stage: release - needs: ["build_circleci_runner"] - variables: - IMAGE: circleci-runner - rules: - - !reference [.on_default_branch_push] - tags: ["arch:amd64"] - image: "${CI_IMAGE}" - script: - - DOCKER_REGISTRY_LOGIN=$(aws ssm get-parameter --region us-east-1 --name ci.datadog-agent.docker_hub_login --with-decryption --query "Parameter.Value" --out text) - - aws ssm get-parameter --region us-east-1 --name ci.datadog-agent.docker_hub_pwd --with-decryption --query "Parameter.Value" --out text | docker login --username "$DOCKER_REGISTRY_LOGIN" --password-stdin docker.io - - SRC_IMAGE=datadog/agent-buildimages-$IMAGE:$IMAGE_VERSION - # Tag as latest in dockerhub registry - - crane tag $SRC_IMAGE latest - -dev_release_circleci_runner_gcr: - stage: release - needs: ["build_circleci_runner"] - rules: - - !reference [.on_push] - variables: - # Don't rely on ${IMAGE_VERSION} or any variables that is referencing - # other variables here. - # They are not expended recursively and end up provided verbatim to the - # downstream pipeline which then extends the variable with its own CI - # variables, which causes invalid image tags to be used - IMG_SOURCES: datadog/agent-buildimages-circleci-runner${ECR_TEST_ONLY}:v$CI_PIPELINE_ID-${CI_COMMIT_SHORT_SHA} - IMG_DESTINATIONS: agent-circleci-runner${ECR_TEST_ONLY}:v$CI_PIPELINE_ID-${CI_COMMIT_SHORT_SHA} - IMG_REGISTRIES: gcr-datadoghq - trigger: - project: DataDog/public-images - strategy: depend - -release_circleci_runner_gcr: - stage: release - needs: ["build_circleci_runner"] - rules: - - !reference [.on_default_branch_push] - variables: - # Don't rely on ${IMAGE_VERSION} or any variables that is referencing - # other variables here. - # They are not expended recursively and end up provided verbatim to the - # downstream pipeline which then extends the variable with its own CI - # variables, which causes invalid image tags to be used - IMG_SOURCES: datadog/agent-buildimages-circleci-runner${ECR_TEST_ONLY}:v$CI_PIPELINE_ID-${CI_COMMIT_SHORT_SHA} - IMG_DESTINATIONS: agent-circleci-runner${ECR_TEST_ONLY}:v$CI_PIPELINE_ID-${CI_COMMIT_SHORT_SHA} - IMG_REGISTRIES: gcr-datadoghq - trigger: - project: DataDog/public-images - strategy: depend - notify-images-available: extends: .slack-notifier-base stage: availability_message # Created a new stage to depend upon all image builds without explicitely name them in 'needs' diff --git a/circleci/Dockerfile b/circleci/Dockerfile deleted file mode 100644 index 77e95ac3..00000000 --- a/circleci/Dockerfile +++ /dev/null @@ -1,100 +0,0 @@ -# We cannot use Ubuntu 22.04 because the E2E tests -# are currently using a Docker Compose v1 imaged based on Debian. -# The glibc version is too old to allow running CGO binaries built on Ubuntu 22.04 -# We'll be able to migrate when we get rid of Docker Compose or use Docker Compose v2 -FROM ubuntu:20.04 - -ENV DEBIAN_FRONTEND noninteractive - -ARG PYTHON_VERSION=3.12.6 -ARG CMAKE_VERSION=3.30.2 - -# Pre-requisites -# Python 3 dev is required for rtloader -RUN set -ex \ - && apt-get update && apt-get upgrade -y \ - && apt-get install -y --no-install-recommends \ - clang-format \ - curl \ - default-jre \ - doxygen \ - file \ - g++ \ - gcc \ - git \ - gnupg ca-certificates \ - graphviz \ - libpq-dev \ - libsnmp-base \ - libsnmp-dev \ - libssl-dev \ - libsystemd-dev \ - make \ - pkg-config \ - snmp-mibs-downloader \ - ssh \ - build-essential \ - zlib1g-dev \ - libbz2-dev \ - libreadline-dev \ - libsqlite3-dev \ - wget \ - llvm \ - libncurses5-dev \ - xz-utils \ - tk-dev \ - libxml2-dev \ - libxmlsec1-dev \ - libffi-dev \ - liblzma-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Golang -ARG GO_VERSION -ARG GO_SHA256_LINUX_AMD64 -ENV GO_VERSION $GO_VERSION -ENV GOPATH /go -RUN curl -sL -o /tmp/golang.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz \ - && echo "$GO_SHA256_LINUX_AMD64 /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}" -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" - -# CMake -ENV CMAKE_NAME cmake-$CMAKE_VERSION-linux-x86_64 -ENV CMAKE_ARCHIVE $CMAKE_NAME.tar.gz -ENV CMAKE_DEST_DIR /cmake -ENV PATH $CMAKE_DEST_DIR/bin/:$PATH -RUN set -ex \ - && curl -sL -O https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/$CMAKE_ARCHIVE \ - && tar xzf $CMAKE_ARCHIVE \ - && mv $CMAKE_NAME $CMAKE_DEST_DIR \ - && rm $CMAKE_ARCHIVE - -# Install Codecov uploader -COPY setup_codecov.sh / -RUN ./setup_codecov.sh - -# Other dependencies - -# Python -ENV PYENV_ROOT="/.pyenv" -ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" - -COPY requirements.txt / -COPY requirements /requirements - -RUN git clone --depth=1 https://github.com/pyenv/pyenv.git ${PYENV_ROOT} && \ - pyenv install ${PYTHON_VERSION} && \ - pyenv global ${PYTHON_VERSION} && \ - pip3 install -r requirements.txt -r requirements/circleci.txt - -# External calls configuration -COPY .awsconfig /root/.aws/config -COPY .curlrc .wgetrc /root/ - -# Setup entrypoint -WORKDIR $GOPATH