Skip to content

Commit

Permalink
chore: pre-commit updates (#1665)
Browse files Browse the repository at this point in the history
Add a workflow that runs the pre-commit jobs to
cover the case where a developer hasn't opted into
pre-commit. Also add the conventional commit message
hook and enable more golang linters. The commits also
tidies up the markdown files that had line length
issues.

Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan authored Aug 6, 2024
1 parent 859d9bf commit c607a6d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
12 changes: 12 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pre-commit

on: # yamllint disable-line rule:truthy
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ repos:
rev: v1.59.1
hooks:
- id: golangci-lint
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional'] # yamllint disable-line rule:quoted-strings
exclude: ^vendor/.*|^_output/.*|^bpf/include/.*|^local-dev-cluster/.*
3 changes: 2 additions & 1 deletion e2e/tools/validator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ pip install .

- Configure and Generate `validator.yaml` file

- Create the `validator.yaml` file based on the [validator.yaml.sample](validator.yaml.sample) template provided.
- Create the `validator.yaml` file based on the
[validator.yaml.sample](validator.yaml.sample) template provided.
- Adjust the configuration according to your environment and requirements.

- Run the validator
Expand Down
9 changes: 6 additions & 3 deletions manifests/compose/validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ target deploys the following

### Usage

To allow access to the VM from the Prometheus container running on the host, `virt-net` must be created using the following command:
To allow access to the VM from the Prometheus container running on the host,
`virt-net` must be created using the following command:

- Check the Virtual Bridge Interface:

Expand All @@ -44,15 +45,17 @@ To allow access to the VM from the Prometheus container running on the host, `vi

- Create the Docker Network:

Use the `inet` address from the previous step to create the Docker Network with `macvlan` driver. Replace `<subnet>` with appropriate value.
Use the `inet` address from the previous step to create the Docker Network with
`macvlan` driver. Replace `<subnet>` with appropriate value.

```sh
docker network create --driver=macvlan --subnet=<subnet>/24 -o parent=virbr0 virt-net
```

- Start the Services:

Navigate to appropriate directory, set the `VM_IP` environment variable, and bring up the services:
Navigate to appropriate directory, set the `VM_IP` environment variable, and bring
up the services:

```sh
cd manifests/compose/validation/metal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ FROM hubblo/scaphandre:latest

# Install only curl
RUN apt-get update && apt-get install -y curl

0 comments on commit c607a6d

Please sign in to comment.