Skip to content

Commit bd541eb

Browse files
authored
Merge branch 'master' into smola/git-skip-no-gh
2 parents fd2385a + 3bc6acd commit bd541eb

File tree

84 files changed

+449
-2829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+449
-2829
lines changed

.gitignore

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ replay_pid*
6464
# Magic for local JMC built
6565
/vendor/jmc-libs
6666

67-
# CircleCI #
68-
############
69-
_circle_ci_cache_*
70-
upstream.env
71-
/.circleci/config.continue.yml
72-
7367
# Benchmarks #
7468
benchmark/reports
7569
benchmark/tracer
7670
benchmark/dacapo/scratch
71+
72+
# JDK provisioning tools #
73+
# mise
74+
mise*.local.toml
75+
.mise*.local.toml
76+
.config/mise*.toml
77+
# asdf
78+
.tool-versions

.gitlab-ci.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,32 @@ default:
185185
after_script:
186186
- *cgroup_info
187187

188+
# Checks and fail early if central credentials are incorrect, indeed, when a new token is generated
189+
# on the central publisher protal, it invalidates the old one. This checks prevents going further.
190+
# See https://datadoghq.atlassian.net/wiki/x/Oog5OgE
191+
pre-release-checks:
192+
image: ghcr.io/datadog/dd-trace-java-docker-build:${BUILDER_IMAGE_VERSION_PREFIX}base
193+
stage: .pre
194+
rules:
195+
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
196+
when: on_success
197+
allow_failure: false
198+
script:
199+
- |
200+
SONATYPE_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_username --with-decryption --query "Parameter.Value" --out text)
201+
SONATYPE_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_password --with-decryption --query "Parameter.Value" --out text)
202+
# See https://central.sonatype.org/publish/publish-portal-api/
203+
# 15e0cbbb-deff-421e-9e02-296a24d0cada is deployment, any deployment id listed in central work, the idea is to check whether the token can authenticate
204+
curl --request POST --include --fail https://central.sonatype.com/api/v1/publisher/status?id=15e0cbbb-deff-421e-9e02-296a24d0cada --header "Authorization: Bearer $(printf "$SONATYPE_USERNAME:$SONATYPE_PASSWORD" | base64)"
205+
if [ $? -ne 0 ]; then
206+
echo "Failed to authenticate against central. Check credentials, see https://datadoghq.atlassian.net/wiki/x/Oog5OgE"
207+
exit 1
208+
fi
209+
188210
build:
211+
needs:
212+
- job: pre-release-checks
213+
optional: true
189214
extends: .gradle_build
190215
variables:
191216
BUILD_CACHE_POLICY: push
@@ -323,7 +348,7 @@ test_published_artifacts:
323348
- *cgroup_info
324349
- source .gitlab/gitlab-utils.sh
325350
- gitlab_section_start "collect-reports" "Collecting reports"
326-
- .circleci/collect_reports.sh
351+
- .gitlab/collect_reports.sh
327352
- gitlab_section_end "collect-reports"
328353
artifacts:
329354
when: always
@@ -343,7 +368,7 @@ test_published_artifacts:
343368
- *cgroup_info
344369
- source .gitlab/gitlab-utils.sh
345370
- gitlab_section_start "collect-reports" "Collecting reports"
346-
- .circleci/collect_reports.sh --destination ./check_reports --move
371+
- .gitlab/collect_reports.sh --destination ./check_reports --move
347372
- gitlab_section_end "collect-reports"
348373
artifacts:
349374
when: always
@@ -403,7 +428,7 @@ muzzle:
403428
- *cgroup_info
404429
- source .gitlab/gitlab-utils.sh
405430
- gitlab_section_start "collect-reports" "Collecting reports"
406-
- .circleci/collect_reports.sh
431+
- .gitlab/collect_reports.sh
407432
- gitlab_section_end "collect-reports"
408433
artifacts:
409434
when: always
@@ -422,7 +447,7 @@ muzzle-dep-report:
422447
- ./gradlew generateMuzzleReport muzzleInstrumentationReport $GRADLE_ARGS
423448
after_script:
424449
- *cgroup_info
425-
- .circleci/collect_muzzle_deps.sh
450+
- .gitlab/collect_muzzle_deps.sh
426451
artifacts:
427452
when: always
428453
paths:
@@ -485,10 +510,10 @@ muzzle-dep-report:
485510
- *cgroup_info
486511
- source .gitlab/gitlab-utils.sh
487512
- gitlab_section_start "collect-reports" "Collecting reports"
488-
- .circleci/collect_reports.sh
489-
- if [ "$PROFILE_TESTS" == "true" ]; then .circleci/collect_profiles.sh; fi
490-
- .circleci/collect_results.sh
491-
- .circleci/upload_ciapp.sh $CACHE_TYPE $testJvm
513+
- .gitlab/collect_reports.sh
514+
- if [ "$PROFILE_TESTS" == "true" ]; then .gitlab/collect_profiles.sh; fi
515+
- .gitlab/collect_results.sh
516+
- .gitlab/upload_ciapp.sh $CACHE_TYPE $testJvm
492517
- gitlab_section_end "collect-reports"
493518
- URL_ENCODED_JOB_NAME=$(jq -rn --arg x "$CI_JOB_NAME" '$x|@uri')
494519
- echo -e "${TEXT_BOLD}${TEXT_YELLOW}See test results in Datadog:${TEXT_CLEAR} https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40test.service%3Add-trace-java%20%40ci.pipeline.id%3A${CI_PIPELINE_ID}%20%40ci.job.name%3A%22${URL_ENCODED_JOB_NAME}%22"

