Merge pull request #675 from DataDog/tyler/fix-jmx-script

Ensure the copyMetricConfigs task runs after processResources
This commit is contained in:
Tyler Benson 2019-01-28 14:52:09 -08:00 committed by GitHub
commit bd6f732400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -3,12 +3,13 @@
# Save all important libs into (project-root)/libs
# This folder will be saved by circleci and available after test runs.
set -x
set -e
LIBS_DIR=./libs/
mkdir -p $LIBS_DIR >/dev/null 2>&1
for lib_path in workspace/**/build/libs; do
for lib_path in workspace/*/build/libs; do
echo "saving libs in $lib_path"
cp $lib_path/*.jar $LIBS_DIR/
done

View File

@ -44,6 +44,8 @@ task copyMetricConfigs(type:Exec) {
}
}
processResources.dependsOn copyMetricConfigs
copyMetricConfigs.dependsOn submodulesUpdate
// Runs the copy task before processResources, so duplicate files in the local repo would overwrite imported ones.
processResources.finalizedBy copyMetricConfigs
copyMetricConfigs.mustRunAfter processResources
// In CI, there seems to be a race condition where processResources overwrites the copied metric config files.
// Ensure that task runs last to avoid this problem.

View File

@ -4,7 +4,7 @@
set -e
# Debug mode:
# set -x
set -x
function print_usage() {
echo "Usage: $0 search_directory build_resources_output_directory"