9696 properties :
9797 name :
9898 description : Name is the name of the object to refer to.
99- maxLength : 253
100- minLength : 1
101- pattern : ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
10299 type : string
103100 required :
104101 - name
@@ -134,6 +131,22 @@ spec:
134131 Template is a go text template and receives .Environment and .ArgoCDCommitStatus variables. A function called urlQueryEscape
135132 is available to escape url query parameters. The template can be configured with options to control the behavior
136133 during execution if a variable is not present.
134+
135+ Example:
136+
137+ {{ "{{- $baseURL := \"https://dev.argocd.local\" -}}" }}
138+ {{- if eq .Environment "environment/development" -}}
139+ {{ "{{- $baseURL = \"https://dev.argocd.local\" -}}" }}
140+ {{- else if eq .Environment "environment/staging" -}}
141+ {{ "{{- $baseURL = \"https://staging.argocd.local\" -}}" }}
142+ {{- else if eq .Environment "environment/production" -}}
143+ {{ "{{- $baseURL = \"https://prod.argocd.local\" -}}" }}
144+ {{- end -}}
145+ {{ "{{- $labels := \"\" -}}" }}
146+ {{- range $key, $value := .ArgoCDCommitStatus.Spec.ApplicationSelector.MatchLabels -}}
147+ {{ "{{- $labels = printf \"%s%s=%s,\" $labels $key $value -}}" }}
148+ {{- end -}}
149+ {{ "{{ printf \"%s/applications?labels=%s\" $baseURL (urlQueryEscape $labels) }}" }}
137150 type : string
138151 type : object
139152 required :
@@ -148,14 +161,12 @@ spec:
148161 ApplicationsSelected represents the Argo CD applications that are selected by the commit status.
149162 This field is sorted by environment (same order as the referenced PromotionStrategy), then namespace, then name.
150163 items :
151- description : |-
152- ApplicationsSelected represents the Argo CD applications that are selected by the commit status. The fields in this
153- struct are all required, since the controller should always fully construct this information.
164+ description : ApplicationsSelected represents the Argo CD applications that are selected by the commit status.
154165 properties :
155166 clusterName :
156167 description : |-
157168 ClusterName is the name of the cluster that the application manifest is deployed to. An empty string indicates
158- the local cluster. There is no minimum length, since the local cluster is represented by an empty string.
169+ the local cluster.
159170 type : string
160171 environment :
161172 description : Environment is the syncSource.targetBranch of the Argo CD application (in effect, its environment).
@@ -167,30 +178,15 @@ spec:
167178 type : string
168179 name :
169180 description : Name is the name of the Argo CD application.
170- maxLength : 253
171- minLength : 1
172- pattern : ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
173181 type : string
174182 namespace :
175183 description : Namespace is the namespace of the Argo CD application.
176- maxLength : 63
177- minLength : 1
178- pattern : ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
179184 type : string
180185 phase :
181186 description : Phase is the current phase of the commit status.
182- enum :
183- - pending
184- - success
185- - failure
186187 type : string
187188 sha :
188- description : |-
189- Sha is the commit SHA that this status is associated with.
190- Supports both SHA-1 (40 chars) and SHA-256 (64 chars) Git hash formats.
191- maxLength : 64
192- minLength : 40
193- pattern : ^([a-f0-9]{40}|[a-f0-9]{64})$
189+ description : Sha is the commit SHA that this status is associated with.
194190 type : string
195191 required :
196192 - clusterName
0 commit comments