Skip to content

Commit 8a6fc49

Browse files
authored
feat: preview instances for 5 most recent releases (#1626)
1 parent b69f10c commit 8a6fc49

3 files changed

Lines changed: 24 additions & 9 deletions

File tree

kubernetes/apps/preview/github-previews/app/resource-set.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,25 @@ spec:
1111
- apiVersion: fluxcd.controlplane.io/v1
1212
kind: ResourceSetInputProvider
1313
name: immich-github-branches
14-
inputs:
15-
- branch: release
16-
# renovate: datasource=github-releases depName=immich-app/immich
17-
tag: "v2.7.5"
14+
- apiVersion: fluxcd.controlplane.io/v1
15+
kind: ResourceSetInputProvider
16+
name: immich-github-tags
1817
resourcesTemplate: |
1918
<<- $ctx := dict >>
2019
<<- if hasKey inputs "author" >>
2120
<<- $name := list "pr" inputs.id | join "-" >>
2221
<<- $_ := set $ctx "name" $name >>
23-
<<- else >>
22+
<<- $tag := list "commit" inputs.sha | join "-" >>
23+
<<- $_ := set $ctx "tag" $tag >>
24+
<<- else if hasKey inputs "branch" >>
2425
<<- $_ := set $ctx "name" inputs.branch >>
25-
<<- end >>
26-
27-
<<- if hasKey inputs "sha" >>
2826
<<- $tag := list "commit" inputs.sha | join "-" >>
2927
<<- $_ := set $ctx "tag" $tag >>
3028
<<- else >>
29+
<<- $_ := set $ctx "name" (inputs.tag | slugify) >>
3130
<<- $_ := set $ctx "tag" inputs.tag >>
3231
<<- end >>
33-
32+
3433
---
3534
apiVersion: postgresql.cnpg.io/v1
3635
kind: Cluster

kubernetes/apps/preview/github-previews/app/rsip.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ spec:
2020
url: https://github.com/immich-app/immich
2121
filter:
2222
includeBranch: "^main$"
23+
---
24+
apiVersion: fluxcd.controlplane.io/v1
25+
kind: ResourceSetInputProvider
26+
metadata:
27+
name: immich-github-tags
28+
namespace: preview
29+
spec:
30+
type: GitHubTag
31+
url: https://github.com/immich-app/immich
32+
filter:
33+
semver: ">=2.0.0"
34+
limit: 5

kubernetes/apps/preview/github-previews/app/webhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@ spec:
3535
kind: ResourceSetInputProvider
3636
name: immich-github-branches
3737
namespace: preview
38+
- apiVersion: fluxcd.controlplane.io/v1
39+
kind: ResourceSetInputProvider
40+
name: immich-github-tags
41+
namespace: preview
3842

3943
# NOTE: The external ingress for this webhook goes to the notification-controller through apps/infrastructure/flux-system/addons/webhooks/github/ingress.yaml

0 commit comments

Comments
 (0)