diff --git a/Jenkinsfile.public b/Jenkinsfile.public index 4a11a85ad..1ec8026b7 100644 --- a/Jenkinsfile.public +++ b/Jenkinsfile.public @@ -129,6 +129,7 @@ pipeline { sh 'check-errs ./...' sh 'staticcheck ./...' sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run' + sh 'check-downgrades' sh 'make check-monitoring' sh 'make test-wasm-size' diff --git a/Jenkinsfile.verify b/Jenkinsfile.verify index 6142cb331..0b176340d 100644 --- a/Jenkinsfile.verify +++ b/Jenkinsfile.verify @@ -127,6 +127,7 @@ pipeline { sh 'check-errs ./...' sh 'staticcheck ./...' sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run' + sh 'check-downgrades' sh 'make check-monitoring' sh 'make test-wasm-size' diff --git a/scripts/lint.go b/scripts/lint.go index 3875e6da8..3885787d1 100644 --- a/scripts/lint.go +++ b/scripts/lint.go @@ -40,6 +40,7 @@ type Checks struct { Monitoring bool WASMSize bool Protolock bool + CheckDowngrades bool GolangCI bool } @@ -65,6 +66,7 @@ func main() { flag.BoolVar(&checks.Monitoring, "monitoring", checks.Monitoring, "check monitoring") flag.BoolVar(&checks.WASMSize, "wasm-size", checks.WASMSize, "check the wasm file size for optimal performance") flag.BoolVar(&checks.Protolock, "protolock", checks.Protolock, "check the status of the protolock file") + flag.BoolVar(&checks.CheckDowngrades, "check-downgrades", checks.CheckDowngrades, "run the check-downgrades tool") flag.BoolVar(&checks.GolangCI, "golangci", checks.GolangCI, "run the golangci-lint tool") flag.Parse() @@ -160,6 +162,10 @@ func main() { commands[0] = append(commands[0], newCommand(ctx, workDir, "protolock", "status")) } + if checks.CheckDowngrades { + commands[0] = append(commands[0], newCommand(ctx, workDir, "check-downgrades", target...)) + } + if checks.GolangCI { args := append([]string{"--config", "/go/ci/.golangci.yml", "--skip-dirs", "(^|/)node_modules($|/)", "-j=2", "run"}, target...) commands[1] = append(commands[1], newCommand(ctx, workDir, "golangci-lint", args...))