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

feat(linter): allow use of private dependencies from GCPAR in pre-commit #174

Closed
wants to merge 1 commit into from

Conversation

santiagofdialpad
Copy link

@santiagofdialpad santiagofdialpad commented Oct 28, 2024

Summary

This PR modifies the linter orb to install gcloud and authenticate in order to allow installing private dependencies in a pre-commit hook

We use our gcloud orb for those steps, which are only executed when a gcp_project is specified in the parameters.

Example of usage:

## File: .circleci/config.yaml

jobs:
  - linter/pre-commit: &pre-commit
      executor: python
      gcp_project: <GCP_PROJECT>
## File: .pre-commit-config.yaml

-   id: asd
    name: my-name
    language: python
    entry: command
    pass_filenames: false
    additional_dependencies:
        [
            '--extra-index-url=<PRIVATE_REPO_URL>',
            PACKAGE_TO_INSTALL,
        ]

Custom Checklist Items

  • Release non-dev version

Standard Checklist

  • My comments/docstrings/type hints are clear
  • I've written new tests or this change does not need them
  • I've tested this manually
  • The architecture diagrams have been updated, if need be
  • Any external changes/dependencies are linked and described
  • I've included any special rollback strategies above
  • Any relevant metrics/monitors/SLOs have been added or modified
  • I've notified all relevant stakeholders of the change
  • I've updated .github/CODEOWNERS, if relevant

@santiagofdialpad santiagofdialpad marked this pull request as ready for review October 29, 2024 17:30
@santiagofdialpad santiagofdialpad requested review from shaundialpad and olidp and removed request for a team October 29, 2024 17:30
@santiagofdialpad
Copy link
Author

We will run these commands as pre-steps in each repo's circleCI config

@TheKevJames TheKevJames deleted the santiago/pre-commit-private-dep branch November 6, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant