Skip to content

Commit

Permalink
Update dependabot config (#1100)
Browse files Browse the repository at this point in the history
Add check for github-actions.
Add missing examples and SDK go.mod
Remove redundant comments.
Change check to be weekly on Sunday to reduce load and churn.
Sort alphanumerically.
Add check to Makefile to ensure if there is a `go.mod` file there is a dependabot entry for that directory.
  • Loading branch information
MrAlias authored Aug 26, 2020
1 parent 737d812 commit 3b3c263
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 26 deletions.
99 changes: 75 additions & 24 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,86 @@

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/tools" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/bridge/opentracing" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/bridge/opentracing"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/exporters/otlp" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/example/basic"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/exporters/stdout" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/example/jaeger"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/exporters/metric/prometheus" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/example/namedtracer"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/exporters/trace/zipkin" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/example/otel-collector"
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/exporters/trace/jaeger" # Location of package manifests
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/example/prometheus"
schedule:
interval: "daily"
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/example/zipkin"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/exporters/metric/prometheus"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/exporters/otlp"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/exporters/stdout"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/exporters/trace/jaeger"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/exporters/trace/zipkin"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/sdk"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/tools"
schedule:
interval: "weekly"
day: "sunday"

17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $(TOOLS_DIR)/gojq: $(TOOLS_MOD_DIR)/go.mod $(TOOLS_MOD_DIR)/go.sum $(TOOLS_MOD_D
cd $(TOOLS_MOD_DIR) && \
go build -o $(TOOLS_DIR)/gojq github.com/itchyny/gojq/cmd/gojq

precommit: generate build lint examples test
precommit: dependabot-check license-check generate build lint examples test

.PHONY: test-with-coverage
test-with-coverage:
Expand All @@ -74,7 +74,7 @@ test-with-coverage:


.PHONY: ci
ci: precommit check-clean-work-tree license-check test-with-coverage test-386
ci: precommit check-clean-work-tree test-with-coverage test-386

.PHONY: check-clean-work-tree
check-clean-work-tree:
Expand Down Expand Up @@ -155,3 +155,16 @@ license-check:
echo "license header checking failed:"; echo "$${licRes}"; \
exit 1; \
fi

.PHONY: dependabot-check
dependabot-check:
@result=$$( \
for f in $$( find -type f -name go.mod -exec dirname {} \; | sed 's/^.\/\?/\//' ); \
do grep -q "$$f" .github/dependabot.yml \
|| echo "$$f"; \
done; \
); \
if [ -n "$$result" ]; then \
echo "missing go.mod dependabot check:"; echo "$$result"; \
exit 1; \
fi

0 comments on commit 3b3c263

Please sign in to comment.