diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4a5d6e98a..a2631e3143 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -337,8 +337,6 @@ check_merge_labels: script: - echo $GH_TOKEN | docker login ghcr.io -u publisher --password-stdin - ./utils/scripts/get_pr_merged_labels.sh - rules: - - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main" generate_system_tests_images: image: registry.ddbuild.io/images/ci_docker_base diff --git a/lib-injection/build/build_lib_injection_images.sh b/lib-injection/build/build_lib_injection_images.sh index 5e07fe953e..5e65f93426 100755 --- a/lib-injection/build/build_lib_injection_images.sh +++ b/lib-injection/build/build_lib_injection_images.sh @@ -15,11 +15,6 @@ variants=(["dd-lib-dotnet-init-test-app"]="dotnet" ["dd-lib-python-init-test-protobuf-old"]="python" ["dd-lib-java-init-test-app"]="java" ["dd-djm-spark-test-app"]="java" - ["dd-lib-ruby-init-test-rails"]="ruby" - ["dd-lib-ruby-init-test-rails-bundle-deploy"]="ruby" - ["dd-lib-ruby-init-test-rails-conflict"]="ruby" - ["dd-lib-ruby-init-test-rails-explicit"]="ruby" - ["dd-lib-ruby-init-test-rails-gemsrb"]="ruby" ) docker buildx create --name multiarch --driver docker-container --use diff --git a/utils/scripts/get_pr_merged_labels.sh b/utils/scripts/get_pr_merged_labels.sh index a2b388bca7..bcb600a69e 100755 --- a/utils/scripts/get_pr_merged_labels.sh +++ b/utils/scripts/get_pr_merged_labels.sh @@ -5,63 +5,8 @@ #If the PR contains the label "build-buddies-images" we launch the build and push process -PR_PATTERN='#[0-9]+' -if [[ $CI_COMMIT_MESSAGE =~ ($PR_PATTERN) ]]; then - PR_NUMBER=${BASH_REMATCH[1]:1} - echo "Merged the PR number: [$PR_NUMBER]"; - #search for labels - PR_DATA=$(curl -L \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $GH_TOKEN" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "https://api.github.com/repos/DataDog/system-tests/issues/$PR_NUMBER/labels"); - - echo "We found PR labels: $PR_DATA" - - is_build_buddies=$(echo "$PR_DATA" | jq -c '.[] | select(.name | contains("build-buddies-images"))'); - is_build_python_base_images=$(echo "$PR_DATA" | jq -c '.[] | select(.name | contains("build-python-base-images"))'); - #Disable build lib injection until problems with the java app are fixed - is_build_lib_injection_app_images=$(echo "$PR_DATA" | jq -c '.[] | select(.name | contains("build-lib-injection-app-images"))'); - - if [ -z "$is_build_buddies" ] && [ -z "$is_build_python_base_images" ] && [ -z "$is_build_lib_injection_app_images" ] - then - echo "The PR $PR_NUMBER doesn't contain any docker build label " - exit 0 - fi - echo "$DOCKER_LOGIN_PASS" | docker login --username "$DOCKER_LOGIN" --password-stdin - - #BUILD BUDDIES IMAGES - if [ -z "$is_build_buddies" ] - then - echo "The PR $PR_NUMBER doesn't contain the 'build-buddies-images' label " - else - echo "The PR $PR_NUMBER contains the 'build-buddies-images' label. Launching the images generation process " - ./utils/build/build_tracer_buddies.sh --push - echo "------------- The buddies images have been built and pushed ------------- " - fi - - #BUILD PYTHON BASE IMAGES - if [ -z "$is_build_python_base_images" ] - then - echo "The PR $PR_NUMBER doesn't contain the 'build-python-base-images' label " - else - echo "The PR $PR_NUMBER contains the 'build-python-base-images' label. Launching the images generation process " - ./utils/build/build_python_base_images.sh --push - echo "------------- The python base images have been built and pushed ------------- " - fi - - #BUILD LIB INJECTION IMAGES - if [ -z "$is_build_lib_injection_app_images" ] - then - echo "The PR $PR_NUMBER doesn't contain the 'build-lib-injection-app-images' label " - else echo "The PR $PR_NUMBER contains the 'build-lib-injection-app-images' label. Launching the images generation process " echo "$GH_TOKEN" | docker login ghcr.io --username "publisher" --password-stdin ./lib-injection/build/build_lib_injection_images.sh echo "------------- The lib injection weblog images have been built and pushed ------------- " - fi - -else - echo "The commit message $CI_COMMIT_MESSAGE doesn't contain the PR number." -fi \ No newline at end of file