Skip to content

Commit 471e667

Browse files
ATGardnerscme0codefresh-v2-pipelines[bot]
authored
feat: support promotion with pull request (#880)
--------- Co-authored-by: scme0 <[email protected]> Co-authored-by: codefresh-v2-pipelines[bot] <109073600+codefresh-v2-pipelines[bot]@users.noreply.github.com>
1 parent baabd74 commit 471e667

File tree

2 files changed

+69
-18
lines changed

2 files changed

+69
-18
lines changed

charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ spec:
541541
promoteAppWithPR:
542542
properties:
543543
appStatus:
544+
description: APPStatus holds the status of the application
545+
after the PR was merged
544546
properties:
545547
health:
546548
description: Represents resource health status
@@ -563,6 +565,8 @@ spec:
563565
- sync
564566
type: object
565567
commitInfo:
568+
description: CommitInfo holds information about the commit
569+
that was created when the PR was merged
566570
properties:
567571
commitAuthorId:
568572
properties:
@@ -589,13 +593,66 @@ spec:
589593
description: PromoteAppWithPRPhase
590594
enum:
591595
- Pending
592-
- PRCreated
596+
- Suspended
593597
- Syncing
594598
- Complete
595599
type: string
596-
prUrl:
597-
format: uri
598-
type: string
600+
prInfo:
601+
description: PRInfo holds information about the created
602+
pull request
603+
properties:
604+
author:
605+
description: Pull request author
606+
type: string
607+
avatarUrl:
608+
description: Pull request author avatar url
609+
type: string
610+
baseBranch:
611+
description: Pull request base branch
612+
type: string
613+
createdAt:
614+
description: Pull request created at
615+
format: date-time
616+
type: string
617+
description:
618+
description: Pull request description
619+
type: string
620+
headBranch:
621+
description: Pull request head branch
622+
type: string
623+
id:
624+
description: Pull request id
625+
type: integer
626+
isMerged:
627+
description: Is pull request merged
628+
type: boolean
629+
mergeCommitSha:
630+
description: Commit sha from the pull request merge
631+
maxLength: 40
632+
minLength: 7
633+
pattern: ^[A-Fa-f0-9]+$
634+
type: string
635+
repo:
636+
description: Pull request repo name
637+
type: string
638+
state:
639+
description: Pull request state
640+
enum:
641+
- Open
642+
- Closed
643+
type: string
644+
title:
645+
description: Pull request title
646+
type: string
647+
url:
648+
description: Pull request url
649+
format: uri
650+
type: string
651+
required:
652+
- isMerged
653+
- state
654+
- url
655+
type: object
599656
required:
600657
- phase
601658
type: object

charts/gitops-runtime/values.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,10 @@ global:
189189
scrapeTimeout: 10s
190190
labels: {}
191191
config: {}
192-
193192
anchors:
194193
common-envs:
195-
# -- Telemetry configuration
196194
- &otel-config
195+
# -- Telemetry configuration
197196
# -- Base endpoint URL for all OpenTelemetry signals.
198197
# Ref: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/
199198
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://localhost:4317'
@@ -227,7 +226,6 @@ anchors:
227226
OTEL_EXPORTER_PROMETHEUS_PORT: '9464'
228227
# -- Emit the stable HTTP and networking OTel conventions if CF_TELEMETRY_OTEL_ALLOW_HTTP_INSTRUMENTATION=true.
229228
OTEL_SEMCONV_STABILITY_OPT_IN: 'http'
230-
231229
# -------------------------------------------------------------------------------------------------------------------------
232230
# Installer
233231
# -------------------------------------------------------------------------------------------------------------------------
@@ -272,26 +270,22 @@ sealed-secrets:
272270
argo-cd:
273271
enabled: true
274272
fullnameOverride: argo-cd
275-
276273
notifications:
277274
enabled: false
278-
279275
redis:
280276
## Redis image
281277
image:
282278
# -- Redis repository
283279
repository: ecr-public.aws.com/docker/library/redis
284280
# -- Redis tag
285281
tag: 8.2.2-alpine
286-
287282
redis-ha:
288283
## Redis-ha image
289284
image:
290285
# -- Redis repository
291286
repository: ecr-public.aws.com/docker/library/redis
292287
# -- Redis tag
293288
tag: 8.2.2-alpine
294-
295289
configs:
296290
cm:
297291
timeout.reconciliation: 20s
@@ -501,14 +495,14 @@ app-proxy:
501495
tag: 1.1.17-main
502496
image:
503497
repository: quay.io/codefresh/cap-app-proxy
504-
tag: 1.3883.0
498+
tag: 1.3899.0
505499
pullPolicy: IfNotPresent
506500
# -- Extra volume mounts for main container
507501
extraVolumeMounts: []
508502
initContainer:
509503
image:
510504
repository: quay.io/codefresh/cap-app-proxy-init
511-
tag: 1.3883.0
505+
tag: 1.3899.0
512506
pullPolicy: IfNotPresent
513507
command:
514508
- ./init.sh
@@ -570,7 +564,7 @@ app-proxy:
570564
# -- Cors settings for app-proxy. This is the list of allowed domains for platform (comma separated).
571565
cors: "https://g.codefresh.io"
572566
env:
573-
<<:
567+
!!merge <<:
574568
- *otel-config
575569
# -- Level of logging for app-proxy
576570
CF_TELEMETRY_LOGS_LEVEL: 'info'
@@ -688,9 +682,9 @@ gitops-operator:
688682
# -- defaults
689683
registry: quay.io
690684
repository: codefresh/codefresh-gitops-operator
691-
tag: "293f24f"
685+
tag: "6882325"
692686
env:
693-
<<:
687+
!!merge <<:
694688
- *otel-config
695689
GITOPS_OPERATOR_VERSION: 0.11.1
696690
serviceAccount:
@@ -859,11 +853,11 @@ redis:
859853
event-reporters:
860854
cluster-event-reporter:
861855
env:
862-
<<:
856+
!!merge <<:
863857
- *otel-config
864858
runtime-event-reporter:
865859
env:
866-
<<:
860+
!!merge <<:
867861
- *otel-config
868862
# -- Redis-HA subchart replaces custom redis deployment when `redis-ha.enabled=true`
869863
# Ref: https://github.com/DandyDeveloper/charts/blob/master/charts/redis-ha/values.yaml

0 commit comments

Comments
 (0)