Skip to content

Commit e7b197d

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron into target-platform-display
# Conflicts: # go.mod # go.sum # vendor/modules.txt
2 parents 01a5f90 + 822fa30 commit e7b197d

File tree

106 files changed

+6973
-2027
lines changed

Some content is hidden

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

106 files changed

+6973
-2027
lines changed

Dockerfile

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,46 @@
11
FROM golang:1.21 AS build-env
22

3-
RUN echo $GOPATH
4-
RUN apt update
5-
RUN apt install git gcc musl-dev make -y
6-
RUN go install github.com/google/wire/cmd/wire@latest
3+
RUN echo $GOPATH && \
4+
apt update && \
5+
apt install git gcc musl-dev make -y && \
6+
go install github.com/google/wire/cmd/wire@latest
7+
78
WORKDIR /go/src/github.com/devtron-labs/devtron
9+
810
ADD . /go/src/github.com/devtron-labs/devtron/
11+
912
ADD ./vendor/github.com/Microsoft/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/microsoft/
10-
RUN GOOS=linux make build-all
13+
14+
RUN GOOS=linux make build
1115

1216
# uncomment this post build arg
1317
FROM ubuntu:22.04@sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95 as devtron-all
1418

15-
RUN apt update
16-
RUN apt install ca-certificates git curl -y
17-
RUN apt clean autoclean
18-
RUN apt autoremove -y && rm -rf /var/lib/apt/lists/*
19-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/devtron .
20-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf .
21-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
22-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/argocd-assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
23-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/devtron-reference-helm-charts scripts/devtron-reference-helm-charts
24-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/sql scripts/sql
25-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/casbin scripts/casbin
26-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/argo-assets/APPLICATION_TEMPLATE.tmpl scripts/argo-assets/APPLICATION_TEMPLATE.tmpl
27-
28-
COPY ./git-ask-pass.sh /git-ask-pass.sh
29-
RUN chmod +x /git-ask-pass.sh
30-
31-
RUN useradd -ms /bin/bash devtron
32-
RUN chown -R devtron:devtron ./devtron
33-
RUN chown -R devtron:devtron ./git-ask-pass.sh
34-
RUN chown -R devtron:devtron ./auth_model.conf
35-
RUN chown -R devtron:devtron ./scripts
19+
RUN apt update && \
20+
apt install ca-certificates git curl -y && \
21+
apt clean autoclean && \
22+
apt autoremove -y && \
23+
rm -rf /var/lib/apt/lists/* && \
24+
useradd -ms /bin/bash devtron
3625

37-
USER devtron
26+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/devtron .
27+
28+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf .
3829

39-
CMD ["./devtron"]
30+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/argocd-assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
4031

32+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/devtron-reference-helm-charts scripts/devtron-reference-helm-charts
4133

42-
#FROM alpine:3.15.0 as devtron-ea
34+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/sql scripts/sql
4335

44-
#RUN apk add --no-cache ca-certificates
45-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf .
46-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/cmd/external-app/devtron-ea .
36+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/casbin scripts/casbin
4737

48-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
49-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/devtron-reference-helm-charts scripts/devtron-reference-helm-charts
50-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/argo-assets/APPLICATION_TEMPLATE.JSON scripts/argo-assets/APPLICATION_TEMPLATE.JSON
38+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/argo-assets/APPLICATION_TEMPLATE.tmpl scripts/argo-assets/APPLICATION_TEMPLATE.tmpl
39+
40+
COPY --chown=devtron:devtron ./git-ask-pass.sh /git-ask-pass.sh
41+
42+
RUN chmod +x /git-ask-pass.sh
43+
44+
USER devtron
5145

52-
#CMD ["./devtron-ea"]
46+
CMD ["./devtron"]

DockerfileEA

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
11
FROM golang:1.21 AS build-env
22

3-
RUN echo $GOPATH
4-
RUN apt update
5-
RUN apt install git gcc musl-dev make -y
6-
RUN go install github.com/google/wire/cmd/wire@latest
3+
RUN echo $GOPATH && \
4+
apt update && \
5+
apt install git gcc musl-dev make -y && \
6+
go install github.com/google/wire/cmd/wire@latest
7+
78
WORKDIR /go/src/github.com/devtron-labs/devtron
9+
810
ADD . /go/src/github.com/devtron-labs/devtron/
11+
912
ADD ./vendor/github.com/Microsoft/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/microsoft/
13+
1014
RUN GOOS=linux make build-all
1115

1216
FROM ubuntu:22.04@sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95 as devtron-ea
1317

14-
RUN apt update
15-
RUN apt install ca-certificates curl -y
16-
RUN apt clean autoclean
17-
RUN apt autoremove -y && rm -rf /var/lib/apt/lists/*
18-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf .
19-
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/cmd/external-app/devtron-ea .
18+
RUN apt update && \
19+
apt install ca-certificates curl -y && \
20+
apt clean autoclean && \
21+
apt autoremove -y && rm -rf /var/lib/apt/lists/* && \
22+
useradd -ms /bin/bash devtron
23+
24+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/auth_model.conf .
25+
26+
COPY --chown=devtron:devtron --from=build-env /go/src/github.com/devtron-labs/devtron/cmd/external-app/devtron-ea .
2027

21-
#COPY --from=build-env /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
2228
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/argocd-assets/ /go/src/github.com/devtron-labs/devtron/vendor/github.com/argoproj/argo-cd/assets
29+
2330
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/devtron-reference-helm-charts scripts/devtron-reference-helm-charts
31+
2432
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/sql scripts/sql
33+
2534
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/casbin scripts/casbin
35+
2636
COPY --from=build-env /go/src/github.com/devtron-labs/devtron/scripts/argo-assets/APPLICATION_TEMPLATE.tmpl scripts/argo-assets/APPLICATION_TEMPLATE.tmpl
2737

28-
RUN useradd -ms /bin/bash devtron
29-
RUN chown -R devtron:devtron ./devtron-ea
30-
RUN chown -R devtron:devtron ./auth_model.conf
3138
RUN chown -R devtron:devtron ./scripts
3239

3340
USER devtron

Wire.go

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import (
4343
"github.com/devtron-labs/devtron/api/externalLink"
4444
fluxApplication "github.com/devtron-labs/devtron/api/fluxApplication"
4545
client "github.com/devtron-labs/devtron/api/helm-app"
46-
"github.com/devtron-labs/devtron/api/infraConfig"
4746
"github.com/devtron-labs/devtron/api/k8s"
4847
"github.com/devtron-labs/devtron/api/module"
4948
"github.com/devtron-labs/devtron/api/resourceScan"
@@ -82,7 +81,7 @@ import (
8281
"github.com/devtron-labs/devtron/client/argocdServer/bean"
8382
"github.com/devtron-labs/devtron/client/argocdServer/certificate"
8483
cluster2 "github.com/devtron-labs/devtron/client/argocdServer/cluster"
85-
"github.com/devtron-labs/devtron/client/argocdServer/config"
84+
acdConfig "github.com/devtron-labs/devtron/client/argocdServer/config"
8685
"github.com/devtron-labs/devtron/client/argocdServer/connection"
8786
"github.com/devtron-labs/devtron/client/argocdServer/repoCredsK8sClient"
8887
repocreds "github.com/devtron-labs/devtron/client/argocdServer/repocreds"
@@ -131,7 +130,8 @@ import (
131130
"github.com/devtron-labs/devtron/pkg/chart/gitOpsConfig"
132131
chartRepoRepository "github.com/devtron-labs/devtron/pkg/chartRepo/repository"
133132
"github.com/devtron-labs/devtron/pkg/commonService"
134-
"github.com/devtron-labs/devtron/pkg/configDiff"
133+
"github.com/devtron-labs/devtron/pkg/config"
134+
"github.com/devtron-labs/devtron/pkg/config/configDiff"
135135
delete2 "github.com/devtron-labs/devtron/pkg/delete"
136136
deployment2 "github.com/devtron-labs/devtron/pkg/deployment"
137137
"github.com/devtron-labs/devtron/pkg/deployment/common"
@@ -145,17 +145,14 @@ import (
145145
"github.com/devtron-labs/devtron/pkg/generateManifest"
146146
"github.com/devtron-labs/devtron/pkg/gitops"
147147
"github.com/devtron-labs/devtron/pkg/imageDigestPolicy"
148-
repository11 "github.com/devtron-labs/devtron/pkg/infraConfig/repository"
149-
infraConfigService "github.com/devtron-labs/devtron/pkg/infraConfig/service"
150-
"github.com/devtron-labs/devtron/pkg/infraConfig/units"
148+
"github.com/devtron-labs/devtron/pkg/infraConfig"
151149
"github.com/devtron-labs/devtron/pkg/kubernetesResourceAuditLogs"
152150
repository7 "github.com/devtron-labs/devtron/pkg/kubernetesResourceAuditLogs/repository"
153151
"github.com/devtron-labs/devtron/pkg/notifier"
154152
"github.com/devtron-labs/devtron/pkg/pipeline"
155153
"github.com/devtron-labs/devtron/pkg/pipeline/executors"
156154
history3 "github.com/devtron-labs/devtron/pkg/pipeline/history"
157155
repository3 "github.com/devtron-labs/devtron/pkg/pipeline/history/repository"
158-
"github.com/devtron-labs/devtron/pkg/pipeline/infraProviders"
159156
repository5 "github.com/devtron-labs/devtron/pkg/pipeline/repository"
160157
"github.com/devtron-labs/devtron/pkg/pipeline/types"
161158
"github.com/devtron-labs/devtron/pkg/plugin"
@@ -280,20 +277,6 @@ func InitializeApp() (*App, error) {
280277
wire.Bind(new(dashboardEvent.DashboardTelemetryRouter),
281278
new(*dashboardEvent.DashboardTelemetryRouterImpl)),
282279

283-
repository11.NewInfraProfileRepositoryImpl,
284-
wire.Bind(new(repository11.InfraConfigRepository), new(*repository11.InfraConfigRepositoryImpl)),
285-
286-
units.NewUnits,
287-
infraConfigService.NewInfraConfigServiceImpl,
288-
wire.Bind(new(infraConfigService.InfraConfigService), new(*infraConfigService.InfraConfigServiceImpl)),
289-
infraProviders.NewInfraProviderImpl,
290-
wire.Bind(new(infraProviders.InfraProvider), new(*infraProviders.InfraProviderImpl)),
291-
infraConfig.NewInfraConfigRestHandlerImpl,
292-
wire.Bind(new(infraConfig.InfraConfigRestHandler), new(*infraConfig.InfraConfigRestHandlerImpl)),
293-
294-
infraConfig.NewInfraProfileRouterImpl,
295-
wire.Bind(new(infraConfig.InfraConfigRouter), new(*infraConfig.InfraConfigRouterImpl)),
296-
297280
router.NewMuxRouter,
298281

299282
app2.NewAppRepositoryImpl,
@@ -528,6 +511,10 @@ func InitializeApp() (*App, error) {
528511
chartConfig.NewConfigMapRepositoryImpl,
529512
wire.Bind(new(chartConfig.ConfigMapRepository), new(*chartConfig.ConfigMapRepositoryImpl)),
530513

514+
config.WireSet,
515+
516+
infraConfig.WireSet,
517+
531518
notifier.NewSESNotificationServiceImpl,
532519
wire.Bind(new(notifier.SESNotificationService), new(*notifier.SESNotificationServiceImpl)),
533520

@@ -962,8 +949,8 @@ func InitializeApp() (*App, error) {
962949
dbMigration.NewDbMigrationServiceImpl,
963950
wire.Bind(new(dbMigration.DbMigration), new(*dbMigration.DbMigrationServiceImpl)),
964951

965-
config.NewArgoCDConfigGetter,
966-
wire.Bind(new(config.ArgoCDConfigGetter), new(*config.ArgoCDConfigGetterImpl)),
952+
acdConfig.NewArgoCDConfigGetter,
953+
wire.Bind(new(acdConfig.ArgoCDConfigGetter), new(*acdConfig.ArgoCDConfigGetterImpl)),
967954
)
968955
return &App{}, nil
969956
}

0 commit comments

Comments
 (0)