@@ -119,9 +119,18 @@ default:
119119
120120.container_info : &container_info
121121 - |
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+
122131 echo -e "${TEXT_BOLD}${TEXT_YELLOW}Runner dashboard, these are live (expire after 1 hour)${TEXT_CLEAR}"
123- echo -e "${TEXT_BOLD}${TEXT_YELLOW} Containers:${TEXT_CLEAR} https://app.datadoghq.com/containers?query=image_name%3A%2A%2Fdatadog%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}"
124- echo -e "${TEXT_BOLD}${TEXT_YELLOW} Processes:${TEXT_CLEAR} https://app.datadoghq.com/process?query=image_name%3A%2A%2Fdatadog%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}"
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 "
125134
126135.gitlab_base_ref_params : &gitlab_base_ref_params
127136 - |
@@ -427,6 +436,7 @@ test_published_artifacts:
427436 - ./gradlew --version
428437 - ./gradlew $GRADLE_TARGET -x spotlessCheck $GRADLE_PARAMS -PskipTests -PrunBuildSrcTests -Pslot=$CI_NODE_INDEX/$CI_NODE_TOTAL $GRADLE_ARGS
429438 after_script :
439+ - *container_info
430440 - *cgroup_info
431441 - source .gitlab/gitlab-utils.sh
432442 - gitlab_section_start "collect-reports" "Collecting reports"
@@ -495,6 +505,7 @@ muzzle:
495505 - ./gradlew --version
496506 - ./gradlew :runMuzzle -Pslot=$CI_NODE_INDEX/$CI_NODE_TOTAL $GRADLE_ARGS
497507 after_script :
508+ - *container_info
498509 - *cgroup_info
499510 - source .gitlab/gitlab-utils.sh
500511 - gitlab_section_start "collect-reports" "Collecting reports"
@@ -517,6 +528,7 @@ muzzle-dep-report:
517528 - ./gradlew --version
518529 - ./gradlew generateMuzzleReport muzzleInstrumentationReport $GRADLE_ARGS
519530 after_script :
531+ - *container_info
520532 - *cgroup_info
521533 - .gitlab/collect_muzzle_deps.sh
522534 artifacts :
@@ -579,6 +591,7 @@ muzzle-dep-report:
579591 after_script :
580592 - *restore_pretest_env
581593 - *set_datadog_api_keys
594+ - *container_info
582595 - *cgroup_info
583596 - source .gitlab/gitlab-utils.sh
584597 - gitlab_section_start "collect-reports" "Collecting reports"
0 commit comments