You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/core/source.adoc
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ The "source" stage retrieves information from a third "resource" like a file, or
27
27
28
28
== Example
29
29
30
+
=== Transform source output
31
+
30
32
.updatecli.yaml
31
33
```
32
34
sources:
@@ -48,3 +50,58 @@ sources:
48
50
49
51
In this example we're looking for the latest release tag from https://github.com/jenkinsci/jenkins which is 'jenkins-2.75'.
50
52
Unfortunately, it contains the prefix "jenkins" which is not required for later stages, so we remove 'jenkins-' so the output of the source becomes "jenkins/jenkins:2.275-jdk" which is a valid docker image name This can now be used in the later stages.
53
+
54
+
=== Combine multiple sources
55
+
56
+
In Updatecli, sources define values (like version numbers) to use in your update logic.
57
+
58
+
You can combine outputs from multiple sources in a target, a condition, or even another source by using Go templating, like this:
59
+
60
+
```
61
+
sources:
62
+
appVersion:
63
+
kind: githubrelease
64
+
spec:
65
+
owner: myorg
66
+
repository: myapp
67
+
68
+
chartVersion:
69
+
kind: helmchart
70
+
spec:
71
+
name: mychart
72
+
73
+
targets:
74
+
updateChart:
75
+
name: "Update Helm chart with app and chart versions"
0 commit comments