Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed SSH setup in scripts. #1285

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/drevops/deploy-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +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}"

DREVOPS_SSH_PREFIX="DEPLOY" ./scripts/drevops/setup-ssh.sh
export 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.7
Expand Down
2 changes: 1 addition & 1 deletion scripts/drevops/deploy-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +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

DREVOPS_SSH_PREFIX="DEPLOY" ./scripts/drevops/setup-ssh.sh
export DREVOPS_SSH_PREFIX="DEPLOY" && . ./scripts/drevops/setup-ssh.sh

if ! command -v lagoon >/dev/null || [ -n "${DREVOPS_LAGOONCLI_FORCE_INSTALL}" ]; then
note "Installing Lagoon CLI."
Expand Down
2 changes: 1 addition & 1 deletion scripts/drevops/download-db-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
t=$(mktemp) && export -p >"${t}" && set -a && . ".env.local" && set +a && . "${t}" && rm "${t}" && unset t
fi

DREVOPS_SSH_PREFIX="DB_DOWNLOAD" ./scripts/drevops/setup-ssh.sh
export DREVOPS_SSH_PREFIX="DB_DOWNLOAD" && . ./scripts/drevops/setup-ssh.sh

Check warning on line 94 in scripts/drevops/download-db-lagoon.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/download-db-lagoon.sh#L94

Added line #L94 was not covered by tests

ssh_opts=(-o "UserKnownHostsFile=/dev/null")
ssh_opts+=(-o "StrictHostKeyChecking=no")
Expand Down
2 changes: 1 addition & 1 deletion scripts/drevops/mirror-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
[ "$(git config --global user.name)" == "" ] && note "Configuring global git user name." && git config --global user.name "${DREVOPS_MIRROR_CODE_GIT_USER_NAME}"
[ "$(git config --global user.email)" == "" ] && note "Configuring global git user email." && git config --global user.email "${DREVOPS_MIRROR_CODE_GIT_USER_EMAIL}"

DREVOPS_SSH_PREFIX="MIRROR_CODE" ./scripts/drevops/setup-ssh.sh
export DREVOPS_SSH_PREFIX="MIRROR_CODE" && . ./scripts/drevops/setup-ssh.sh

Check warning on line 65 in scripts/drevops/mirror-code.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/mirror-code.sh#L65

Added line #L65 was not covered by tests

# Create a temp directory to copy source repository into to prevent changes to source.
SRC_TMPDIR=$(mktemp -d)
Expand Down
2 changes: 1 addition & 1 deletion scripts/drevops/task-custom-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
[ -z "${DREVOPS_TASK_LAGOON_COMMAND}" ] && echo "Missing required value for DREVOPS_TASK_LAGOON_COMMAND." && exit 1
[ -z "${DREVOPS_TASK_LAGOON_PROJECT}" ] && echo "Missing required value for DREVOPS_TASK_LAGOON_PROJECT." && exit 1

DREVOPS_SSH_PREFIX="TASK" ./scripts/drevops/setup-ssh.sh
export DREVOPS_SSH_PREFIX="TASK" && . ./scripts/drevops/setup-ssh.sh

Check warning on line 70 in scripts/drevops/task-custom-lagoon.sh

View check run for this annotation

Codecov / codecov/patch

scripts/drevops/task-custom-lagoon.sh#L70

Added line #L70 was not covered by tests

if ! command -v lagoon >/dev/null || [ -n "${DREVOPS_LAGOONCLI_FORCE_INSTALL}" ]; then
note "Installing Lagoon CLI."
Expand Down
Loading