-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from newrelic/feat/mongodb_windows_arm_release
feat(mongodb): windows release and arm [NR-75937]
- Loading branch information
Showing
3 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# ############################################################### | ||
# Integration variables | ||
root_dir=$1 | ||
integration_dir="${root_dir}/exporters/mongodb" | ||
integration_bin_dir="${integration_dir}/target/bin" | ||
|
||
# ############################################################### | ||
# Clone exporter | ||
tmp_dir=$(mktemp -d) | ||
git clone --no-checkout ${EXPORTER_REPO_URL} "${tmp_dir}" | ||
cd "${tmp_dir}" | ||
|
||
if [[ -z $EXPORTER_TAG ]] | ||
then | ||
git -c advice.detachedHead=false checkout ${EXPORTER_COMMIT} | ||
else | ||
git checkout ${EXPORTER_TAG} -d | ||
fi | ||
|
||
# ############################################################### | ||
# Build exporter | ||
make build | ||
|
||
# ############################################################### | ||
# Move binary to its final path to be copied from the next step | ||
mkdir -p ${integration_bin_dir} | ||
|
||
# Since we are using the make build from the repository, the binary doesn't have the correct extension | ||
# 'exe' needed in windows executables, so we add it to the final binary. | ||
cp "${tmp_dir}/mongodb_exporter" "${integration_bin_dir}/mongodb-exporter.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters