Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s temp test #3608

Closed
wants to merge 1 commit into from
Closed
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: 0 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions lib-injection/build/build_lib_injection_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
55 changes: 0 additions & 55 deletions utils/scripts/get_pr_merged_labels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading