Module: Dependabot::Helm::Helpers
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/helm/helpers.rb
Class Method Summary collapse
- .add_repo(repo_name, repository_url) ⇒ Object
- .fetch_oci_tags(name) ⇒ Object
- .fetch_tags_with_release_date_using_oci(repo_url, tag) ⇒ Object
- .search_releases(name) ⇒ Object
- .update_lock ⇒ Object
- .update_repo ⇒ Object
Class Method Details
.add_repo(repo_name, repository_url) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/dependabot/helm/helpers.rb', line 27 def self.add_repo(repo_name, repository_url) validate_cli_arg!("repo_name", repo_name) validate_cli_arg!("repository_url", repository_url) Dependabot.logger.info("Adding Helm repository: #{repo_name} (#{repository_url})") Dependabot::SharedHelpers.run_shell_command( "helm repo add -- #{repo_name} #{repository_url}", fingerprint: "helm repo add -- <repo_name> <repository_url>" ) end |
.fetch_oci_tags(name) ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'lib/dependabot/helm/helpers.rb', line 59 def self.(name) validate_cli_arg!("name", name) Dependabot.logger.info("Searching OCI tags for: #{name}") Dependabot::SharedHelpers.run_shell_command( "oras repo tags -- #{name}", fingerprint: "oras repo tags -- <name>" ).strip end |
.fetch_tags_with_release_date_using_oci(repo_url, tag) ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/dependabot/helm/helpers.rb', line 70 def self.(repo_url, tag) validate_cli_arg!("repo_url", repo_url) validate_cli_arg!("tag", tag) Dependabot::SharedHelpers.run_shell_command( "oras manifest fetch -- #{repo_url}:#{tag}", fingerprint: "oras manifest fetch -- <repo_url>:<tag>" ).strip end |
.search_releases(name) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/dependabot/helm/helpers.rb', line 16 def self.search_releases(name) validate_cli_arg!("name", name) Dependabot.logger.info("Searching Helm repository for: #{name}") Dependabot::SharedHelpers.run_shell_command( "helm search repo --versions --output=json -- #{name}", fingerprint: "helm search repo --versions --output=json -- <name>" ).strip end |
.update_lock ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/dependabot/helm/helpers.rb', line 49 def self.update_lock Dependabot.logger.info("Updating Building Lock File") Dependabot::SharedHelpers.run_shell_command( "helm dependency update", fingerprint: "helm dependency update" ) end |
.update_repo ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/dependabot/helm/helpers.rb', line 39 def self.update_repo Dependabot.logger.info("Updating Helm repositories") Dependabot::SharedHelpers.run_shell_command( "helm repo update", fingerprint: "helm repo update" ) end |