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

Fix for Lagoon CLI 3.0. #1296

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

richardgaunt
Copy link
Collaborator

@richardgaunt richardgaunt commented Aug 27, 2024

Checklist before requesting a review

  • I have formatted the subject to include ticket number as Issue #123456 by drupal_org_username: Issue title
  • I have added a link to the issue tracker
  • I have provided information in Changed section about WHY something was done if this was not a normal implementation
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have run new and existing relevant tests locally with my changes, and they passed
  • I have provided screenshots, where applicable

Changed

  1. Updated deploy script for lagoon 3.0 CLI fix
    drevops/vortex@f0bbe9e

Issue identified and diagnosed by Josh: https://app.circleci.com/pipelines/github/civictheme/monorepo-drupal/7730/workflows/f689c4d3-dc7d-4d43-bbfc-8792a9532784/jobs/25677?invite=true#step-105-994_37

Note for mapping short to long name parameters

Usage:
  lagoon deploy pullrequest [flags]

Aliases:
  pullrequest, r

Flags:
  -N, --base-branch-name string   Pullrequest base branch name
  -R, --base-branch-ref string    Pullrequest base branch reference hash
      --buildvar stringArray      Add one or more build variables to deployment (--buildvar KEY1=VALUE1 [--buildvar KEY2=VALUE2])
  -H, --head-branch-name string   Pullrequest head branch name
  -M, --head-branch-ref string    Pullrequest head branch reference hash
  -h, --help                      help for pullrequest
  -n, --number uint               Pullrequest number
      --returndata                Returns the build name instead of success text
  -t, --title string              Pullrequest title

Global Flags:
      --config-file string                Path to the config file to use (must be *.yml or *.yaml)
      --debug                             Enable debugging output (if supported)
  -e, --environment string                Specify an environment to use
      --force                             Force yes on prompts (if supported)
  -l, --lagoon string                     The Lagoon instance to interact with
      --no-header                         No header on table (if supported)
      --output-csv                        Output as CSV (if supported)
      --output-json                       Output as JSON (if supported)
      --pretty                            Make JSON pretty (if supported)
  -p, --project string                    Specify a project to use
      --skip-update-check                 Skip checking for updates
  -i, --ssh-key string                    Specify path to a specific SSH key to use for lagoon authentication
      --ssh-publickey string              Specify path to a specific SSH public key to use for lagoon authentication using ssh-agent.
                                          This will override any public key identities defined in configuration
      --strict-host-key-checking string   Similar to SSH StrictHostKeyChecking (accept-new, no, ignore) (default "accept-new")
  -v, --verbose                           Enable verbose output to stderr (if supported)

Screenshots

@@ -167,8 +167,7 @@ else
fi

note "Redeploying environment: project ${LAGOON_PROJECT}, PR: ${DREVOPS_DEPLOY_PR}."
lagoon --force --skip-update-check -i "${DREVOPS_DEPLOY_SSH_FILE}" -l "${DREVOPS_DEPLOY_LAGOON_INSTANCE}" deploy pullrequest -p "${LAGOON_PROJECT}" -n "${DREVOPS_DEPLOY_PR}" --baseBranchName "${DREVOPS_DEPLOY_PR_BASE_BRANCH}" -R "origin/${DREVOPS_DEPLOY_PR_BASE_BRANCH}" -H "${DREVOPS_DEPLOY_BRANCH}" -M "${DREVOPS_DEPLOY_PR_HEAD}" -t "${deploy_pr_full}"

lagoon deploy pullrequest ---ssh-key "${DREVOPS_DEPLOY_SSH_FILE}" --lagoon "${DREVOPS_DEPLOY_LAGOON_INSTANCE}" --project "${LAGOON_PROJECT}" --number "${DREVOPS_DEPLOY_PR}" --base-branch-name "${DREVOPS_DEPLOY_PR_BASE_BRANCH}" --base-branch-ref "origin/${DREVOPS_DEPLOY_PR_BASE_BRANCH}" --head-branch-name "${DREVOPS_DEPLOY_BRANCH}" --head-branch-ref "${DREVOPS_DEPLOY_PR_HEAD}" --title "${deploy_pr_full}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to long parameter names for better readability

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be --ssh-key and not ---ssh-key
Screenshot 2024-08-27 at 1 14 30 PM

@richardgaunt richardgaunt added the State: Needs review Pull requests needs a review from assigned developers label Aug 27, 2024
@richardgaunt richardgaunt force-pushed the feature/fix-lagoon-cli-update-break branch from f803154 to a02453f Compare August 27, 2024 07:46
Copy link
Collaborator

@joshua-salsadigital joshua-salsadigital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richardgaunt richardgaunt enabled auto-merge (squash) August 27, 2024 07:48
@richardgaunt richardgaunt merged commit 7ca7b2f into develop Aug 27, 2024
12 checks passed
@richardgaunt richardgaunt deleted the feature/fix-lagoon-cli-update-break branch August 27, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: Needs review Pull requests needs a review from assigned developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants