diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index c0a1d431..c944cb2c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -4,28 +4,65 @@ steps: agents: queue: "scala" - - label: "test {{ matrix }}" - command: "./builds/run_sbt_tests.sh {{ matrix }}" - matrix: - - "fixtures" - - "http" - - "json" - - "typesafe_app" - - "monitoring" - - "monitoring_typesafe" - - "messaging" - - "messaging_typesafe" - - "storage" - - "storage_typesafe" - - "elasticsearch" - - "elasticsearch_typesafe" - - "sierra" + - group: "Test" + steps: + - label: "test {{ matrix }}" + command: "./builds/run_sbt_tests.sh {{ matrix }}" + matrix: + - "fixtures" + - "http" + - "json" + - "typesafe_app" + - "monitoring" + - "monitoring_typesafe" + - "messaging" + - "messaging_typesafe" + - "storage" + - "storage_typesafe" + - "elasticsearch" + - "elasticsearch_typesafe" + - "sierra" - agents: - queue: "scala" + agents: + queue: "scala" + + - group: "Report evictions" + steps: + - label: "evictions {{ matrix }}" + command: "./builds/report_sbt_evictions.sh {{ matrix }}" + soft_fail: + - exit_status: 2 + matrix: + - "fixtures" + - "http" + - "json" + - "typesafe_app" + - "monitoring" + - "monitoring_typesafe" + - "messaging" + - "messaging_typesafe" + - "storage" + - "storage_typesafe" + - "elasticsearch" + - "elasticsearch_typesafe" + - "sierra" + agents: + queue: "scala" + artifact_paths: + ".reports/evicted*" + + - wait + - label: "Collate evictions" + commands: + - "mkdir -p .reports" + - "buildkite-agent artifact download '.reports/evicted_*' .reports/" + - "builds/report_unique_evictions.sh | buildkite-agent annotate --context=evictions" + agents: + queue: nano - wait + - label: "cut release" if: build.branch == "main" commands: @@ -35,28 +72,30 @@ steps: - wait - - label: "publish {{ matrix }}" - if: build.branch == "main" - command: ".buildkite/scripts/publish.py {{ matrix }}" - matrix: - - "fixtures" - - "http" - - "http_typesafe" - - "json" - - "typesafe_app" - - "monitoring" - - "monitoring_typesafe" - - "messaging" - - "messaging_typesafe" - - "storage" - - "storage_typesafe" - - "elasticsearch" - - "elasticsearch_typesafe" - - "sierra" - - "sierra_typesafe" + - group: "Publish" + steps: + - label: "publish {{ matrix }}" + if: build.branch == "main" + command: ".buildkite/scripts/publish.py {{ matrix }}" + matrix: + - "fixtures" + - "http" + - "http_typesafe" + - "json" + - "typesafe_app" + - "monitoring" + - "monitoring_typesafe" + - "messaging" + - "messaging_typesafe" + - "storage" + - "storage_typesafe" + - "elasticsearch" + - "elasticsearch_typesafe" + - "sierra" + - "sierra_typesafe" - agents: - queue: "scala" + agents: + queue: "scala" - wait diff --git a/.gitignore b/.gitignore index 70a3bf65..379a0dba 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ metals.sbt .terraform terraform.plan + +# output from code checkers, tests etc. +.reports \ No newline at end of file diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..8365718e --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,2 @@ +RELEASE_TYPE: patch +internal-only build improvements \ No newline at end of file diff --git a/build.sbt b/build.sbt index 38dc0be3..f64b45f8 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,7 @@ val projectVersion = "32.40.0" +Global / excludeLintKeys += composeNoBuild + lazy val fixtures = Common.setupProject( project, "fixtures", diff --git a/builds/report_sbt_evictions.sh b/builds/report_sbt_evictions.sh new file mode 100755 index 00000000..0645268e --- /dev/null +++ b/builds/report_sbt_evictions.sh @@ -0,0 +1,9 @@ +mkdir -p .reports +REPORT_FILE=".reports/evicted_${1}" +./builds/run_sbt_task_in_docker.sh "project $1" "evicted" | grep '^\[warn\]' | tee $REPORT_FILE +WARNING_COUNT=$(cat $REPORT_FILE | grep -E '^\[warn\]\s+\*' | wc -l ) +if [ "$WARNING_COUNT" != "0" ] +then + echo "found $WARNING_COUNT suspected binary incompatible eviction(s)" + exit 2 +fi diff --git a/builds/report_unique_evictions.sh b/builds/report_unique_evictions.sh new file mode 100755 index 00000000..f6cdc882 --- /dev/null +++ b/builds/report_unique_evictions.sh @@ -0,0 +1,5 @@ +# Intended to be run after producing eviction reports with report_sbt_evictions.sh +echo "# Suspected binary incompatible evictions across all projects (summary)" +cat .reports/evicted_* | grep -E '^\[warn\]\s+\*' | sed 's/.*\*/*/' | sort | uniq +echo "" +echo "See individual _evictions_ stages for more detail"