Skip to content

Commit

Permalink
add dependabot for libs and remove consumer pipeline (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov authored Sep 26, 2024
1 parent 83100a8 commit 773be7f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 81 deletions.
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,38 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: gomod
directory: '/lib'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'dependencies'
- package-ecosystem: gomod
directory: '/wasp'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'dependencies'
- package-ecosystem: gomod
directory: '/seth'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'dependencies'
- package-ecosystem: gomod
directory: '/havoc'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'dependencies'
- package-ecosystem: gomod
directory: '/k8s-test-runner'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'dependencies'
68 changes: 0 additions & 68 deletions .github/workflows/dependabot-consumers-summary.yaml

This file was deleted.

21 changes: 13 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,44 @@ Use only [lightweight tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
**Do not move tags between commits. If something need to be fixed increment patch or minor version.**

Steps to release:

- When all your PRs are merged to `main` check the `main` branch [breaking changes badge](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/rc-breaking-changes.yaml)
- If there are no breaking changes for external methods, create a branch and explain all your module changes in `vX.X.X.md` committed under `.changeset` dir in your module. If changes are really short, and you run the [script](#check-breaking-changes-locally) locally you can push `.changeset` as a part of your final feature PR
- If there are accidental breaking changes, and it is possible to make them backward compatible - fix them
- If there are breaking changes, and we must release them change `go.mod` path, add prefix `/vX`, merge your PR(s)
- When all the changes are merged, and there are no breaking changes in the [pipeline](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/rc-breaking-changes.yaml) then proceed with releasing
- Tag `main` branch in format `$pkg/$subpkg/vX.X.X` according to your changes and push it, example:
```
git tag $pkg/$subpkg/v1.1.0 && git push --tags
git tag $pkg/$subpkg/v1.1.1 && git push --tags
git tag $pkg/$subpkg/v2.0.0 && git push --tags
```
```
git tag $pkg/$subpkg/v1.1.0 && git push --tags
git tag $pkg/$subpkg/v1.1.1 && git push --tags
git tag $pkg/$subpkg/v2.0.0 && git push --tags
```
- Check the [release page](https://github.com/smartcontractkit/chainlink-testing-framework/releases)
- To check how dependency changes can affect other repositories check dependabot [summary pipeline](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/dependabot-consumers-summary.yaml)

### Binary releases

If your module have `cmd/main.go` we build binary automatically for various platforms and attach it to the release page.

## Debugging release pipeline and `gorelease` tool

Checkout `dummy-release-branch` and release it:

- `git tag dummy-module/v0.X.0`
- Add `vX.X.X.md` in `.changeset`
- `git push --no-verify --force && git push --tags`
- Check [releases](https://github.com/smartcontractkit/chainlink-testing-framework/releases)

Pipelines:

- [Main branch breaking changes](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/rc-breaking-changes.yaml)
- [Pipeline for releasing Go modules](.github/workflows/release-go-module.yml)
- [Dependabot summary pipeline](.github/workflows/dependabot-consumers-summary.yaml)

## Check breaking changes locally

We have a simple wrapper to check breaking changes for all the packages. Commit all your changes and run:

```
go run ./tools/breakingchanges/cmd/main.go
go run ./tools/breakingchanges/cmd/main.go --subdir wasp # check recursively starting with subdir
go run ./tools/breakingchanges/cmd/main.go --ignore tools,wasp,havoc,seth # to ignore some packages
```
```
5 changes: 2 additions & 3 deletions tools/breakingchanges/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func findGoModDirs(rootFolder, subDir string) ([]string, error) {
}

func getLastTag(pathPrefix string) (string, error) {
//nolint
cmd := exec.Command("sh", "-c", fmt.Sprintf("git tag | grep '%s' | tail -1", pathPrefix))
var out bytes.Buffer
cmd.Stdout = &out
Expand Down Expand Up @@ -88,9 +89,7 @@ func getIgnoredDirs(flag *string) []string {
ignoredDirs := make([]string, 0)
if flag != nil {
allDirs := strings.Split(*flag, ",")
for _, d := range allDirs {
ignoredDirs = append(ignoredDirs, d)
}
ignoredDirs = append(ignoredDirs, allDirs...)
}
return ignoredDirs
}
Expand Down
2 changes: 0 additions & 2 deletions tools/breakingchanges/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=

0 comments on commit 773be7f

Please sign in to comment.