Skip to content

Commit

Permalink
WX-1411 Require preinstalled jq and curl for just-in-time SAS fea…
Browse files Browse the repository at this point in the history
…ture (#7350)
  • Loading branch information
aednichols authored Jan 4, 2024
1 parent ee2b10f commit dbd8a2a
Showing 1 changed file with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,32 +86,16 @@ object TesAsyncBackendJobExecutionActor {
| command -v "$$1" > /dev/null 2>&1
|}
|
|# Check if curl exists; install if not
|# Require the user image to pre-install `jq` and `curl` for us. Empirically, we found
|# that `apt install` at scale can run into repo outages and flakiness.
|if ! command_exists curl; then
| if command_exists apt-get; then
| apt-get -y update && apt-get -y install curl
| if [ $$? -ne 0 ]; then
| echo "Error: Failed to install curl via apt-get."
| exit 1
| fi
| else
| echo "Error: apt-get is not available, and curl is not installed."
| exit 1
| fi
| echo "Error: user image must include `curl` for just-in-time SAS token generation, but it is not installed."
| exit 1
|fi
|
|# Check if jq exists; install if not
|if ! command_exists jq; then
| if command_exists apt-get; then
| apt-get -y update && apt-get -y install jq
| if [ $$? -ne 0 ]; then
| echo "Error: Failed to install jq via apt-get."
| exit 1
| fi
| else
| echo "Error: apt-get is not available, and jq is not installed."
| exit 1
| fi
| echo "Error: user image must include `jq` for just-in-time SAS token generation, but it is not installed."
| exit 1
|fi
|curl --version
|jq --version
Expand Down

0 comments on commit dbd8a2a

Please sign in to comment.