Skip to content

Commit

Permalink
feat(vendir): add vendir support (#25113)
Browse files Browse the repository at this point in the history
Co-authored-by: Zoltán Reegn <reegnz@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Zoltán Reegn <zoltan.reegn@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
6 people committed Mar 21, 2024
1 parent 3a9be74 commit db1b0d8
Show file tree
Hide file tree
Showing 20 changed files with 1,065 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/config/options/index.ts
Expand Up @@ -1052,6 +1052,7 @@ const options: RenovateOptions[] = [
'kubernetes',
'kustomize',
'terraform',
'vendir',
'woodpecker',
],
},
Expand Down
2 changes: 2 additions & 0 deletions lib/modules/manager/api.ts
Expand Up @@ -86,6 +86,7 @@ import * as tflintPlugin from './tflint-plugin';
import * as travis from './travis';
import type { ManagerApi } from './types';
import * as velaci from './velaci';
import * as vendir from './vendir';
import * as woodpecker from './woodpecker';

const api = new Map<string, ManagerApi>();
Expand Down Expand Up @@ -178,4 +179,5 @@ api.set('terragrunt-version', terragruntVersion);
api.set('tflint-plugin', tflintPlugin);
api.set('travis', travis);
api.set('velaci', velaci);
api.set('vendir', vendir);
api.set('woodpecker', woodpecker);
12 changes: 12 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/alias-contents.yaml
@@ -0,0 +1,12 @@
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: vendor
contents:
- path: custom-repo-custom-version
helmChart:
name: oci
version: "7.10.1"
repository:
url: oci://test
17 changes: 17 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/multiple-contents.yaml
@@ -0,0 +1,17 @@
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: vendor
contents:
- path: custom-repo-custom-version
helmChart:
name: contour
version: "7.10.1"
repository:
url: https://charts.bitnami.com/bitnami
- path: thing
helmChart:
name: contour
version: "7.10.1"
repository:
url: https://charts.bitnami.com/bitnami
12 changes: 12 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/non-helmchart.yaml
@@ -0,0 +1,12 @@
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: vendor
contents:
- path: github.com/cloudfoundry/cf-k8s-networking
git:
# http or ssh urls are supported (required)
url: https://github.com/cloudfoundry/cf-k8s-networking
# branch, tag, commit; origin is the name of the remote (required)
# optional if refSelection is specified (available in v0.11.0+)
ref: origin/master
12 changes: 12 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/oci-contents.yaml
@@ -0,0 +1,12 @@
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: vendor
contents:
- path: custom-repo-custom-version
helmChart:
name: contour
version: "7.10.1"
repository:
url: oci://charts.bitnami.com/bitnami
11 changes: 11 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/one-contents.yaml
@@ -0,0 +1,11 @@
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: vendor
contents:
- path: custom-repo-custom-version
helmChart:
name: contour
version: "7.10.1"
repository:
url: https://charts.bitnami.com/bitnami
15 changes: 15 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/vendir.yml
@@ -0,0 +1,15 @@
apiVersion: vendir.k14s.io/v1alpha1
kind: Config

minimumRequiredVersion: 0.32.0

# one or more directories to manage with vendir
directories:
- path: vendor
contents:
- path: renovate
helmChart:
name: renovate
version: 36.109.4
repository:
url: https://docs.renovatebot.com/helm-charts
9 changes: 9 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/vendir_1.lock
@@ -0,0 +1,9 @@
apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- helmChart:
appVersion: 36.109.4
version: 36.109.4
path: renovate
path: vendor
kind: LockConfig
9 changes: 9 additions & 0 deletions lib/modules/manager/vendir/__fixtures__/vendir_2.lock
@@ -0,0 +1,9 @@
apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- helmChart:
appVersion: 36.109.4
version: 37.109.4
path: renovate
path: vendor
kind: LockConfig
24 changes: 24 additions & 0 deletions lib/modules/manager/vendir/__snapshots__/artifacts.spec.ts.snap
@@ -0,0 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`modules/manager/vendir/artifacts returns null if unchanged 1`] = `
[
{
"cmd": "vendir sync",
"options": {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
"env": {
"HOME": "/home/user",
"HTTPS_PROXY": "https://example.com",
"HTTP_PROXY": "http://example.com",
"LANG": "en_US.UTF-8",
"LC_ALL": "en_US",
"NO_PROXY": "localhost",
"PATH": "/tmp/path",
},
"maxBuffer": 10485760,
"timeout": 900000,
},
},
]
`;

0 comments on commit db1b0d8

Please sign in to comment.