Skip to content

Commit fc09572

Browse files
Merge pull request #6117 from devtron-labs/release-candidate-v0.23.0
Release: Release candidate v0.23.0
2 parents 494eee8 + a32b9ed commit fc09572

File tree

220 files changed

+6992
-4118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+6992
-4118
lines changed

App.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ import (
4747
)
4848

4949
type App struct {
50-
MuxRouter *router.MuxRouter
51-
Logger *zap.SugaredLogger
52-
SSE *sse.SSE
53-
Enforcer *casbin.SyncedEnforcer
54-
EnforcerV2 *casbinv2.SyncedEnforcer
55-
server *http.Server
56-
db *pg.DB
57-
posthogClient *telemetry.PosthogClient
58-
centralEventProcessor *eventProcessor.CentralEventProcessor
50+
MuxRouter *router.MuxRouter
51+
Logger *zap.SugaredLogger
52+
SSE *sse.SSE
53+
Enforcer *casbin.SyncedEnforcer
54+
EnforcerV2 *casbinv2.SyncedEnforcer
55+
server *http.Server
56+
db *pg.DB
57+
posthogClient *telemetry.PosthogClient
58+
// eventProcessor.CentralEventProcessor is used to register event processors
59+
centralEventProcessor *eventProcessor.CentralEventProcessor // do not remove this.
5960
// used for local dev only
6061
serveTls bool
6162
sessionManager2 *authMiddleware.SessionManager
@@ -85,7 +86,7 @@ func NewApp(router *router.MuxRouter,
8586
Logger: Logger,
8687
SSE: sse,
8788
Enforcer: enforcer,
88-
EnforcerV2: enforcerV2,
89+
EnforcerV2: enforcerV2,
8990
db: db,
9091
serveTls: false,
9192
sessionManager2: sessionManager2,

Wire.go

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ import (
122122
"github.com/devtron-labs/devtron/pkg/asyncProvider"
123123
"github.com/devtron-labs/devtron/pkg/attributes"
124124
"github.com/devtron-labs/devtron/pkg/build"
125+
"github.com/devtron-labs/devtron/pkg/build/artifacts/imageTagging"
126+
pipeline6 "github.com/devtron-labs/devtron/pkg/build/pipeline"
125127
"github.com/devtron-labs/devtron/pkg/bulkAction"
126128
"github.com/devtron-labs/devtron/pkg/chart"
127129
"github.com/devtron-labs/devtron/pkg/chart/gitOpsConfig"
@@ -132,12 +134,13 @@ import (
132134
deployment2 "github.com/devtron-labs/devtron/pkg/deployment"
133135
"github.com/devtron-labs/devtron/pkg/deployment/common"
134136
git2 "github.com/devtron-labs/devtron/pkg/deployment/gitOps/git"
137+
"github.com/devtron-labs/devtron/pkg/deployment/manifest/configMapAndSecret"
138+
"github.com/devtron-labs/devtron/pkg/deployment/manifest/deploymentTemplate"
135139
"github.com/devtron-labs/devtron/pkg/deployment/manifest/publish"
136140
"github.com/devtron-labs/devtron/pkg/deploymentGroup"
137141
"github.com/devtron-labs/devtron/pkg/dockerRegistry"
138142
"github.com/devtron-labs/devtron/pkg/eventProcessor"
139143
"github.com/devtron-labs/devtron/pkg/generateManifest"
140-
"github.com/devtron-labs/devtron/pkg/git"
141144
"github.com/devtron-labs/devtron/pkg/gitops"
142145
"github.com/devtron-labs/devtron/pkg/imageDigestPolicy"
143146
infraConfigService "github.com/devtron-labs/devtron/pkg/infraConfig"
@@ -201,15 +204,14 @@ func InitializeApp() (*App, error) {
201204
apiToken.ApiTokenWireSet,
202205
webhookHelm.WebhookHelmWireSet,
203206
terminal.TerminalWireSet,
204-
build.BuildWireSet,
207+
build.WireSet,
205208
deployment2.DeploymentWireSet,
206209
argoApplication.ArgoApplicationWireSetFull,
207210
fluxApplication.FluxApplicationWireSet,
208211
eventProcessor.EventProcessorWireSet,
209212
workflow3.WorkflowWireSet,
210-
213+
imageTagging.WireSet,
211214
devtronResource.DevtronResourceWireSet,
212-
213215
// -------wireset end ----------
214216
// -------
215217
gitSensor.GetConfig,
@@ -337,8 +339,6 @@ func InitializeApp() (*App, error) {
337339

338340
pipeline.NewCiCdPipelineOrchestrator,
339341
wire.Bind(new(pipeline.CiCdPipelineOrchestrator), new(*pipeline.CiCdPipelineOrchestratorImpl)),
340-
pipelineConfig.NewMaterialRepositoryImpl,
341-
wire.Bind(new(pipelineConfig.MaterialRepository), new(*pipelineConfig.MaterialRepositoryImpl)),
342342

343343
// scoped variables start
344344
variables.NewScopedVariableServiceImpl,
@@ -377,11 +377,6 @@ func InitializeApp() (*App, error) {
377377
pipeline.NewCustomTagService,
378378
wire.Bind(new(pipeline.CustomTagService), new(*pipeline.CustomTagServiceImpl)),
379379

380-
repository.NewGitProviderRepositoryImpl,
381-
wire.Bind(new(repository.GitProviderRepository), new(*repository.GitProviderRepositoryImpl)),
382-
pipeline.NewGitRegistryConfigImpl,
383-
wire.Bind(new(pipeline.GitRegistryConfig), new(*pipeline.GitRegistryConfigImpl)),
384-
385380
appList.NewAppFilteringRouterImpl,
386381
wire.Bind(new(appList.AppFilteringRouter), new(*appList.AppFilteringRouterImpl)),
387382
appList2.NewAppFilteringRestHandlerImpl,
@@ -450,8 +445,8 @@ func InitializeApp() (*App, error) {
450445
// session.NewK8sClient,
451446
repository8.NewImageTaggingRepositoryImpl,
452447
wire.Bind(new(repository8.ImageTaggingRepository), new(*repository8.ImageTaggingRepositoryImpl)),
453-
pipeline.NewImageTaggingServiceImpl,
454-
wire.Bind(new(pipeline.ImageTaggingService), new(*pipeline.ImageTaggingServiceImpl)),
448+
imageTagging.NewImageTaggingServiceImpl,
449+
wire.Bind(new(imageTagging.ImageTaggingService), new(*imageTagging.ImageTaggingServiceImpl)),
455450
argocdServer.NewVersionServiceImpl,
456451
wire.Bind(new(argocdServer.VersionService), new(*argocdServer.VersionServiceImpl)),
457452

@@ -495,12 +490,6 @@ func InitializeApp() (*App, error) {
495490
restHandler.NewGitWebhookRestHandlerImpl,
496491
wire.Bind(new(restHandler.GitWebhookRestHandler), new(*restHandler.GitWebhookRestHandlerImpl)),
497492

498-
git.NewGitWebhookServiceImpl,
499-
wire.Bind(new(git.GitWebhookService), new(*git.GitWebhookServiceImpl)),
500-
501-
repository.NewGitWebhookRepositoryImpl,
502-
wire.Bind(new(repository.GitWebhookRepository), new(*repository.GitWebhookRepositoryImpl)),
503-
504493
pipeline.NewCiHandlerImpl,
505494
wire.Bind(new(pipeline.CiHandler), new(*pipeline.CiHandlerImpl)),
506495

@@ -743,8 +732,6 @@ func InitializeApp() (*App, error) {
743732
wire.Bind(new(restHandler.CoreAppRestHandler), new(*restHandler.CoreAppRestHandlerImpl)),
744733

745734
// Webhook
746-
repository.NewGitHostRepositoryImpl,
747-
wire.Bind(new(repository.GitHostRepository), new(*repository.GitHostRepositoryImpl)),
748735
restHandler.NewGitHostRestHandlerImpl,
749736
wire.Bind(new(restHandler.GitHostRestHandler), new(*restHandler.GitHostRestHandlerImpl)),
750737
restHandler.NewWebhookEventHandlerImpl,
@@ -753,10 +740,6 @@ func InitializeApp() (*App, error) {
753740
wire.Bind(new(router.GitHostRouter), new(*router.GitHostRouterImpl)),
754741
router.NewWebhookListenerRouterImpl,
755742
wire.Bind(new(router.WebhookListenerRouter), new(*router.WebhookListenerRouterImpl)),
756-
git.NewWebhookSecretValidatorImpl,
757-
wire.Bind(new(git.WebhookSecretValidator), new(*git.WebhookSecretValidatorImpl)),
758-
pipeline.NewGitHostConfigImpl,
759-
wire.Bind(new(pipeline.GitHostConfig), new(*pipeline.GitHostConfigImpl)),
760743
repository.NewWebhookEventDataRepositoryImpl,
761744
wire.Bind(new(repository.WebhookEventDataRepository), new(*repository.WebhookEventDataRepositoryImpl)),
762745
pipeline.NewWebhookEventDataConfigImpl,
@@ -819,10 +802,10 @@ func InitializeApp() (*App, error) {
819802
wire.Bind(new(history3.PrePostCdScriptHistoryService), new(*history3.PrePostCdScriptHistoryServiceImpl)),
820803
history3.NewPrePostCiScriptHistoryServiceImpl,
821804
wire.Bind(new(history3.PrePostCiScriptHistoryService), new(*history3.PrePostCiScriptHistoryServiceImpl)),
822-
history3.NewDeploymentTemplateHistoryServiceImpl,
823-
wire.Bind(new(history3.DeploymentTemplateHistoryService), new(*history3.DeploymentTemplateHistoryServiceImpl)),
824-
history3.NewConfigMapHistoryServiceImpl,
825-
wire.Bind(new(history3.ConfigMapHistoryService), new(*history3.ConfigMapHistoryServiceImpl)),
805+
deploymentTemplate.NewDeploymentTemplateHistoryServiceImpl,
806+
wire.Bind(new(deploymentTemplate.DeploymentTemplateHistoryService), new(*deploymentTemplate.DeploymentTemplateHistoryServiceImpl)),
807+
configMapAndSecret.NewConfigMapHistoryServiceImpl,
808+
wire.Bind(new(configMapAndSecret.ConfigMapHistoryService), new(*configMapAndSecret.ConfigMapHistoryServiceImpl)),
826809
history3.NewPipelineStrategyHistoryServiceImpl,
827810
wire.Bind(new(history3.PipelineStrategyHistoryService), new(*history3.PipelineStrategyHistoryServiceImpl)),
828811
history3.NewGitMaterialHistoryServiceImpl,
@@ -903,6 +886,8 @@ func InitializeApp() (*App, error) {
903886
wire.Bind(new(pipeline.CiBuildConfigService), new(*pipeline.CiBuildConfigServiceImpl)),
904887
pipeline.NewCiTemplateServiceImpl,
905888
wire.Bind(new(pipeline.CiTemplateService), new(*pipeline.CiTemplateServiceImpl)),
889+
pipeline6.NewCiTemplateReadServiceImpl,
890+
wire.Bind(new(pipeline6.CiTemplateReadService), new(*pipeline6.CiTemplateReadServiceImpl)),
906891
router.NewGlobalCMCSRouterImpl,
907892
wire.Bind(new(router.GlobalCMCSRouter), new(*router.GlobalCMCSRouterImpl)),
908893
restHandler.NewGlobalCMCSRestHandlerImpl,

api/appbean/AppDetail.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
package appbean
1818

1919
import (
20+
"github.com/devtron-labs/devtron/internal/sql/constants"
2021
"github.com/devtron-labs/devtron/internal/sql/models"
2122
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig"
23+
bean2 "github.com/devtron-labs/devtron/pkg/build/pipeline/bean"
2224
"github.com/devtron-labs/devtron/pkg/chartRepo/repository"
2325
"github.com/devtron-labs/devtron/pkg/pipeline/bean"
24-
"github.com/devtron-labs/devtron/pkg/pipeline/bean/CiPipeline"
2526
)
2627

2728
type AppDetail struct {
@@ -62,11 +63,11 @@ type GitMaterial struct {
6263
}
6364

6465
type DockerConfig struct {
65-
DockerRegistry string `json:"dockerRegistry" validate:"required"`
66-
DockerRepository string `json:"dockerRepository" validate:"required"`
67-
CiBuildConfig *CiPipeline.CiBuildConfigBean `json:"ciBuildConfig"`
68-
DockerBuildConfig *DockerBuildConfig `json:"dockerBuildConfig,omitempty"` // Deprecated, should use CiBuildConfig for development
69-
CheckoutPath string `json:"checkoutPath"`
66+
DockerRegistry string `json:"dockerRegistry" validate:"required"`
67+
DockerRepository string `json:"dockerRepository" validate:"required"`
68+
CiBuildConfig *bean2.CiBuildConfigBean `json:"ciBuildConfig"`
69+
DockerBuildConfig *DockerBuildConfig `json:"dockerBuildConfig,omitempty"` // Deprecated, should use CiBuildConfig for development
70+
CheckoutPath string `json:"checkoutPath"`
7071
}
7172

7273
type DockerBuildConfig struct {
@@ -111,10 +112,10 @@ type CiPipelineDetails struct {
111112
}
112113

113114
type CiPipelineMaterialConfig struct {
114-
Type pipelineConfig.SourceType `json:"type,omitempty" validate:"oneof=SOURCE_TYPE_BRANCH_FIXED SOURCE_TYPE_BRANCH_REGEX SOURCE_TYPE_TAG_ANY WEBHOOK"`
115-
Value string `json:"value,omitempty" `
116-
CheckoutPath string `json:"checkoutPath"`
117-
GitMaterialId int `json:"gitMaterialId"`
115+
Type constants.SourceType `json:"type,omitempty" validate:"oneof=SOURCE_TYPE_BRANCH_FIXED SOURCE_TYPE_BRANCH_REGEX SOURCE_TYPE_TAG_ANY WEBHOOK"`
116+
Value string `json:"value,omitempty" `
117+
CheckoutPath string `json:"checkoutPath"`
118+
GitMaterialId int `json:"gitMaterialId"`
118119
}
119120

120121
type BuildScript struct {

api/argoApplication/wire_argoApplication.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ package argoApplication
1919
import (
2020
"github.com/devtron-labs/devtron/pkg/argoApplication"
2121
"github.com/devtron-labs/devtron/pkg/argoApplication/read"
22+
"github.com/devtron-labs/devtron/pkg/argoApplication/read/config"
2223
"github.com/google/wire"
2324
)
2425

2526
var ArgoApplicationWireSetFull = wire.NewSet(
2627
read.NewArgoApplicationReadServiceImpl,
2728
wire.Bind(new(read.ArgoApplicationReadService), new(*read.ArgoApplicationReadServiceImpl)),
2829

30+
config.NewArgoApplicationConfigServiceImpl,
31+
wire.Bind(new(config.ArgoApplicationConfigService), new(*config.ArgoApplicationConfigServiceImpl)),
32+
2933
argoApplication.NewArgoApplicationServiceExtendedServiceImpl,
3034
wire.Bind(new(argoApplication.ArgoApplicationService), new(*argoApplication.ArgoApplicationServiceExtendedImpl)),
3135

@@ -40,6 +44,9 @@ var ArgoApplicationWireSetEA = wire.NewSet(
4044
read.NewArgoApplicationReadServiceImpl,
4145
wire.Bind(new(read.ArgoApplicationReadService), new(*read.ArgoApplicationReadServiceImpl)),
4246

47+
config.NewArgoApplicationConfigServiceImpl,
48+
wire.Bind(new(config.ArgoApplicationConfigService), new(*config.ArgoApplicationConfigServiceImpl)),
49+
4350
argoApplication.NewArgoApplicationServiceImpl,
4451
wire.Bind(new(argoApplication.ArgoApplicationService), new(*argoApplication.ArgoApplicationServiceImpl)),
4552

0 commit comments

Comments
 (0)