Skip to content

Commit

Permalink
versatile-data-kit: git pre-commit hooks config (#1625)
Browse files Browse the repository at this point in the history
Frontend config files were failing git pre-coming hooks due:
* too large
* JSON format inspection
* PR title prefix

License insertion now covers TypeScript, JavaScript, (S)CSS,
HTML, Y(A)ML file types in addition.
PR titles can be now associated with "frontend" component.
Modified the pre-commit and gitlint configurations accordingly.

Testing done: installed the hook locally, and verified all
frontend/data-pipelines changes from multiple stacked PRs
were committed and auto-modified correctly
with the code header expected.

---------

Signed-off-by: ivakoleva <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ivakoleva and pre-commit-ci[bot] committed Feb 15, 2023
1 parent c668356 commit 37a27a5
Show file tree
Hide file tree
Showing 38 changed files with 109 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

name: Google Java Format

on:
Expand Down
3 changes: 3 additions & 0 deletions projects/control-service/cicd/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

.control_service_retry:
retry_options:
max: 1
Expand Down
3 changes: 2 additions & 1 deletion projects/control-service/cicd/trino-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

image:
repository: trinodb/trino
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: v2
name: pipelines-control-service
description: A Helm chart for Versatile Data Kit Control Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.datajobTemplate.enabled }}
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.fluentd.enabled }}
apiVersion: logs.vdp.vmware.com/v1beta1
kind: FluentdConfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.dataJob.fluentd.enabled }}
apiVersion: logs.vdp.vmware.com/v1beta1
kind: FluentdConfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.ingress.enabled -}}
kind: Ingress
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.alerting.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if and .Values.rbac.create .Values.rbac.datajobsDeployment.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if and .Values.serviceAccount.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if and .Values.serviceAccount.create .Values.rbac.create .Values.rbac.datajobsDeployment.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

## Create a secret with JDBC credentials for embedded database (PostgreSQL or CockroachDB) only if externalSecretName is not supplied.
## If any of the fields are empty, we fall-back to defaults (f.e. local dev environment)
{{- if not .Values.database.externalSecretName }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

## Create a secret with Kerberos keytab for authentication if kerberos authentication flag is turned on.
## The keytab file contents are set from the values.yaml file and are intended to be populated by an env
## variable.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.deploymentDataJobBaseImage.password }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.deploymentBuilderImage.password }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if and (eq .Values.deploymentDockerRegistryType "generic") .Values.deploymentDockerRegistryUsernameReadOnly .Values.deploymentDockerRegistryPasswordReadOnly }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if (include "shouldCreatePipelinesControlServiceDockerRepoSecret" .) }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if (include "shouldCreateVdkSdkDockerRepoSecret" .) }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: Secret
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameter(s): imageRegistry
Expand Down
3 changes: 2 additions & 1 deletion projects/frontend/cicd/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

frontend_publish_test_image:
image: docker:19.03.15
Expand Down
2 changes: 2 additions & 0 deletions projects/frontend/shared-components/cicd/.gitlab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
2 changes: 2 additions & 0 deletions projects/vdk-heartbeat/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

image: "python:3.9"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

/*
* Copyright 2021-2023 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

/*
* Copyright 2021 VMware, Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

version: "3.7"
services:
api:
Expand Down
2 changes: 1 addition & 1 deletion projects/vdk-plugins/vdk-server/.plugin-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 VMware, Inc.
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

image: "python:3.7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

# This is a copy of the ingress-nginx manifest for KinD, available here:
# https://github.com/kubernetes/ingress-nginx/blob/main/deploy/static/provider/kind/deploy.yaml
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
Expand Down
3 changes: 3 additions & 0 deletions support/gitlab-runners/kubeconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
clusters:
- cluster:
Expand Down

0 comments on commit 37a27a5

Please sign in to comment.