Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/workflows/cloud-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,6 @@ on:
type: string
default: main
description: The image tag to use for the mondoo operator image
secrets:
MONDOO_CLIENT:
required: true
AZURE_CLIENT_ID:
required: true
AZURE_CLIENT_SECRET:
required: true
AZURE_SUBSCRIPTION_ID:
required: true
AZURE_TENANT_ID:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
GCP_SERVICE_ACCOUNT:
required: true

env:
MONDOO_OPERATOR_IMAGE_TAG: ${{ github.event.inputs.mondooOperatorImageTag || 'main' }}
Expand Down Expand Up @@ -314,7 +297,6 @@ jobs:
steps:
- name: Send Slack notification on failure
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
if: ${{ always() && steps.build-providers.outcome != 'success' }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have the condition on the job level, so we do not need this here anymore

with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
required: true
MONDOO_CLIENT_EDGE:
required: true
MONDOO_TEST_ORG_TOKEN:
required: true
SLACK_BOT_TOKEN:
required: false

env:
CNSPEC_IMAGE_TAG: ${{ github.event.inputs.cnspecImageTag }}
Expand Down Expand Up @@ -179,7 +183,6 @@ jobs:
steps:
- name: Send Slack notification on failure
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
if: ${{ always() && steps.build-providers.outcome != 'success' }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have the if condition on the job level, so we do not need this here.

with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ jobs:
version: latest
args: --timeout=20m0s

actionlint:
runs-on: ubuntu-latest
name: Lint GitHub Actions
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run actionlint
uses: raven-actions/actionlint@e01d1ea33dd6a5ed517d95b4c0c357560ac6f518 # v2.1.1
with:
# Disabled until existing shellcheck warnings are addressed
shellcheck: false

license-check:
runs-on: ubuntu-latest
steps:
Expand Down
22 changes: 22 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Claude Code Instructions

## Before Pushing Changes

Always run the following linters before pushing any changes:

```bash
make lint # Go linting
make lint/actions # GitHub Actions linting
```

## Project Overview

This is the Mondoo Operator - a Kubernetes operator for Mondoo security scanning.

## Common Commands

- `make test` - Run unit tests
- `make lint` - Run Go linter
- `make lint/actions` - Lint GitHub Actions workflows
- `make build` - Build the operator
- `make docker-build` - Build container image
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ vet: ## Run go vet against code.
lint: golangci-lint generate
$(GOLANGCI_LINT) run

lint/actions: actionlint ## Lint GitHub Actions workflows.
$(ACTIONLINT) -shellcheck=

test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $(UNIT_TEST_PACKAGES) -coverprofile cover.out

Expand Down Expand Up @@ -299,6 +302,12 @@ gomockgen: $(GOMOCKGEN) ## Download go mockgen locally if necessary.
$(GOMOCKGEN): $(LOCALBIN)
test -s $(LOCALBIN)/mockgen || GOBIN=$(LOCALBIN) go install github.com/golang/mock/mockgen@v1.6.0

ACTIONLINT = $(LOCALBIN)/actionlint
.PHONY: actionlint
actionlint: $(ACTIONLINT) ## Download actionlint locally if necessary.
$(ACTIONLINT): $(LOCALBIN)
test -s $(LOCALBIN)/actionlint || GOBIN=$(LOCALBIN) go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.10

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

.PHONY: opm
Expand Down
Loading