-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: add an output with the custer identifier
- Loading branch information
1 parent
9d5c750
commit 01d5601
Showing
5 changed files
with
63 additions
and
3 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
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
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,25 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
output "nomad_local_binary" { | ||
value = "${var.binary_path}/nomad" | ||
description = "Path where the binary will be placed" | ||
} | ||
|
||
output "vault_artifactory_release" { | ||
description = "Binary information returned from the artifactory" | ||
value = { | ||
url = data.enos_artifactory_item.nomad.results[0].url | ||
sha256 = data.enos_artifactory_item.nomad.results[0].sha256 | ||
} | ||
} | ||
|
||
output "nomad_local_binary_ubuntu_jammy" { | ||
value = "${var.binary_path}/nomad" | ||
description = "Path where the binary will be placed" | ||
} | ||
|
||
output "nomad_local_binary_windows_2016" { | ||
value = "${var.binary_path}/nomad.exe" | ||
description = "Path where the binary will be placed" | ||
} |
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,25 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
set -xeuo pipefail | ||
|
||
TIMEOUT=15 | ||
INTERVAL=5 | ||
|
||
start_time=$(date +%s) | ||
|
||
while ! nomad server members > /dev/null 2>&1; do | ||
echo "Waiting for Nomad API..." | ||
|
||
current_time=$(date +%s) | ||
elapsed_time=$((current_time - start_time)) | ||
if [ "$elapsed_time" -ge "$TIMEOUT" ]; then | ||
echo "Error: Nomad API did not become available within $TIMEOUT seconds." | ||
exit 1 | ||
fi | ||
|
||
sleep "$INTERVAL" | ||
done | ||
|
||
echo "Nomad API is available!" |