# Refer for explanation to following link: # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md # pre-push: commands: packages-audit: tags: frontend security run: yarn audit pre-commit: parallel: true commands: cloud-lint: tags: lint,v2 glob: "content/influxdb/cloud/**/*.md" run: '.ci/vale/vale.sh --config=.vale.ini --minAlertLevel=error {staged_files}' cloud-dedicated-lint: tags: lint,v3 glob: "content/influxdb/cloud-dedicated/**/*.md" run: '.ci/vale/vale.sh --config=content/influxdb/cloud-dedicated/.vale.ini --minAlertLevel=error {staged_files}' cloud-serverless-lint: tags: lint,v3 glob: "content/influxdb/cloud-serverless/**/*.md" run: '.ci/vale/vale.sh --config=content/influxdb/cloud-serverless/.vale.ini --minAlertLevel=error {staged_files}' clustered-lint: tags: lint,v3 glob: "content/influxdb/clustered/**/*.md" run: '.ci/vale/vale.sh --config=content/influxdb/cloud-serverless/.vale.ini --minAlertLevel=error {staged_files}' telegraf-lint: tags: lint,clients glob: "content/telegraf/**/*.md" run: '.ci/vale/vale.sh --config=.vale.ini --minAlertLevel=error {staged_files}' v2-lint: tags: lint,v2 glob: "content/influxdb/v2/**/*.md" run: '.ci/vale/vale.sh --config=content/influxdb/v2/.vale.ini --minAlertLevel=error {staged_files}' cloud-pytest: glob: content/influxdb/cloud/**/*.md tags: test,codeblocks,v2 env: - SERVICE: cloud-pytest run: docker compose run $SERVICE '{staged_files}' cloud-dedicated-pytest: tags: test,codeblocks,v3 glob: content/influxdb/cloud-dedicated/**/*.md env: - SERVICE: cloud-dedicated-pytest run: | ./test/scripts/monitor-tests.sh start $SERVICE ; docker compose run $SERVICE {staged_files} ; ./test/scripts/monitor-tests.sh stop $SERVICE cloud-serverless-pytest: tags: test,codeblocks,v3 glob: content/influxdb/cloud-serverless/**/*.md env: - SERVICE: cloud-serverless-pytest run: docker compose run $SERVICE '{staged_files}' clustered-pytest: tags: test,codeblocks,v3 glob: content/influxdb/clustered/**/*.md env: - SERVICE: clustered-pytest run: | ./test/scripts/monitor-tests.sh start $SERVICE ; docker compose run $SERVICE {staged_files} ; ./test/scripts/monitor-tests.sh stop $SERVICE telegraf-pytest: tags: test,codeblocks glob: content/telegraf/**/*.md env: - SERVICE: telegraf-pytest run: docker compose run $SERVICE '{staged_files}' v2-pytest: tags: test,codeblocks,v2 glob: content/influxdb/v2/**/*.md env: - SERVICE: v2-pytest run: docker compose run --rm $SERVICE '{staged_files}' prettier: tags: frontend,style glob: "*.{css,js,ts,jsx,tsx}" run: yarn prettier {staged_files} build: commands: prune-legacy-containers: priority: 1 tags: test run: '(docker container ls --format "{{.ID}}" --filter label=tag=influxdata-docs --filter status=exited | xargs docker rm) || true' rebuild-test-images: tags: test run: docker compose build pytest-codeblocks