### Full Repository Setup with Renovate Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md This example demonstrates a complete repository setup including `.aqua.yaml`, GitHub Actions workflows, and `renovate.json`. It shows how Renovate can manage various configuration files and dependencies. ```yaml registries: - name: standard type: github ref: v4.0.0 # renovate: depName=aquaproj/aqua-registry repository: aquaproj/aqua-registry aqua: - import: aqua/imports/tools.yaml packages: - name: golang/go version: v1.21.5 # renovate: depName=golang/go ``` ```yaml jobs: test: steps: - uses: aquaproj/aqua-installer@v3.0.1 with: aqua_version: v2.27.0 - run: aqua exec -- go test ./... ``` ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0", "github>aquaproj/aqua-renovate-config:default#2.13.0", "github>aquaproj/aqua-renovate-config:file#2.13.0(aqua/imports/.*\.ya?ml)", "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(scripts/.*\.sh)" ] } ``` -------------------------------- ### Shell Script Aqua-Installer Installation Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Examples of installing aqua-installer using `curl` and `bash`, and a direct command-line invocation. ```bash curl https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.27.0/aqua-installer | bash -s -- -v 2.27.0 ``` ```bash aqua-installer -v 2.27.0 ``` -------------------------------- ### Installer-Script Preset: Direct Invocation Examples Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md Demonstrates various ways to invoke aqua-installer directly or via piping, including specifying installation directories and using different quote types for versioning. ```bash # Direct invocation aqua-installer -v v2.27.0 ``` ```bash # With piping curl ... | bash -s -- aqua-installer -v v2.27.0 curl ... | sh -s -- aqua-installer -v v2.27.0 curl ... | zsh -s -- aqua-installer -v v2.27.0 ``` ```bash # With install directory flag aqua-installer -i /custom/path -v v2.27.0 ``` ```bash # Single quotes aqua-installer -v 'v2.27.0' ``` ```bash # Double quotes aqua-installer -v "v2.27.0" ``` -------------------------------- ### Rust Crate Manager: Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Example configuration snippet showing how to specify versions for Rust crates from crates.io. ```yaml packages: - version: 0.10.1 # renovate: depName=crates.io/skim - name: crates.io/tokio@1.35.0 ``` -------------------------------- ### Aqua Installer in GitHub Actions Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Example of using the `aquaproj/aqua-installer` GitHub Action. Ensure the `aqua_version` includes the `renovate: depName=` comment for dependency updates. ```yaml # .github/workflows/test.yaml - uses: aquaproj/aqua-installer@v3.0.1 with: aqua_version: v2.27.0 # renovate: depName=aquaproj/aqua ``` -------------------------------- ### Create Project Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/README.md Adapt examples from the usage documentation to create your project's configuration. ```shell Read: usage-examples.md Copy and adapt an example that matches your setup ``` -------------------------------- ### Example Datasource Matching Configurations Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md This comprehensive example demonstrates how Renovate matches various dependency name patterns to their respective datasources, including github-releases, github-tags, go, crate, gitlab-releases, gitea-releases, and npm. ```yaml packages: # Matches: github-releases (default, owner/repo format) - version: v1.2.0 # renovate: depName=golang/tools # Matches: github-tags (in githubTagsPackages list) - version: go1.21.0 # renovate: depName=golang/go # Matches: go (golang.org prefix) - version: v0.13.0 # renovate: depName=golang.org/x/tools # Matches: go (go module with _go prefix) - version: v1.0.0 # renovate: depName=_go/github.com/user/repo # Matches: crate (crates.io prefix) - version: 0.10.1 # renovate: depName=crates.io/skim # Matches: gitlab-releases (gitlab.com prefix) - version: 1.2.0 # renovate: depName=gitlab.com/group/project # Matches: gitea-releases (gitea.com prefix) - version: 1.0.0 # renovate: depName=gitea.com/owner/repo # Matches: npm (for specific packages like @trunkio/launcher) - version: 1.19.2 # renovate: depName=trunk-io/launcher ``` -------------------------------- ### Registry Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Example of a registry configuration in an aqua configuration file, showing how to specify the reference and repository. ```yaml registries: - name: standard ref: v1.2.0 # renovate: depName=aquaproj/aqua-registry type: github repository: aquaproj/aqua-registry ``` -------------------------------- ### GitLab Releases Example: MyGroup/MyProject Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example configuration for a specific project on GitLab.com. ```yaml packages: - version: 1.0.0 # renovate: depName=gitlab.com/mygroup/myproject ``` -------------------------------- ### Example Match for golang/tools using GitHub Releases Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md This example shows how a specific release tag from the `golang/tools` repository is matched using the `github-releases` datasource. ```plaintext Repository: golang/tools Latest Release: v0.13.0 Matched As: github-releases datasource Example Match: "version: v0.13.0 # renovate: depName=golang.org/x/tools" ``` -------------------------------- ### Go Module Manager: Go Modules Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Example configuration snippet showing how to specify versions for Go modules using aqua-specific formatting. ```yaml packages: - version: v1.2.0 # renovate: depName=_go/github.com/golang/tools - name: _go/github.com/user/repo@v1.0.0 ``` -------------------------------- ### Gitea Releases Example: Internal Tool Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example configuration for an internal tool hosted on a self-hosted Gitea instance. ```yaml packages: - version: 1.0.0 # renovate: depName=gitea.example.com/internal/tool ``` -------------------------------- ### Go Module Manager: Golang.org Packages Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Example configuration snippet showing how to specify versions for golang.org packages. ```yaml packages: - version: v0.10.0 # renovate: depName=golang.org/x/tools - name: golang.org/x/sync@v0.3.0 ``` -------------------------------- ### Installer-Script Preset: Renovate Configuration Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md Example Renovate configuration extending the installer-script preset to update aqua-installer versions in shell scripts within the 'scripts/' directory. ```json { "extends": [ "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(scripts/.*\\.sh)" ] } ``` -------------------------------- ### Preset URL Format Examples Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Demonstrates the different formats for specifying preset URLs, including versioning and arguments. ```plaintext github>aquaproj/aqua-renovate-config#VERSION github>aquaproj/aqua-renovate-config:VARIANT#VERSION github>aquaproj/aqua-renovate-config:VARIANT#VERSION(ARGUMENT) Examples: github>aquaproj/aqua-renovate-config#2.13.0 github>aquaproj/aqua-renovate-config:default#2.13.0 github>aquaproj/aqua-renovate-config:file#2.13.0(config/.*\.ya?ml) ``` -------------------------------- ### Example Match for jqlang/jq using GitHub Releases Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md This example demonstrates how a release tag from the `jqlang/jq` repository is processed, showing the extracted version and the match pattern used. ```plaintext Repository: jqlang/jq Latest Release: jq-1.7.1 Extracted Version: jq-1.7.1 Match Pattern: ' +name: jqlang/jq@(?[^'" \n]+)' ``` -------------------------------- ### Install google/go-jsonnet with aqua Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/CONTRIBUTING.md Install the google/go-jsonnet tool using the aqua package manager. This is a prerequisite for working with Jsonnet configuration files. ```sh aqua i -l ``` -------------------------------- ### Gitea Releases Example Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md An example of how to configure package updates from Gitea releases using Renovate. This YAML snippet shows the structure for specifying package versions. ```yaml packages: - version: 1.0.0 # renovate: depName=gitea.com/internal/tool - name: gitea.com/myinstance/project@v3.0.0 ``` -------------------------------- ### GitHub Action Aqua Version Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Example of setting the aqua version in an `action.yaml` or similar file. ```yaml aqua_version: v2.27.0 ``` -------------------------------- ### Example Usage of ipinfo Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Shows how the ipinfo function creates a manager for a specific ipinfo CLI tool, setting the package name. ```jsonnet ipinfo('cidr2ip') // Creates manager for ipinfo/cli/cidr2ip with package name ipinfo/cli ``` -------------------------------- ### DevContainer Aqua Version Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Example of setting the aqua version within a DevContainer configuration file. ```json { "aqua_version": "v2.27.0" } ``` -------------------------------- ### GitLab Releases Example Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md An example of how to configure package updates from GitLab releases using Renovate. This YAML snippet shows the structure for specifying package versions. ```yaml packages: - version: 1.2.0 # renovate: depName=gitlab.com/mygroup/myproject - name: gitlab.com/company/tool@v2.0.0 ``` -------------------------------- ### Package Rule Configuration Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/overview.md Configures package rules to disable or enable updates for specific packages or apply version constraints. This example demonstrates matching dependency names, file names, and data sources. ```javascript { matchDepNames: ["golang/go"], matchFileNames: ["**/.aqua.yaml"], matchDatasources: ["github-releases"], enabled: false } ``` -------------------------------- ### GitLab Releases Example: Nested Project Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example configuration for a project within a nested subgroup on GitLab.com. ```yaml packages: - version: 2.1.0 # renovate: depName=gitlab.com/mygroup/subgroup/myproject ``` -------------------------------- ### Dynamic Configuration with Placeholders Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Illustrates how file patterns use placeholders like {{arg0}} to enable consumers to specify target files dynamically. The example shows how a consumer-provided value substitutes the placeholder in the configuration. ```javascript extends: ["github>aquaproj/aqua-renovate-config:file#2.13.0(my/custom/files)"] ``` -------------------------------- ### Example Usage of prefixRegexManager Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Illustrates the output of prefixRegexManager for a Go package with a 'v' prefix, showing version matching and extraction. ```jsonnet prefixRegexManager('golang/go', 'v') // Matches: version: v1.21.0 // Extracts: 1.21.0 ``` -------------------------------- ### Installer-Script Preset: Common File Pattern Examples Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md Common file patterns used with the installer-script preset for targeting different types of script files, including shell scripts, Dockerfiles, and Makefiles. ```javascript // All shell scripts "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(.*\\.sh)" ``` ```javascript // Install scripts in root "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(install\\.sh)" ``` ```javascript // Dockerfile (for RUN commands) "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(Dockerfile)" ``` ```javascript // Makefile "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(Makefile)" ``` -------------------------------- ### Custom Manager Configuration Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/overview.md Defines a custom manager using regex patterns to detect dependencies in specific file types. This example shows how to specify file patterns, match strings, and templates for data sources and version extraction. ```javascript { customType: "regex", managerFilePatterns: ["/\\.?aqua\\.ya?ml/"], matchStrings: ["pattern1", "pattern2"], datasourceTemplate: "github-releases", depNameTemplate: "owner/repo", extractVersionTemplate: "^v?(?.*)$", versioningTemplate: "semver" } ``` -------------------------------- ### Dockerfile with Aqua Installer Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Integrate aqua-installer into a Dockerfile to manage Aqua installations during the build process. Installs curl, downloads aqua-installer, and runs 'aqua i -l'. ```dockerfile FROM golang:1.21-alpine # Install aqua RUN apk add --no-cache curl RUN curl -sL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.27.0/aqua-installer | sh -s -- -i /usr/local/bin # Your application COPY . /app WORKDIR /app RUN aqua i -l RUN go build -o myapp . ``` ```json { "extends": [ "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(Dockerfile)" ] } ``` -------------------------------- ### Testing Renovate Version Patterns Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md JavaScript example demonstrating how to test `allowedVersions` regex patterns for Renovate. Shows a correct and an overly restrictive pattern. ```javascript // Test: 1.21.0 should match allowedVersions: '/^1\.(20|21)\./'; // ✅ Matches allowedVersions: '/^1\.21\./'; // ❌ Too restrictive ``` -------------------------------- ### Configure Go Modules Datasource Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example of configuring Renovate to manage Go modules. It specifies the version and uses a renovate dependency name comment. ```yaml packages: - version: v1.2.0 # renovate: depName=_go/github.com/golang/tools ``` -------------------------------- ### Installation Script with Aqua Installer Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Update aqua-installer in a bash script by downloading it via curl and executing it. Also shows direct invocation of aqua-installer. ```bash #!/bin/bash set -eu # Install aqua AQUA_INSTALLER_URL="https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.27.0/aqua-installer" curl -sL "$AQUA_INSTALLER_URL" | bash -s -- -v 2.27.0 # Or direct invocation aqua-installer -i /opt/aqua -v 2.27.0 ``` ```json { "extends": [ "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(scripts/.*\.sh)" ] } ``` -------------------------------- ### Combine Multiple Presets and Group Packages Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Extend multiple presets and define custom package rules for grouping and scheduling. This example combines the default preset, the 'default' preset with a specific version, and the 'installer-script' preset for shell scripts, while also configuring grouping for Go and Aqua dependencies. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0", "github>aquaproj/aqua-renovate-config:default#2.13.0", "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(scripts/.*\\.sh)" ], "packageRules": [ { "matchDepNames": ["golang/go"], "groupName": "Go dependencies", "automerge": true }, { "matchDepNames": ["aquaproj/aqua"], "groupName": "Aqua runtime", "schedule": ["after 10pm every weekday"] } ] } ``` -------------------------------- ### Renovate Rule Application Order Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/package-rules.md Illustrates the order in which Renovate rules are evaluated. The first matching rule takes precedence, affecting how updates are handled for specific packages and datasources. ```javascript [ Rule 1: Disable github-releases for github-tags packages, Rule 2: Disable github-tags by default, Rule 3: Enable github-tags for specific packages, Rule 4: grpc-go version constraint, Rule 5: external-secrets version constraint, Rule 6: aqua-renovate-config grouping, Rule 7: DBT Fusion versioning, ] ``` -------------------------------- ### Complex Multi-Preset Setup Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Combine multiple preset configurations and define specific rules for different file patterns, including scheduling and auto-merging based on environment. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0", "github>aquaproj/aqua-renovate-config:default#2.13.0", "github>aquaproj/aqua-renovate-config:file#2.13.0(config/development/.*\\.ya?ml)", "github>aquaproj/aqua-renovate-config:file#2.13.0(config/production/.*\\.ya?ml)", "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(scripts/.*\\.sh)", "github>aquaproj/aqua-renovate-config:installer-script#2.13.0(Dockerfile)" ], "packageRules": [ { "matchFileNames": ["config/production/.*"], "schedule": ["after 10pm on Sunday"], "reviewers": ["@devops-team"] }, { "matchFileNames": ["config/development/.*"], "automerge": true } ] } ``` -------------------------------- ### Aqua-Renovate-Config Preset: Basic Renovate Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md Example Renovate configuration extending the aqua-renovate-config preset to update its own version references in 'renovate.json5' files. ```json { "extends": [ "github>aquaproj/aqua-renovate-config:aqua-renovate-config#2.13.0(renovate\\.json5)" ] } ``` -------------------------------- ### Configure golang.org Packages Datasource Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example of configuring Renovate for official Go extensions from golang.org. It specifies the version and uses a renovate dependency name comment. ```yaml packages: - version: v0.10.0 # renovate: depName=golang.org/x/tools ``` -------------------------------- ### Configure Gitea Releases Datasource Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example configuration for the Gitea Releases datasource. Specify the version and use the renovate: depName directive to link to the Gitea repository. ```yaml packages: - version: 1.0.0 # renovate: depName=gitea.com/owner/repo ``` -------------------------------- ### Compose Manager Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Example of composing a manager configuration by extending a base utility with specific datasource and versioning templates. ```javascript $.prefixRegexManager('golang/go', 'v') + { datasourceTemplate: 'github-tags', versioningTemplate: 'regex:...' } ``` -------------------------------- ### Minimal aqua Configuration with Updates Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md This snippet shows the basic setup for managing aqua registries and packages using `.aqua.yaml` and configuring Renovate to automatically update them. ```yaml # .aqua.yaml registries: - name: standard type: github ref: v4.0.0 # renovate: depName=aquaproj/aqua-registry repository: aquaproj/aqua-registry packages: - name: golang/go version: v1.21.5 # renovate: depName=golang/go - name: jqlang/jq version: v1.7.1 # renovate: depName=jqlang/jq ``` ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0" ] } ``` -------------------------------- ### Patterns with Comments and Newlines Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Provides examples of how patterns can include comments and newlines for better readability and metadata. ```yaml version: 1.0.0 # renovate: depName=github-owner/repo version: 1.0.0 ``` -------------------------------- ### Configure Crate Datasource for Tokio Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example of configuring Renovate to manage the 'tokio' Rust crate. It specifies the version and uses a renovate dependency name comment. ```yaml packages: - version: 1.35.0 # renovate: depName=crates.io/tokio ``` -------------------------------- ### Configure GitLab Releases Datasource Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example configuration for the GitLab Releases datasource. Specify the version and use the renovate: depName directive to link to the GitLab project. ```yaml packages: - version: 1.2.0 # renovate: depName=gitlab.com/mygroup/mytool ``` -------------------------------- ### Aqua.yaml Example for GitHub Releases Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Demonstrates how to configure packages to use the GitHub Releases manager in an aqua.yaml file. It shows direct version specification and version specification with a renovate comment. ```yaml packages: - name: golang/go@v1.21.0 - name: github.com/jqlang/jq version: v1.7.1 # renovate: depName=jqlang/jq - version: "v1.2.3" # renovate: depName=some-owner/some-package ``` -------------------------------- ### File Preset Advanced Example: All YAML Files Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md An advanced usage of the file preset to update all YAML files by specifying a broad regex pattern as the argument. ```javascript // Update all YAML files "github>aquaproj/aqua-renovate-config:file#2.13.0(.*\.ya?ml)" ``` -------------------------------- ### Enable/Disable Datasources per Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Configure package rules to selectively enable or disable specific datasources for particular dependencies. This example enables 'github-tags' for 'golang/go' while disabling 'github-releases'. ```json { "packageRules": [ { "matchDepNames": ["golang/go"], "matchDatasources": ["github-tags"], "enabled": true }, { "matchDepNames": ["golang/go"], "matchDatasources": ["github-releases"], "enabled": false } ] } ``` -------------------------------- ### Configure Crate Datasource for Skim Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example of configuring Renovate to manage the 'skim' Rust crate. It specifies the version and uses a renovate dependency name comment. ```yaml packages: - version: 0.10.1 # renovate: depName=crates.io/skim ``` -------------------------------- ### Renovate Configuration with Custom Rules Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/index.md Extends the standard aqua-renovate-config and applies custom package rules. This example skips Go updates and enables auto-merging for patch updates. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0" ], "packageRules": [ { "matchDepNames": ["golang/go"], "enabled": false }, { "matchUpdateTypes": ["patch"], "automerge": true } ] } ``` -------------------------------- ### Troubleshoot Package Detection Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md If Renovate is not updating a package, ensure the `depName` comment is correctly specified in your `.aqua.yaml` file. This example shows the incorrect and corrected configuration. ```yaml packages: - name: golang/go version: v1.21.5 # ❌ Missing renovate comment for depName ``` ```yaml packages: - name: golang/go version: v1.21.5 # renovate: depName=golang/go # ✅ Now Renovate will detect and update ``` -------------------------------- ### Go Compiler Version Extraction Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example configuration for Go compiler releases, which use tags like `go1.21.0`. It removes the 'go' prefix and applies a standard versioning regex. ```javascript { depNameTemplate: 'golang/go', datasourceTemplate: 'github-tags', extractVersionTemplate: '^go(?.*)$', // Removes 'go' prefix versioningTemplate: 'regex:^(?\d+)\.(?\d+)\.?(?\d+)?$', } ``` -------------------------------- ### YAML Quoted/Unquoted Version Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md Shows how Renovate patterns can handle version strings that are either quoted or unquoted in YAML. Ensure your patterns correctly match both formats. ```yaml version: "1.0.0" # ✅ Matches version: '1.0.0' # ✅ Matches version: 1.0.0 # ✅ Matches ``` -------------------------------- ### Renovate Configuration for Aqua Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Example `renovate.json` configuration to extend Aqua's Renovate config. This ensures both the GitHub Action and Aqua versions are updated together. ```json // renovate.json (update both) { "extends": [ "github>aquaproj/aqua-renovate-config:default#2.13.0" ] } ``` -------------------------------- ### Apply Presets to Custom File Patterns Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Use the 'file' preset with a custom glob pattern to apply specific managers to non-standard file locations. This example targets all YAML files within the 'config/tools/' directory. ```json { "extends": [ "github>aquaproj/aqua-renovate-config:file#2.13.0(config/tools/.*\\.ya?ml)" ] } ``` -------------------------------- ### Aqua-Renovate-Config Preset: Advanced Renovate Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md Advanced Renovate configuration example using the aqua-renovate-config preset to update version references in files within the '.github/' directory, including YAML and JSON files. ```json { "extends": [ "github>aquaproj/aqua-renovate-config:aqua-renovate-config#2.13.0(^\\.github/.*\\.ya?ml)" ] } ``` -------------------------------- ### Choose Renovate Preset Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/README.md Refer to the presets documentation to select appropriate configurations for your project. ```shell Read: presets.md Select one or more presets for your use case ``` -------------------------------- ### Read Documentation Index Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/README.md Navigate to the main index file for the project documentation. ```shell Read: index.md → overview.md ``` -------------------------------- ### Shell Script Aqua-Installer Installation Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Patterns for updating aqua-installer versions in shell scripts. The first pattern targets direct download URLs, while the second targets inline installation commands. ```javascript 'raw\.githubusercontent\.com/aquaproj/aqua-installer/%s/aqua-installer' ``` ```javascript 'aqua-installer +(\| +(ba|z)?sh +-s +-- +)?(-i +\S+ +)?-v +%s\s' ``` -------------------------------- ### Configure Kustomize Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for Kustomize using the 'kustomize/' prefix. ```yaml packages: - version: "kustomize/v5.0.0" # renovate: depName=kubernetes-sigs/kustomize ``` -------------------------------- ### Example Usage of wrapQuote Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Demonstrates how the wrapQuote function generates a regex pattern to match a string with or without quotes. ```jsonnet wrapQuote('version') // Returns: "(?:version|'version'|"version")" ``` -------------------------------- ### Renovate Version Formats Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Examples of special version formats used by Renovate, including prefix, suffix, and named formats. ```yaml # Prefix formats (value: prefix + version) golang/go: go1.21.0 apache/ant: rel/1.10.13 kubernetes/kubectl: kubernetes-v1.28.0 # Suffix formats (value: version + suffix) external-secrets: v0.1.0-esoctl # Named format (alternative to version: key) - name: jqlang/jq@v1.7.1 # Registry refs ref: v4.0.0 # renovate: depName=aquaproj/aqua-registry ``` -------------------------------- ### Combine Multiple Presets Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md Extend multiple presets to include different configurations like base, default, and file-specific aqua setups. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0", "github>aquaproj/aqua-renovate-config:default#2.13.0", "github>aquaproj/aqua-renovate-config:file#2.13.0(config/aqua-prod.yaml)" ] } ``` -------------------------------- ### Datasource Selection Logic Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Illustrates the mapping from package names to datasource types based on pattern matching rules. ```plaintext depName → Pattern Matching → Datasource ├─ "golang/go" → (in githubTagsPackages) → github-tags ├─ "golang/tools" → (in githubTagsPackages) → github-tags ├─ "owner/repo" → (GitHub org/repo format) → github-releases ├─ "golang.org/x/..." → (golang.org prefix) → go ├─ "_go/..." → (Go module format) → go ├─ "crates.io/..." → (crates.io prefix) → crate ├─ "gitlab.com/..." → (gitlab.com prefix) → gitlab-releases ├─ "gitea.com/..." → (gitea.com prefix) → gitea-releases └─ "trunk-io/launcher" → (specific package) → npm ``` -------------------------------- ### Optimize and Troubleshoot Configuration Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/README.md Consult best practices for optimizing and diagnosing issues with your configuration. ```shell Read: best-practices.md Apply best practices and diagnose issues ``` -------------------------------- ### Disable Non-Critical Dependencies Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md To reduce noise and focus on critical updates, disable Renovate for non-critical dependencies. This example disables updates for 'optional-package'. ```json { "packageRules": [ { "matchDepNames": ["optional-package"], "enabled": false } ] } ``` -------------------------------- ### Configure gRPC Go protoc-gen-go-grpc Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for gRPC Go protoc-gen-go-grpc using a specific prefix and version constraint, with a defined package name. ```yaml packages: - version: "cmd/protoc-gen-go-grpc/v1.3.0" # renovate: depName=grpc/grpc-go/protoc-gen-go-grpc ``` -------------------------------- ### Multiple Aqua Configuration Files Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Demonstrates how to use Renovate to manage multiple aqua configuration files in different environments by extending the base preset with a file-specific preset. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0", "github>aquaproj/aqua-renovate-config:file#2.13.0(aqua/.*\.ya?ml)" ] } ``` -------------------------------- ### Constrain Package Versions in Renovate Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md This configuration constrains the allowed versions for 'golang/go' to only versions starting with '1.20.' or '1.21.', using a regular expression. ```json { "packageRules": [ { "matchDepNames": ["golang/go"], "allowedVersions": "/^1\.(20|21)\./", "description": "Only Go 1.20 LTS and 1.21" } ] } ``` -------------------------------- ### Configure Bitwarden CLI Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for Bitwarden CLI using the 'cli-' prefix. ```yaml packages: - version: "cli-2024.1.0" # renovate: depName=bitwarden/clients ``` -------------------------------- ### Fix Restrictive Version Constraint Regex Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md When a version constraint regex is too restrictive, it can prevent updates. This example shows how to broaden the pattern to match more versions. ```javascript // Too restrictive allowedVersions: '/^1\.21\./' // Better allowedVersions: '/^1\.(20|21)\./' ``` -------------------------------- ### Configure gopls (Go Language Server) Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for gopls using the 'gopls/' prefix. ```yaml packages: - version: "gopls/v0.13.0" # renovate: depName=golang/tools/gopls ``` -------------------------------- ### Datasource Selection Logic Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md This illustrates the default datasource selection logic based on dependency name patterns. It shows the hierarchy from github-releases to npm for scoped packages. ```text Dependency Name ├─ github-releases (default for most packages) ├─ github-tags (for: golang/go, kubernetes/kubectl, apache/ant, etc.) ├─ go (for: golang.org/..., _go/...) ├─ crate (for: crates.io/...) ├─ gitlab-releases (for: gitlab.com/...) ├─ gitea-releases (for: gitea.com/...) └─ npm (for: @scoped/packages like @trunkio/launcher) ``` -------------------------------- ### Use Appropriate File Patterns Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md Employ specific file patterns to match actual Aqua configuration files, avoiding over-broad patterns that can lead to unnecessary API calls and false positives. ```json { "extends": [ "github>aquaproj/aqua-renovate-config:file#2.13.0(config/aqua\.ya?ml)" ] } ``` -------------------------------- ### Filter GitHub Releases with Allowed Versions Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Use `allowedVersions` to filter which versions are considered by the datasource. This example restricts matches to Go versions 1.20 and 1.21. ```javascript { matchDepNames: ['golang/go'], allowedVersions: '/^1\.(20|21)\./' // Only Go 1.20 and 1.21 } ``` -------------------------------- ### Project Architecture Overview Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/overview.md Illustrates the directory structure and the relationship between Jsonnet source files and generated JSON presets. Each jsonnet file imports shared utilities and composes custom managers and package rules. ```tree jsonnet/ ├── utils.libsonnet (shared utilities and regex patterns) ├── aqua-renovate-config.jsonnet → aqua-renovate-config.json ├── base.jsonnet → base.json ├── default.jsonnet → default.json ├── file.jsonnet → file.json └── installer-script.jsonnet → installer-script.json ``` -------------------------------- ### Configure gping (Graphical Ping) Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for gping using the 'gping-' prefix. ```yaml packages: - version: "gping-1.8.2" # renovate: depName=orf/gping ``` -------------------------------- ### Override Crate Datasource Versioning Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Example of overriding the default Cargo versioning scheme to use semantic versioning for Rust crates. This is useful for crates with non-standard versioning. ```javascript { datasourceTemplate: 'crate', versioningTemplate: 'semver' // Override default cargo } ``` -------------------------------- ### Configure Trunk.io Launcher Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for Trunk.io Launcher, specifying the NPM package name and using the 'npm' datasource. No prefix is used. ```yaml packages: - version: "1.19.2" # renovate: depName=trunk-io/launcher ``` -------------------------------- ### Custom Version Extraction with Regex Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Configure custom version extraction using `extractVersionTemplate` and `versioningTemplate` regex. This example extracts versions that may or may not be prefixed with 'v'. ```javascript { datasourceTemplate: 'github-tags', extractVersionTemplate: '^v?(?.*)$', // Extract after 'v' versioningTemplate: 'regex:^(?\d+)\.(?\d+)\.?(?\d+)?$', } ``` -------------------------------- ### Configure jq Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for jq using the 'jq-' prefix. ```yaml packages: - version: "jq-1.7.1" # renovate: depName=jqlang/jq ``` -------------------------------- ### Configure GitHub Releases Datasource with Custom Version Extraction Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Use `extractVersionTemplate` to customize how versions are extracted from release tags. This example removes a leading 'v' from the tag. ```javascript { datasourceTemplate: 'github-releases', extractVersionTemplate: '^v?(?.*)$' // Removes leading 'v' } ``` -------------------------------- ### Documenting Custom Version Constraints Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md Explain the rationale behind custom version constraints using the 'description' field. This helps future maintainers understand why specific versions are allowed or disallowed. ```json { "packageRules": [ { "matchDepNames": ["golang/go"], "allowedVersions": "/^1\\.(20|21)\\./", "description": "Only Go 1.20 LTS and 1.21. Wait for 1.22 to stabilize." } ] } ``` -------------------------------- ### YAML Whitespace Sensitivity Example Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md Demonstrates how whitespace around colons can affect pattern matching in YAML configurations. Ensure your patterns account for expected whitespace variations. ```yaml version: 1.0.0 # ✅ Matches version: 1.0.0 # ✅ Matches version : 1.0.0 # ❌ Space around `:` fails ``` -------------------------------- ### Validate Renovate Configuration File Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Use the Renovate CLI to print and validate the contents of your renovate.json configuration file. ```bash # Validate renovate.json npx renovate --print-config ``` -------------------------------- ### Alternative Sources Configuration (Gitea) Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Configure dependencies from Gitea. The `renovate: depName` comment specifies the dependency source. ```yaml - version: 1.0.0 # renovate: depName=gitea.com/owner/repo ``` -------------------------------- ### Custom Versioning Template Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md Override the default versioning scheme for a datasource using `versioningTemplate`. This example uses a regex to capture major, minor, and patch versions for GitHub releases. ```javascript { datasourceTemplate: 'github-releases', versioningTemplate: 'regex:^(?\d+)\.(?\d+)\.?(?\d+)?$' } ``` -------------------------------- ### Schedule Renovate Updates Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md Configure Renovate to run during off-peak hours to minimize impact on CI/CD pipelines and developer workflow. This example schedules updates for after 10 PM on Sundays. ```json { "schedule": ["after 10pm on Sunday"] } ``` -------------------------------- ### File Preset Advanced Example: Specific Directory Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/presets.md An advanced usage of the file preset to update files within a specific directory by providing a targeted file pattern as the argument. ```javascript // Update specific directory "github>aquaproj/aqua-renovate-config:file#2.13.0(config/aqua\.ya?ml)" ``` -------------------------------- ### Multi-Config Renovate Setup Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/index.md This configuration extends the base aqua-renovate-config and specifically targets YAML files within the 'config/' directory. It updates root .aqua.yaml and files in the config/ directory. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0", "github>aquaproj/aqua-renovate-config:file#2.13.0(config/.*\\.ya?ml)" ] } ``` -------------------------------- ### Datasource Determination Methods Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md This outlines the three primary methods Renovate uses to determine the correct datasource for a package: custom manager configuration, dependency name patterns, and package-specific rules. ```text Renovate determines datasource from: 1. **Custom manager configuration** — explicitly set via `datasourceTemplate` 2. **Dependency name pattern** — regex patterns match prefixes (gitlab.com/, crates.io/, etc.) 3. **Package rules** — override for specific packages ``` -------------------------------- ### Go Packages Configuration (golang.org) Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/QUICK-REFERENCE.md Configure Go packages hosted on golang.org. The `renovate: depName` comment helps Renovate identify the dependency. ```yaml - version: v0.13.0 # renovate: depName=golang.org/x/tools ``` -------------------------------- ### Create ipinfo CLI Manager Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Generates a custom Renovate manager configuration specifically for ipinfo CLI tools, setting the package name template. ```jsonnet ipinfo(name: string):: $.prefixRegexManager('ipinfo/cli/' + name, name + '-') + { packageNameTemplate: 'ipinfo/cli', } ``` -------------------------------- ### Disable Updates for Specific Packages Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md Configure package rules to disable updates for certain dependencies. This example disables updates for 'golang/go' globally and for 'my-org/internal-tool' specifically within the 'aqua/dev.yaml' file. ```json { "extends": [ "github>aquaproj/aqua-renovate-config#2.13.0" ], "packageRules": [ { "matchDepNames": ["golang/go"], "enabled": false }, { "matchDepNames": ["my-org/internal-tool"], "enabled": false, "matchFileNames": ["aqua/dev.yaml"] } ] } ``` -------------------------------- ### Dependency Name Regex: Go Module Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/jsonnet-api-reference.md Matches Go module format, including optional fragments. Supports paths like _go/module/path#fragment. ```javascript goModuleDepName: '(?_go/(?[^#\n]+)(?:#.*)?)' ``` -------------------------------- ### Group Patch Updates Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md To manage high-volume updates efficiently, group similar updates together. This example groups all 'patch' type updates under a single 'patch updates' group name. ```json { "packageRules": [ { "matchUpdateTypes": ["patch"], "groupName": "patch updates" } ] } ``` -------------------------------- ### NPM Datasource Configuration for trunk-io launcher Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/datasources.md This configuration snippet specifies the version for the trunk-io launcher package using the NPM datasource. Renovate maps the `depName` to the correct NPM package name, queries the npm registry, and suggests newer versions. ```yaml packages: - version: 1.19.2 # renovate: depName=trunk-io/launcher ``` -------------------------------- ### Custom Version Extraction Template Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/best-practices.md Configure a custom 'extractVersionTemplate' to precisely control how Renovate extracts version numbers from release tags. This example removes an optional leading 'v' character. ```javascript { "datasourceTemplate": "github-releases", "extractVersionTemplate": "^v?(?.*)$" // Removes leading 'v' } ``` -------------------------------- ### Configure OpenAI Codex (Rust) Package Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/custom-managers.md Configure Renovate for OpenAI Codex (Rust) using the 'rust-' prefix. ```yaml packages: - version: "rust-0.2.0" # renovate: depName=openai/codex ``` -------------------------------- ### Correct GitLab Package Datasource Name Source: https://github.com/aquaproj/aqua-renovate-config/blob/main/_autodocs/usage-examples.md For GitLab packages, the `depName` in your `.aqua.yaml` must include the full GitLab path. This example demonstrates adding the `gitlab.com/` prefix to correctly identify the package. ```yaml packages: - version: v1.0.0 # renovate: depName=my-gitlab-project ``` ```yaml packages: - version: v1.0.0 # renovate: depName=gitlab.com/my-group/my-project ```