Skip to content

Commit

Permalink
Merge branch 'main' into release-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
pawan-mehta-dt authored Jul 10, 2024
2 parents b8430ec + 15250bf commit 7ba8aa3
Show file tree
Hide file tree
Showing 1,026 changed files with 163,799 additions and 11,969 deletions.
50 changes: 49 additions & 1 deletion .gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ redirects:
setup/global-configurations/authorization/permission-groups: user-guide/global-configurations/authorization/permission-groups.md
setup/global-configurations/authorization/api-tokens: user-guide/global-configurations/authorization/api-tokens.md
setup/global-configurations/nodejs_app: user-guide/Deploy-sample-app/nodejs_app.md
setup/global-configurations/host-url: user-guide/global-configurations/host-url.md
setup/global-configurations/authorization/sso/google: user-guide/global-configurations/authorization/sso/google.md
setup/global-configurations/authorization/sso/github: user-guide/global-configurations/authorization/sso/github.md
setup/global-configurations/authorization/sso/gitlab: user-guide/global-configurations/authorization/sso/gitlab.md
setup/global-configurations/authorization/sso/microsoft: user-guide/global-configurations/authorization/sso/microsoft.md
setup/global-configurations/authorization/sso/ldap: user-guide/global-configurations/authorization/sso/ldap.md
setup/global-configurations/authorization/sso/oidc: user-guide/global-configurations/authorization/sso/oidc.md
setup/global-configurations/authorization/sso/openshift: user-guide/global-configurations/authorization/sso/openshift.md
setup/global-configurations/okta: user-guide/global-configurations/okta.md
setup/global-configurations/catalog-framework: user-guide/global-configurations/catalog-framework.md
setup/global-configurations/scoped-variables: user-guide/global-configurations/scoped-variables.md
setup/global-configurations/pull-image-digest: user-guide/global-configurations/pull-image-digest.md
setup/global-configurations/tags-policy: user-guide/global-configurations/tags-policy.md
setup/global-configurations/lock-deployment-config: user-guide/global-configurations/lock-deployment-config.md
setup/global-configurations/image-promotion-policy: user-guide/global-configurations/image-promotion-policy.md
setup/global-configurations/filter-condition: user-guide/global-configurations/filter-condition.md
setup/global-configurations/build-infra: user-guide/global-configurations/build-infra.md
user-guide/creating-application: user-guide/applications.md
user-guide/creating-application/git-material: usage/applications/creating-application/git-material
user-guide/creating-application/docker-build-configuration: usage/applications/creating-application/docker-build-configuration
Expand Down Expand Up @@ -69,12 +86,43 @@ redirects:
user-guide/use-cases/connect-expressjs-with-mongodb-database: resources/use-cases/connect-expressjs-with-mongodb-database
user-guide/use-cases/connect-django-with-mysql-database: resources/use-cases/connect-django-with-mysql-database
user-guide/telemetry: resources/telemetry
getting-started/install/installation-configuration: setup/install/installation-configuration.md
getting-started/global-configurations: user-guide/global-configurations/README.md
getting-started/global-configurations/container-registries: user-guide/global-configurations/container-registries.md
getting-started/global-configurations/sso-login: user-guide/global-configurations/sso-login.md
getting-started/global-configurations/docker-registries: user-guide/global-configurations/container-registries.md
getting-started/global-configurations/host-url: user-guide/global-configurations/host-url.md
getting-started/global-configurations/authorization/sso/google: user-guide/global-configurations/authorization/sso/google.md
getting-started/global-configurations/authorization/sso/github: user-guide/global-configurations/authorization/sso/github.md
getting-started/global-configurations/authorization/sso/gitlab: user-guide/global-configurations/authorization/sso/gitlab.md
getting-started/global-configurations/authorization/sso/microsoft: user-guide/global-configurations/authorization/sso/microsoft.md
getting-started/global-configurations/authorization/sso/ldap: user-guide/global-configurations/authorization/sso/ldap.md
getting-started/global-configurations/authorization/sso/oidc: user-guide/global-configurations/authorization/sso/oidc.md
getting-started/global-configurations/authorization/sso/openshift: user-guide/global-configurations/authorization/sso/openshift.md
getting-started/global-configurations/okta: user-guide/global-configurations/okta.md
getting-started/global-configurations/catalog-framework: user-guide/global-configurations/catalog-framework.md
getting-started/global-configurations/scoped-variables: user-guide/global-configurations/scoped-variables.md
getting-started/global-configurations/pull-image-digest: user-guide/global-configurations/pull-image-digest.md
getting-started/global-configurations/tags-policy: user-guide/global-configurations/tags-policy.md
getting-started/global-configurations/lock-deployment-config: user-guide/global-configurations/lock-deployment-config.md
getting-started/global-configurations/image-promotion-policy: user-guide/global-configurations/image-promotion-policy.md
getting-started/global-configurations/filter-condition: user-guide/global-configurations/filter-condition.md
getting-started/global-configurations/build-infra: user-guide/global-configurations/build-infra.md
getting-started/global-configurations/gitops: user-guide/global-configurations/gitops.md
getting-started/global-configurations/custom-charts: user-guide/global-configurations/custom-charts.md
getting-started/global-configurations/external-links: user-guide/global-configurations/external-links.md
getting-started/global-configurations/projects: user-guide/global-configurations/projects.md
getting-started/global-configurations/manage-notification: user-guide/global-configurations/manage-notification.md
getting-started/global-configurations/git-accounts: user-guide/global-configurations/git-accounts.md
getting-started/global-configurations/chart-repo: user-guide/global-configurations/chart-repo.md
getting-started/global-configurations/cluster-and-environments: user-guide/global-configurations/cluster-and-environments.md
getting-started/global-configurations/authorization: user-guide/global-configurations/authorization/README.md
getting-started/global-configurations/authorization/user-access: user-guide/global-configurations/authorization/user-access.md
getting-started/global-configurations/authorization/permission-groups: user-guide/global-configurations/authorization/permission-groups.md
getting-started/global-configurations/authorization/api-tokens: user-guide/global-configurations/authorization/api-tokens.md
global-configurations/sso-login: user-guide/global-configurations/sso-login.md
user-guide/use-cases/untitled-3: user-guide/use-cases/connect-django-with-mysql-database.md
global-configurations/api-token: user-guide/global-configurations/authorization/api-tokens.md
user-guide/creating-application/workflow/ci-pipeline2: user-guide/creating-application/workflow/ci-pipeline.md
user-guide/clusters: user-guide/resource-browser.md
usage/clusters: user-guide/resource-browser.md
usage/clusters: user-guide/resource-browser.md
15 changes: 12 additions & 3 deletions .github/workflows/pr-issue-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,18 @@ jobs:
fi
### For ex: Fixes #2123
pattern1="((Fixes|Resolves) #[0-9]+)"
### For ex: Fixes: #2123
pattern1="((Fixes|Resolves):? #[0-9]+)"
### For ex: Resolves https://github.com/devtron-labs/devtron/issues/2123
pattern2="((Fixes|Resolves) https://github.com/devtron-labs/devtron/issues/[0-9]+)"
pattern2="((Fixes|Resolves):? https://github.com/devtron-labs/devtron/issues/[0-9]+)"
### For ex: Fixes devtron-labs/devtron#2123
pattern3="((Fixes|Resolves) devtron-labs/devtron#[0-9]+)"
pattern3="((Fixes|Resolves):? devtron-labs/devtron#[0-9]+)"
### For ex: Fixes [#4839](https://github.com/devtron-labs/devtron/issues/4839)
pattern4="(Fixes|Resolves):?\s+\[#([0-9]+)\]"
# Get the pull request body
PR_BODY=$(jq -r '.pull_request.body' $GITHUB_EVENT_PATH)
Expand All @@ -92,6 +97,10 @@ jobs:
echo "$PR_BODY" | grep -iE "$pattern3" | head -n1 | awk -F '#' '{print $NF}' | tr -d '\r\n' > issue_num
issue_num=$(cat issue_num)
echo "issue_num is : $issue_num"
elif echo "$PR_BODY" | grep -iEq "$pattern4"; then
echo "$PR_BODY" | grep -oP "$pattern4" | head -n1 | grep -oP '#\K[0-9]+' | tr -d '\r\n' > issue_num
issue_num=$(cat issue_num)
echo "issue_num is : $issue_num"
else
echo "No Issue number detected hence failing the PR Validation check."
if [[ $forked == true ]]; then
Expand Down
49 changes: 33 additions & 16 deletions App.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import (
"crypto/tls"
"fmt"
"github.com/devtron-labs/common-lib/middlewares"
pubsub "github.com/devtron-labs/common-lib/pubsub-lib"
"github.com/devtron-labs/devtron/pkg/eventProcessor"
"github.com/devtron-labs/devtron/pkg/eventProcessor/in"
"log"
"net/http"
"os"
Expand All @@ -33,6 +35,7 @@ import (
"github.com/devtron-labs/devtron/pkg/auth/user"

"github.com/casbin/casbin"
casbinv2 "github.com/casbin/casbin/v2"
authMiddleware "github.com/devtron-labs/authenticator/middleware"
"github.com/devtron-labs/devtron/api/router"
"github.com/devtron-labs/devtron/api/sse"
Expand All @@ -48,15 +51,18 @@ type App struct {
Logger *zap.SugaredLogger
SSE *sse.SSE
Enforcer *casbin.SyncedEnforcer
EnforcerV2 *casbinv2.SyncedEnforcer
server *http.Server
db *pg.DB
posthogClient *telemetry.PosthogClient
centralEventProcessor *eventProcessor.CentralEventProcessor
// used for local dev only
serveTls bool
sessionManager2 *authMiddleware.SessionManager
OtelTracingService *otel.OtelTracingServiceImpl
loggingMiddleware util.LoggingMiddleware
serveTls bool
sessionManager2 *authMiddleware.SessionManager
OtelTracingService *otel.OtelTracingServiceImpl
loggingMiddleware util.LoggingMiddleware
pubSubClient *pubsub.PubSubClientServiceImpl
workflowEventProcessorImpl *in.WorkflowEventProcessorImpl
}

func NewApp(router *router.MuxRouter,
Expand All @@ -68,21 +74,27 @@ func NewApp(router *router.MuxRouter,
posthogClient *telemetry.PosthogClient,
loggingMiddleware util.LoggingMiddleware,
centralEventProcessor *eventProcessor.CentralEventProcessor,
pubSubClient *pubsub.PubSubClientServiceImpl,
workflowEventProcessorImpl *in.WorkflowEventProcessorImpl,
enforcerV2 *casbinv2.SyncedEnforcer,
) *App {
//check argo connection
//todo - check argo-cd version on acd integration installation
app := &App{
MuxRouter: router,
Logger: Logger,
SSE: sse,
Enforcer: enforcer,
db: db,
serveTls: false,
sessionManager2: sessionManager2,
posthogClient: posthogClient,
OtelTracingService: otel.NewOtelTracingServiceImpl(Logger),
loggingMiddleware: loggingMiddleware,
centralEventProcessor: centralEventProcessor,
MuxRouter: router,
Logger: Logger,
SSE: sse,
Enforcer: enforcer,
EnforcerV2: enforcerV2,
db: db,
serveTls: false,
sessionManager2: sessionManager2,
posthogClient: posthogClient,
OtelTracingService: otel.NewOtelTracingServiceImpl(Logger),
loggingMiddleware: loggingMiddleware,
centralEventProcessor: centralEventProcessor,
pubSubClient: pubSubClient,
workflowEventProcessorImpl: workflowEventProcessorImpl,
}
return app
}
Expand Down Expand Up @@ -132,14 +144,19 @@ func (app *App) Start() {

func (app *App) Stop() {
app.Logger.Info("orchestrator shutdown initiating")
err := app.pubSubClient.ShutDown()
if err != nil {
app.Logger.Errorw("error in NATS client shutdown", "err", err)
}
app.workflowEventProcessorImpl.ShutDownDevtronAppReleaseContext()
posthogCl := app.posthogClient.Client
if posthogCl != nil {
app.Logger.Info("flushing messages of posthog")
posthogCl.Close()
}
timeoutContext, _ := context.WithTimeout(context.Background(), 5*time.Second)
app.Logger.Infow("closing router")
err := app.server.Shutdown(timeoutContext)
err = app.server.Shutdown(timeoutContext)
if err != nil {
app.Logger.Errorw("error in mux router shutdown", "err", err)
}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 AS build-env
FROM golang:1.21 AS build-env

RUN echo $GOPATH
RUN apt update
Expand Down
2 changes: 1 addition & 1 deletion DockerfileEA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 AS build-env
FROM golang:1.21 AS build-env

RUN echo $GOPATH
RUN apt update
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,8 @@ Devtron is built on some of the most trusted and loved technologies:

## :muscle: Trusted By

Devtron is trusted by Enterprises and Communities all across the globe:
<br>
Devtron is trusted by communities all across the globe. The list of organizations using Devtron can be found [here](./USERS.md).

- [Delhivery:](https://www.delhivery.com/) Delhivery is an Indian delivery and e-commerce logistics company, that provides end-to-end Supply Chain solutions through cutting-edge technology
- [BharatPe:](https://bharatpe.com/) Bharatpe is an Indian fintech company that offers a range of products including interoperable QR codes for UPI payments, POS machines for card acceptance, and small business financing
- [Livspace:](https://www.livspace.com/in) Livspace is a home interior and renovation company, that provides interior design and renovation services in Singapore and India
- [Moglix:](https://www.moglix.com/) Moglix is an industrial B2B marketplace and an e-commerce platform for industrial tools and equipment, used largely by businesses in India
- [Xoxoday:](https://www.xoxoday.com/) Xoxoday provides technology infrastructure to enable businesses to automate rewards, incentives & payouts for employees, customers & channel partners

## :question: FAQs & Troubleshooting

Expand Down
24 changes: 24 additions & 0 deletions USERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Who is using Devtron?

As the community grows, we want to keep track of the users and organizations using Devtron. If you're using Devtron, please raise a PR to add your organization name and a link to your webpage.

Currently, Devtron is being used by the following organizations:

1. [73strings](https://www.73strings.com/)
2. [Ather Energy](https://www.atherenergy.com/)
3. [BharatPe](https://bharatpe.com/)
4. [Birdeye](https://birdeye.com/)
5. [Bluecopa](https://www.bluecopa.com/)
6. [Chitale Bandhu](https://www.chitalebandhu.in/)
7. [Centricity](https://centricity.co.in/)
8. [Delhivery](https://www.delhivery.com/)
9. [KHELGroup](https://thekhelgroup.com/)
10. [Lemnisk](https://www.lemnisk.co/)
11. [OTPLess](https://otpless.com/)
12. [Spinny](https://www.spinny.com/)
13. [Tata 1Mg](https://www.1mg.com/)
14. [TravClan](https://www.travclan.com/)
15. [Xoxoday](https://www.xoxoday.com/)



9 changes: 7 additions & 2 deletions Wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import (
"github.com/devtron-labs/devtron/api/terminal"
util5 "github.com/devtron-labs/devtron/api/util"
webhookHelm "github.com/devtron-labs/devtron/api/webhook/helm"
"github.com/devtron-labs/devtron/cel"
"github.com/devtron-labs/devtron/client/argocdServer"
"github.com/devtron-labs/devtron/client/argocdServer/application"
cluster2 "github.com/devtron-labs/devtron/client/argocdServer/cluster"
Expand Down Expand Up @@ -121,6 +122,7 @@ import (
delete2 "github.com/devtron-labs/devtron/pkg/delete"
deployment2 "github.com/devtron-labs/devtron/pkg/deployment"
git2 "github.com/devtron-labs/devtron/pkg/deployment/gitOps/git"
"github.com/devtron-labs/devtron/pkg/deployment/manifest/publish"
"github.com/devtron-labs/devtron/pkg/deploymentGroup"
"github.com/devtron-labs/devtron/pkg/dockerRegistry"
"github.com/devtron-labs/devtron/pkg/eventProcessor"
Expand Down Expand Up @@ -926,8 +928,8 @@ func InitializeApp() (*App, error) {
wire.Bind(new(executors.SystemWorkflowExecutor), new(*executors.SystemWorkflowExecutorImpl)),
repository5.NewManifestPushConfigRepository,
wire.Bind(new(repository5.ManifestPushConfigRepository), new(*repository5.ManifestPushConfigRepositoryImpl)),
app.NewGitOpsManifestPushServiceImpl,
wire.Bind(new(app.GitOpsPushService), new(*app.GitOpsManifestPushServiceImpl)),
publish.NewGitOpsManifestPushServiceImpl,
wire.Bind(new(publish.GitOpsPushService), new(*publish.GitOpsManifestPushServiceImpl)),

// start: docker registry wire set injection
router.NewDockerRegRouterImpl,
Expand Down Expand Up @@ -965,6 +967,9 @@ func InitializeApp() (*App, error) {
wire.Bind(new(imageDigestPolicy.ImageDigestPolicyService), new(*imageDigestPolicy.ImageDigestPolicyServiceImpl)),

appStoreRestHandler.AppStoreWireSet,

cel.NewCELServiceImpl,
wire.Bind(new(cel.EvaluatorService), new(*cel.EvaluatorServiceImpl)),
)
return &App{}, nil
}
Loading

0 comments on commit 7ba8aa3

Please sign in to comment.