Skip to content

Commit 7f969ea

Browse files
authored
Show container, processes dashboard links (#10232)
* chore: Show container, processes dashboard links * chore: Add a time window * chore: Improve wording
1 parent f5c3f20 commit 7f969ea

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.gitlab-ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ default:
117117
- .gitlab/cgroup-info.sh
118118
- gitlab_section_end "cgroup-info"
119119

120+
.container_info: &container_info
121+
- |
122+
# Containers and processes are limited to a 1-hour window, and expire after 36 hours
123+
if [ -n "$CI_JOB_STARTED_AT" ]; then
124+
FROM_EPOCH_MS=$(date -d "$CI_JOB_STARTED_AT" +%s)000
125+
TO_EPOCH_MS=$((FROM_EPOCH_MS + 3600000))
126+
TIME_PARAMS="from_ts=${FROM_EPOCH_MS}&to_ts=${TO_EPOCH_MS}&"
127+
else
128+
TIME_PARAMS=""
129+
fi
130+
131+
echo -e "${TEXT_BOLD}${TEXT_YELLOW}Runner dashboard, these are live (limited to a 1-hour window, and expire after 36 hours)${TEXT_CLEAR}"
132+
echo -e "${TEXT_BOLD}${TEXT_YELLOW} Containers:${TEXT_CLEAR} https://app.datadoghq.com/containers?${TIME_PARAMS}query=image_name%3A%2A%2Fdatadog%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}&live=false"
133+
echo -e "${TEXT_BOLD}${TEXT_YELLOW} Processes:${TEXT_CLEAR} https://app.datadoghq.com/process?${TIME_PARAMS}query=image_name%3A%2A%2Fdatadog%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}&live=false"
134+
120135
.gitlab_base_ref_params: &gitlab_base_ref_params
121136
- |
122137
export GIT_BASE_REF=$(.gitlab/find-gh-base-ref.sh)
@@ -165,6 +180,7 @@ default:
165180
unprotect: true
166181
before_script:
167182
- source .gitlab/gitlab-utils.sh
183+
- *container_info
168184
# Akka token added to SSM from https://account.akka.io/token
169185
- export ORG_GRADLE_PROJECT_akkaRepositoryToken=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.akka_repo_token --with-decryption --query "Parameter.Value" --out text)
170186
- export ORG_GRADLE_PROJECT_mavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY
@@ -195,6 +211,7 @@ default:
195211
- gitlab_section_end "gradle-dance"
196212
after_script:
197213
- *cgroup_info
214+
- *container_info
198215

199216
# Check and fail early if maven central credentials are incorrect. When a new token is generated
200217
# on the central publisher portal, it invalidates the old one. This check prevents going further.
@@ -419,6 +436,7 @@ test_published_artifacts:
419436
- ./gradlew --version
420437
- ./gradlew $GRADLE_TARGET -x spotlessCheck $GRADLE_PARAMS -PskipTests -PrunBuildSrcTests -Pslot=$CI_NODE_INDEX/$CI_NODE_TOTAL $GRADLE_ARGS
421438
after_script:
439+
- *container_info
422440
- *cgroup_info
423441
- source .gitlab/gitlab-utils.sh
424442
- gitlab_section_start "collect-reports" "Collecting reports"
@@ -487,6 +505,7 @@ muzzle:
487505
- ./gradlew --version
488506
- ./gradlew :runMuzzle -Pslot=$CI_NODE_INDEX/$CI_NODE_TOTAL $GRADLE_ARGS
489507
after_script:
508+
- *container_info
490509
- *cgroup_info
491510
- source .gitlab/gitlab-utils.sh
492511
- gitlab_section_start "collect-reports" "Collecting reports"
@@ -509,6 +528,7 @@ muzzle-dep-report:
509528
- ./gradlew --version
510529
- ./gradlew generateMuzzleReport muzzleInstrumentationReport $GRADLE_ARGS
511530
after_script:
531+
- *container_info
512532
- *cgroup_info
513533
- .gitlab/collect_muzzle_deps.sh
514534
artifacts:
@@ -571,6 +591,7 @@ muzzle-dep-report:
571591
after_script:
572592
- *restore_pretest_env
573593
- *set_datadog_api_keys
594+
- *container_info
574595
- *cgroup_info
575596
- source .gitlab/gitlab-utils.sh
576597
- gitlab_section_start "collect-reports" "Collecting reports"

0 commit comments

Comments
 (0)