Skip to content

Commit 0840245

Browse files
committed
Fix the 5.12.0 Source Install (#3281)
* fixes source install * removes integrations dir * fixes integrations * fixes the indentation
1 parent 1d67c86 commit 0840245

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

packaging/datadog-agent/source/setup_agent.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ VERSION
397397
if [ "$AGENT_MAJOR_VERSION" -eq "5" -a "$AGENT_MINOR_VERSION" -gt "11" ]; then
398398
print_console "* Downloading integrations from GitHub"
399399
mkdir -p "$DD_HOME/integrations"
400+
mkdir -p "$DD_HOME/agent/checks.d"
401+
mkdir -p "$DD_HOME/agent/conf.d/auto_conf"
402+
400403
$DOWNLOADER "$DD_HOME/integrations.tar.gz" "https://api.github.com/repos/DataDog/integrations-core/tarball/$AGENT_VERSION"
401404
print_done
402405

@@ -405,12 +408,24 @@ if [ "$AGENT_MAJOR_VERSION" -eq "5" -a "$AGENT_MINOR_VERSION" -gt "11" ]; then
405408
rm -f "$DD_HOME/integrations.tar.gz"
406409
print_done
407410

408-
print_console "* Trying to install integration requirements"
409-
for INT_DIR in "$DD_HOME/integrations/*"; do
410-
if [ -d $INT_DIR ]; then
411-
if [-f "$INT_DIR/requirements.txt" ]; then
412-
"$DD_HOME/agent/utils/pip-allow-failures.sh" "$INT_DIR/requirements.txt"
413-
fi
411+
print_console "* Setting up integrations"
412+
INTEGRATIONS=$(ls $DD_HOME/integrations/)
413+
for INT in $INTEGRATIONS; do
414+
INT_DIR="$DD_HOME/integrations/$INT"
415+
if [ -f "$INT_DIR/requirements.txt" ]; then
416+
"$DD_HOME/agent/utils/pip-allow-failures.sh" "$INT_DIR/requirements.txt"
417+
fi
418+
if [ -f "$INT_DIR/check.py" ]; then
419+
cp "$INT_DIR/check.py" "$DD_HOME/agent/checks.d/$INT.py"
420+
fi
421+
if [ -f "$INT_DIR/conf.yaml.example" ]; then
422+
cp "$INT_DIR/conf.yaml.example" "$DD_HOME/agent/conf.d/$INT.yaml.example"
423+
fi
424+
if [ -f "$INT_DIR/auto_conf.yaml" ]; then
425+
cp "$INT_DIR/auto_conf.yaml" "$DD_HOME/agent/conf.d/auto_conf/$INT.yaml"
426+
fi
427+
if [ -f "$INT_DIR/conf.yaml.default" ]; then
428+
cp "$INT_DIR/conf.yaml.default" "$DD_HOME/agent/conf.d/$INT.yaml.default"
414429
fi
415430
done
416431
print_done

0 commit comments

Comments
 (0)