Skip to content

Commit

Permalink
Merge pull request #150 from newrelic/feat/mongodb_windows_arm_release
Browse files Browse the repository at this point in the history
feat(mongodb): windows release and arm [NR-75937]
  • Loading branch information
alvarocabanas authored Jan 10, 2023
2 parents 4b957fe + 43ea2c5 commit c15d8e7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
34 changes: 34 additions & 0 deletions exporters/mongodb/build-exporter-windows.sh
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"
4 changes: 4 additions & 0 deletions exporters/mongodb/e2e/e2e_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ scenarios:
- mongodb_ss_metrics_commands_touch_total
- mongodb_ss_metrics_commands_unsetSharding_failed
- mongodb_ss_metrics_commands_unsetSharding_total
- mongodb_ss_metrics_commands_repairDatabase_failed
- mongodb_ss_metrics_commands_repairDatabase_total
- mongodb_ss_network_serviceExecutorTaskStats_threadsRunning
- mongodb_ss_opReadConcernCounters
- mongodb_ss_repl_ismaster
Expand Down Expand Up @@ -582,6 +584,8 @@ scenarios:
- mongodb_ss_metrics_commands_touch_total
- mongodb_ss_metrics_commands_unsetSharding_failed
- mongodb_ss_metrics_commands_unsetSharding_total
- mongodb_ss_metrics_commands_repairDatabase_failed
- mongodb_ss_metrics_commands_repairDatabase_total
- mongodb_ss_metrics_record_moves
- mongodb_ss_network_serviceExecutorTaskStats_threadsRunning
- mongodb_ss_opReadConcernCounters
Expand Down
16 changes: 9 additions & 7 deletions exporters/mongodb/exporter.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# name of the exporter, should match with the folder name
name: mongodb
# version of the package created
version: 0.1.0
version: 0.1.1
# Relative path to the License path from the repository root
exporter_license_path: LICENSE
# URL to the git project hosting the exporter
Expand All @@ -14,19 +14,21 @@ exporter_commit: 6fa2a74de666d30cd04e2c36b417152a0d490e77
exporter_changelog: https://github.com/percona/mongodb_exporter/blob/main/CHANGELOG
# Enable packages for Linux
package_linux: true
# Set goarch values
package_linux_goarchs: amd64,arm64
# Enable packages for Windows
package_windows: false
package_windows: true
# Upgrade GUID used in the msi package. Required if package_windows is set to true
# This GUID should be generated and be unique across all exporters in the repository
upgrade_guid: 278db4a4-60a9-493b-b878-dc7b445a2db0
upgrade_guid: 7f8500b3-5388-4d16-931b-b898354a48da
# Integration GUID used in the msi package. Required if package_windows is set to true
# This GUID should be generated and be unique across all exporters in the repository
nri_guid: 44ac2940-4aff-46fc-a46b-b1b8cd9a3505
nri_guid: 29c54e7d-fd03-4db3-bf36-7278150a2035
# Exporter GUID used in the msi package. Required if package_windows is set to true
# This GUID should be generated and be unique across all exporters in the repository
exporter_guid: b246fde4-0083-4e16-beb0-09139fb5ca9f
exporter_guid: 595b4152-df66-4666-8fdf-e621737dc632
# License GUID used in the msi package. Required if package_windows is set to true
# This GUID should be generated and be unique across all exporters in the repository
license_guid: a63afbd8-5ea3-4bac-85cc-1da438b8c8f4
license_guid: ca4d1ce7-799e-41cc-84de-3f98d52b4dca
# This GUID should be generated and be unique across all exporters in the repository
config_guid: 86733900-4e10-478c-9633-61595d0e7acb
config_guid: 86a72444-33a8-4798-904d-5c8cf1e764e8

0 comments on commit c15d8e7

Please sign in to comment.