Skip to content

Commit

Permalink
chore: check for dirtiness of the source tree
Browse files Browse the repository at this point in the history
Prevents PRs which have some files not regenerated properly.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
  • Loading branch information
smira authored and talos-bot committed May 20, 2021
1 parent ceca560 commit 72a22a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ steps:
- name: docker
path: /root/.docker/buildx

- name: check-dirty
image: autonomy/build-container:latest
pull: always
commands:
- make generate manifests
- make check-dirty
volumes:
- name: docker-socket
path: /var/run
- name: outerdockersock
path: /var/outer-run
- name: docker
path: /root/.docker/buildx

- name: lint-pull-request
image: autonomy/build-container:latest
pull: always
Expand Down Expand Up @@ -226,6 +240,6 @@ depends_on:
- default
---
kind: signature
hmac: 91cb4a5779732a7cd24e222da0862c8993441fe56cde03f330c0dd42b18a5ea7
hmac: 04c7419d7c3f8495fc1f98d0a44f04adf1cbefe83490598592c5017ae93830d8

...
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ generate: ## Generate source code.
manifests: ## Generate manifests (e.g. CRD, RBAC, etc.).
@$(MAKE) local-$@ DEST=./ PLATFORM=linux/amd64

.PHONY: check-dirty
check-dirty: ## Verifies that source tree is not dirty
@if test -n "`git status --porcelain`"; then echo "Source tree is dirty"; git status; exit 1 ; fi

# Artifacts

.PHONY: release
Expand Down

0 comments on commit 72a22a9

Please sign in to comment.