.gitlab/benchmarks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ check-big-regressions:
7575
artifacts: true
7676
when: on_success
7777
tags: ["arch:amd64"]
78+
rules:
79+
- if: '$CI_COMMIT_BRANCH !~ /^(master|release\/)/'
80+
when: on_success
81+
- when: never
7882
# ARTIFACTS_DIR /go/src/github.com/DataDog/apm-reliability/dd-trace-java/reports/
7983
# need to convert them
8084
script:

.gitlab/cgroup-info.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ elif [ -d "/sys/fs/cgroup/memory" ]; then # Assuming if memory cgroup v1 exists,
8080
else
8181
printf "cgroup memory paths not found. Neither cgroup v2 controller file nor cgroup v1 memory directory detected.\n"
8282
fi
83-
File renamed without changes.

.circleci/collect_profiles.sh renamed to .gitlab/collect_profiles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# Save all important profiles into (project-root)/profiles
4-
# This folder will be saved by circleci and available after test runs.
4+
# This folder will be saved by gitlab and available after test runs.
55

66
set -e
77
#Enable '**' support

.circleci/collect_reports.sh renamed to .gitlab/collect_reports.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# Save all important reports into (project-root)/reports
4-
# This folder will be saved by circleci and available after test runs.
4+
# This folder will be saved by gitlab and available after test runs.
55

66
set -e
77
#Enable '**' support

.circleci/collect_results.sh renamed to .gitlab/collect_results.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# Save all important reports and artifacts into (project-root)/results
4-
# This folder will be saved by circleci and available after test runs.
4+
# This folder will be saved by gitlab and available after test runs.
55

66
set -e
77
# Enable '**' support
File renamed without changes.

build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ plugins {
2626
id 'com.gradleup.shadow' version '8.3.6' apply false
2727
id 'me.champeau.jmh' version '0.7.0' apply false
2828
id 'org.gradle.playframework' version '0.13' apply false
29-
id 'info.solidsoft.pitest' version '1.9.11' apply false
29+
id 'info.solidsoft.pitest' version '1.9.11' apply false
3030
}
3131

3232
description = 'dd-trace-java'
@@ -117,10 +117,6 @@ nexusPublishing {
117117
}
118118
}
119119

120-
wrapper {
121-
distributionType = Wrapper.DistributionType.ALL
122-
}
123-
124120
def writeMainVersionFileTask = tasks.register('writeMainVersionFile') {
125121
def versionFile = file("${rootProject.buildDir}/main.version")
126122
inputs.property "version", scmVersion.version

0 commit comments

Comments
 (0)