Files
runner-images/images/ubuntu/scripts/build/install-sqlpackage.sh
Subir Ghosh fd1af56b4f Change URL for packages (#11997)
* fix:URL for packages

* chore Add co-author
>
> Co-authored-by: greg dryke <no-reply@github.com>

* chore: Incorporate Review comments

* fix: remove redundant initialization
2025-04-11 11:53:08 -06:00

30 lines
1.1 KiB
Bash

#!/bin/bash -e
################################################################################
## File: install-sqlpackage.sh
## Desc: Install SqlPackage CLI to DacFx (https://docs.microsoft.com/sql/tools/sqlpackage/sqlpackage-download#get-sqlpackage-net-core-for-linux)
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh
# Install libssl1.1 dependency
if is_ubuntu22; then
focal_list=/etc/apt/sources.list.d/focal-security.list
echo "deb https://archive.ubuntu.com/ubuntu/ focal-security main" | tee "${focal_list}"
apt-get update --quiet
apt-get install --no-install-recommends libssl1.1
rm "${focal_list}"
apt-get update --quiet
fi
# Install SqlPackage
archive_path=$(download_with_retry "https://aka.ms/sqlpackage-linux")
unzip -qq "$archive_path" -d /usr/local/sqlpackage
chmod +x /usr/local/sqlpackage/sqlpackage
ln -sf /usr/local/sqlpackage/sqlpackage /usr/local/bin
invoke_tests "Tools" "SqlPackage"