Skip to content

Commit

Permalink
[#1214] Added script to find and load SSH keys.
Browse files Browse the repository at this point in the history
Also, unified `DREVOPS_<PREFIX>_SSH_FILE` variable name accross scripts.

Renamed `DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE` to `DREVOPS_DB_DOWNLOAD_SSH_FILE`.

Updated `drevops/ci-runner` to `24.3.0`.
  • Loading branch information
AlexSkrypnyk committed Mar 4, 2024
1 parent 067bed0 commit f8c5e08
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ aliases:
# This container has all the necessary tools to run a dockerized environment.
# @see https://github.com/drevops/ci-runner
# @see https://hub.docker.com/repository/docker/drevops/ci-runner/tags?page=1&ordering=last_updated
- image: drevops/ci-runner:24.1.0
- image: drevops/ci-runner:24.3.0
auth:
username: ${DOCKER_USER}
password: ${DOCKER_PASS}
Expand Down
2 changes: 1 addition & 1 deletion .drevops/docs/.utils/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ configure_ssh() {
if ssh-add -l | grep -q "${DOCS_PUBLISH_SSH_FILE}"; then
echo "SSH agent has ${DOCS_PUBLISH_SSH_FILE} key loaded."
else
echo "SSH agent does not have default key loaded. Trying to load."
echo "SSH agent does not have a required key loaded. Trying to load."
# Remove all other keys and add SSH key from provided fingerprint into SSH agent.
ssh-add -D >/dev/null
ssh-add "${DOCS_PUBLISH_SSH_FILE}"
Expand Down
50 changes: 27 additions & 23 deletions .drevops/docs/content/workflows/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,23 +360,21 @@ Default value: `curl`

Defined in: `.env`, `scripts/drevops/download-db.sh`

### `DREVOPS_DB_DOWNLOAD_SSH_FINGERPRINT`

The SSH key fingerprint.
### `DREVOPS_DB_DOWNLOAD_SSH_FILE`

If provided - the key will be looked-up and loaded into ssh client.
SSH key file used to access Lagoon environment to download the database.<br />Create an SSH key and add it to your account in the Lagoon Dashboard.

Default value: `UNDEFINED`
Default value: `HOME/.ssh/id_rsa`

Defined in: `scripts/drevops/download-db-lagoon.sh`
Defined in: `.env.local.default`, `scripts/drevops/download-db-lagoon.sh`

### `DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE`
### `DREVOPS_DB_DOWNLOAD_SSH_FINGERPRINT`

SSH key file used to access Lagoon environment to download the database.<br />Create an SSH key and add it to your account in the Lagoon Dashboard.
SSH key fingerprint used to connect to a remote.

Default value: `HOME/.ssh/id_rsa`
Default value: `UNDEFINED`

Defined in: `.env.local.default`, `scripts/drevops/download-db-lagoon.sh`
Defined in: `scripts/drevops/download-db-lagoon.sh`

### `DREVOPS_DB_EXPORT_DOCKER_ARCHIVE_FILE`

Expand Down Expand Up @@ -735,14 +733,6 @@ Default value: `UNDEFINED`

Defined in: `scripts/drevops/doctor.sh`

### `DREVOPS_DOCTOR_SSH_KEY_FILE`

Default SSH key file.

Default value: `HOME/.ssh/id_rsa`

Defined in: `scripts/drevops/doctor.sh`

### `DREVOPS_DRUPAL_CONFIG_PATH`

Path to configuration directory.
Expand Down Expand Up @@ -873,13 +863,15 @@ Defined in: `scripts/drevops/mirror-code.sh`

### `DREVOPS_MIRROR_CODE_SSH_FILE`

Default value: `DREVOPS_MIRROR_CODE_SSH_FINGERPRINT//:/`
Default SSH file used if custom fingerprint is not provided.

Default value: `UNDEFINED`

Defined in: `scripts/drevops/mirror-code.sh`

### `DREVOPS_MIRROR_CODE_SSH_FINGERPRINT`

Optional SSH key fingerprint to use for mirroring.
SSH key fingerprint used to connect to a remote.

Default value: `UNDEFINED`

Expand Down Expand Up @@ -1281,6 +1273,20 @@ Default value: `UNDEFINED`

Defined in: `scripts/drevops/info.sh`

### `DREVOPS_SSH_FILE`

Default SSH key file.

Default value: `HOME/.ssh/id_rsa`

Defined in: `scripts/drevops/doctor.sh`

### `DREVOPS_SSH_PREFIX`

Default value: `DEPLOY" ./scripts/drevops/setup-ssh.sh`

Defined in: `scripts/drevops/deploy-artifact.sh`, `scripts/drevops/deploy-lagoon.sh`, `scripts/drevops/download-db-lagoon.sh`, `scripts/drevops/mirror-code.sh`, `scripts/drevops/setup-ssh.sh`, `scripts/drevops/task-custom-lagoon.sh`

### `DREVOPS_TASK_COPY_DB_ACQUIA_DST`

Destination environment name to copy DB to.
Expand Down Expand Up @@ -1499,9 +1505,7 @@ Defined in: `scripts/drevops/task-custom-lagoon.sh`

### `DREVOPS_TASK_SSH_FINGERPRINT`

SSH key fingerprint used to connect to remote.

If not used, the currently loaded default SSH key (the key used for code<br />checkout) will be used or deployment will fail with an error if the default<br />SSH key is not loaded.<br />In most cases, the default SSH key does not work (because it is a read-only<br />key used by CircleCI to checkout code from git), so you should add another<br />deployment key.
SSH key fingerprint used to connect to a remote.

Default value: `UNDEFINED`

Expand Down
4 changes: 2 additions & 2 deletions .drevops/tests/bats/_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ assert_files_present_provision_use_profile() {
assert_file_not_contains ".env.local.default" "DREVOPS_DB_DOWNLOAD_FTP_PASS"
assert_file_not_contains ".env.local.default" "DREVOPS_ACQUIA_KEY"
assert_file_not_contains ".env.local.default" "DREVOPS_ACQUIA_SECRET"
assert_file_not_contains ".env.local.default" "DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE"
assert_file_not_contains ".env.local.default" "DREVOPS_DB_DOWNLOAD_SSH_FILE"
assert_file_not_contains ".env.local.default" "DOCKER_USER"
assert_file_not_contains ".env.local.default" "DOCKER_PASS"

Expand Down Expand Up @@ -806,7 +806,7 @@ assert_files_present_no_integration_lagoon() {
assert_file_not_contains "docker-compose.yml" "lagoon.type: solr"
assert_file_not_contains "docker-compose.yml" "lagoon.type: none"

assert_file_not_contains ".env.local.default" "DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE="
assert_file_not_contains ".env.local.default" "DREVOPS_DB_DOWNLOAD_SSH_FILE="

popd >/dev/null || exit 1
}
Expand Down
14 changes: 7 additions & 7 deletions .drevops/tests/bats/fixtures/docker-compose.env_local.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down Expand Up @@ -121,7 +121,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down Expand Up @@ -203,7 +203,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down Expand Up @@ -294,7 +294,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down Expand Up @@ -382,7 +382,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down Expand Up @@ -480,7 +480,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down Expand Up @@ -588,7 +588,7 @@
"DREVOPS_DB_DOWNLOAD_FTP_PORT": "21",
"DREVOPS_DB_DOWNLOAD_FTP_USER": "",
"DREVOPS_DB_DOWNLOAD_SOURCE": "curl",
"DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_DOWNLOAD_SSH_FILE": "HOME/.ssh/id_rsa",
"DREVOPS_DB_FILE": "db.sql",
"DREVOPS_DEPLOY_TYPES": "artifact",
"DREVOPS_LAGOON_PRODUCTION_BRANCH": "main",
Expand Down
2 changes: 1 addition & 1 deletion .env.local.default
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ DREVOPS_ACQUIA_SECRET=

# SSH key file used to access Lagoon environment to download the database.
# Create an SSH key and add it to your account in the Lagoon Dashboard.
DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE=$HOME/.ssh/id_rsa
DREVOPS_DB_DOWNLOAD_SSH_FILE=$HOME/.ssh/id_rsa
#;> LAGOON
#;> !PROVISION_USE_PROFILE
#;< !PROVISION_USE_PROFILE
Expand Down
2 changes: 1 addition & 1 deletion .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tasks:
command: |
if [ "$LAGOON_ENVIRONMENT_TYPE" != "production" ] && [ "$LAGOON_GIT_BRANCH" != "${DREVOPS_LAGOON_PRODUCTION_BRANCH:-main}" ]; then
# No need to load SSH file to access production DB as Lagoon has SSH agent keys.
export DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE=false
export DREVOPS_DB_DOWNLOAD_SSH_FILE=false
export DREVOPS_DB_DIR=/tmp/data
rm -Rf $DREVOPS_DB_DIR || true
./scripts/drevops/download-db.sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Use [Onboarding checklist](docs/onboarding.md) to track the project onboarding p
- Authenticate with Lagoon
1. Create an SSH key and add it to your account in the [Lagoon Dashboard](https://ui-lagoon-master.ch.amazee.io/).
2. Copy `.env.local.default` to `.env.local`.
3. Update `$DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE` environment variable in `.env.local` file
3. Update `$DREVOPS_DB_DOWNLOAD_SSH_FILE` environment variable in `.env.local` file
with the path to the SSH key.

[//]: # (#;> LAGOON)
Expand Down
24 changes: 2 additions & 22 deletions scripts/drevops/deploy-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,7 @@ info "Started ARTIFACT deployment."
[ "$(git config --global user.name)" = "" ] && note "Configuring global git user name." && git config --global user.name "${DREVOPS_DEPLOY_ARTIFACT_GIT_USER_NAME}"
[ "$(git config --global user.email)" = "" ] && note "Configuring global git user email." && git config --global user.email "${DREVOPS_DEPLOY_ARTIFACT_GIT_USER_EMAIL}"

# Use custom deploy key if fingerprint is provided.
if [ -n "${DREVOPS_DEPLOY_SSH_FINGERPRINT:-}" ]; then
note "Custom deployment key is provided."
DREVOPS_DEPLOY_SSH_FILE="${DREVOPS_DEPLOY_SSH_FINGERPRINT//:/}"
DREVOPS_DEPLOY_SSH_FILE="${HOME}/.ssh/id_rsa_${DREVOPS_DEPLOY_SSH_FILE//\"/}"
fi

[ ! -f "${DREVOPS_DEPLOY_SSH_FILE:-}" ] && fail "SSH key file ${DREVOPS_DEPLOY_SSH_FILE} does not exist." && exit 1

# LCOV_EXCL_START
if ssh-add -l | grep -q "${DREVOPS_DEPLOY_SSH_FILE}"; then
note "SSH agent has ${DREVOPS_DEPLOY_SSH_FILE} key loaded."
else
note "SSH agent does not have default key loaded. Trying to load."
# Remove all other keys and add SSH key from provided fingerprint into SSH agent.
ssh-add -D >/dev/null
ssh-add "${DREVOPS_DEPLOY_SSH_FILE}"
fi
# LCOV_EXCL_STOP

# Disable strict host key checking in CI.
[ -n "${CI:-}" ] && mkdir -p "${HOME}/.ssh/" && echo -e "\nHost *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null\n" >>"${HOME}/.ssh/config"
DREVOPS_SSH_PREFIX="DEPLOY" ./scripts/drevops/setup-ssh.sh

note "Installing artifact builder."
composer global require --dev -n --ansi --prefer-source --ignore-platform-reqs drevops/git-artifact:^0.5
Expand Down Expand Up @@ -127,6 +106,7 @@ note "Running artifact builder."
--branch="${DREVOPS_DEPLOY_ARTIFACT_DST_BRANCH}" \
--gitignore="${DREVOPS_DEPLOY_ARTIFACT_SRC}"/.gitignore.deployment \
--report="${DREVOPS_DEPLOY_ARTIFACT_REPORT_FILE}" \
--debug \
--push

pass "Finished ARTIFACT deployment."
23 changes: 1 addition & 22 deletions scripts/drevops/deploy-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,7 @@ info "Started LAGOON deployment."
[ -z "${LAGOON_PROJECT}" ] && fail "Missing required value for LAGOON_PROJECT." && exit 1
{ [ -z "${DREVOPS_DEPLOY_BRANCH}" ] && [ -z "${DREVOPS_DEPLOY_PR}" ]; } && fail "Missing required value for DREVOPS_DEPLOY_BRANCH or DREVOPS_DEPLOY_PR." && exit 1

# Use custom deploy key if fingerprint is provided.
if [ -n "${DREVOPS_DEPLOY_SSH_FINGERPRINT}" ]; then
note "Custom deployment key is provided."
DREVOPS_DEPLOY_SSH_FILE="${DREVOPS_DEPLOY_SSH_FINGERPRINT//:/}"
DREVOPS_DEPLOY_SSH_FILE="${HOME}/.ssh/id_rsa_${DREVOPS_DEPLOY_SSH_FILE//\"/}"
fi

[ ! -f "${DREVOPS_DEPLOY_SSH_FILE}" ] && fail "SSH key file ${DREVOPS_DEPLOY_SSH_FILE} does not exist." && exit 1

# LCOV_EXCL_START
if ssh-add -l | grep -q "${DREVOPS_DEPLOY_SSH_FILE}"; then
note "SSH agent has ${DREVOPS_DEPLOY_SSH_FILE} key loaded."
else
note "SSH agent does not have default key loaded. Trying to load."
# Remove all other keys and add SSH key from provided fingerprint into SSH agent.
ssh-add -D >/dev/null
ssh-add "${DREVOPS_DEPLOY_SSH_FILE}"
fi
# LCOV_EXCL_STOP

# Disable strict host key checking in CI.
[ -n "${CI:-}" ] && mkdir -p "${HOME}/.ssh/" && echo -e "\nHost *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null\n" >>"${HOME}/.ssh/config"
DREVOPS_SSH_PREFIX="DEPLOY" ./scripts/drevops/setup-ssh.sh

if ! command -v lagoon >/dev/null || [ -n "${DREVOPS_DEPLOY_LAGOON_LAGOONCLI_FORCE_INSTALL}" ]; then
note "Installing Lagoon CLI."
Expand Down
4 changes: 2 additions & 2 deletions scripts/drevops/doctor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ DREVOPS_DOCTOR_CHECK_WEBSERVER="${DREVOPS_DOCTOR_CHECK_WEBSERVER:-1}"
DREVOPS_DOCTOR_CHECK_BOOTSTRAP="${DREVOPS_DOCTOR_CHECK_BOOTSTRAP:-1}"

# Default SSH key file.
DREVOPS_DOCTOR_SSH_KEY_FILE="${DREVOPS_DOCTOR_SSH_KEY_FILE:-${HOME}/.ssh/id_rsa}"
DREVOPS_SSH_FILE="${DREVOPS_SSH_FILE:-${HOME}/.ssh/id_rsa}"

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -157,7 +157,7 @@ main() {
ssh_key_volume_mounted=0

# Check that the key is injected into pygmy ssh-agent container.
if ! pygmy status 2>&1 | grep -q "${DREVOPS_DOCTOR_SSH_KEY_FILE}"; then
if ! pygmy status 2>&1 | grep -q "${DREVOPS_SSH_FILE}"; then
warn "SSH key is not added to pygmy."
note "The SSH key will not be available in CLI container. Run 'pygmy restart' and then 'ahoy up'"
else
Expand Down
32 changes: 7 additions & 25 deletions scripts/drevops/download-db-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ DREVOPS_DB_DOWNLOAD_LAGOON_REMOTE_FILE="${DREVOPS_DB_DOWNLOAD_LAGOON_REMOTE_FILE
# does not exist.
DREVOPS_DB_DOWNLOAD_LAGOON_REMOTE_FILE_CLEANUP="${DREVOPS_DB_DOWNLOAD_LAGOON_REMOTE_FILE_CLEANUP:-db_*.sql}"

# The SSH key used to SSH into Lagoon.
DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE="${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE:-}"

# The SSH key fingerprint.
#
# If provided - the key will be looked-up and loaded into ssh client.
# SSH key fingerprint used to connect to a remote.
DREVOPS_DB_DOWNLOAD_SSH_FINGERPRINT="${DREVOPS_DB_DOWNLOAD_SSH_FINGERPRINT:-}"

# Default SSH file used if custom fingerprint is not provided.
DREVOPS_DB_DOWNLOAD_SSH_FILE="${DREVOPS_DB_DOWNLOAD_SSH_FILE:-}"

# The SSH host of the Lagoon environment.
DREVOPS_DB_DOWNLOAD_LAGOON_SSH_HOST="${DREVOPS_DB_DOWNLOAD_LAGOON_SSH_HOST:-ssh.lagoon.amazeeio.cloud}"

Expand Down Expand Up @@ -88,31 +86,15 @@ if [ -f ".env.local" ]; then
t=$(mktemp) && export -p >"${t}" && set -a && . ".env.local" && set +a && . "${t}" && rm "${t}" && unset t
fi

# Discover and load a custom database dump key if fingerprint is provided.
if [ -n "${DREVOPS_DB_DOWNLOAD_SSH_FINGERPRINT:-}" ]; then
note "Custom database dump key is provided."
DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE="${DREVOPS_DB_DOWNLOAD_SSH_FINGERPRINT//:/}"
DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE="${HOME}/.ssh/id_rsa_${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE//\"/}"

[ ! -f "${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE}" ] && fail "SSH key file ${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE} does not exist." && exit 1

if ssh-add -l | grep -q "${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE}"; then
note "SSH agent has ${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE} key loaded."
else
note "SSH agent does not have default key loaded. Trying to load."
# Remove all other keys and add SSH key from provided fingerprint into SSH agent.
ssh-add -D >/dev/null
ssh-add "${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE}"
fi
fi
DREVOPS_SSH_PREFIX="DB_DOWNLOAD" ./scripts/drevops/setup-ssh.sh

ssh_opts=(-o "UserKnownHostsFile=/dev/null")
ssh_opts+=(-o "StrictHostKeyChecking=no")
ssh_opts+=(-o "LogLevel=error")
ssh_opts+=(-o "IdentitiesOnly=yes")
ssh_opts+=(-p "${DREVOPS_DB_DOWNLOAD_LAGOON_SSH_PORT}")
if [ "${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE:-}" != false ]; then
ssh_opts+=(-i "${DREVOPS_DB_DOWNLOAD_SSH_KEY_FILE}")
if [ "${DREVOPS_DB_DOWNLOAD_SSH_FILE:-}" != false ]; then
ssh_opts+=(-i "${DREVOPS_DB_DOWNLOAD_SSH_FILE}")
fi

# Initiates an SSH connection to a remote server using provided SSH options.
Expand Down
Loading

0 comments on commit f8c5e08

Please sign in to comment.