Automatically insert changelog version to go binary
What does this MR do?
This MR updates the go build
job so that it automatically configures the metadata.AnalyzerVersion
value from the latest version in the CHANGELOG.md
file.
It also moves the go check analyzer version
job from the pre-build
stage to the test
stage, and changes the logic so that it checks the output of the analyzer running inside the Docker container instead of executing the analyzer source code directly. This allows us to have a sanity check on the version for projects that use the go build
job of the analyzer.yml
as well as for analyzer projects that use a separate build stage in the Dockerfile
What are the relevant issue numbers?
gitlab-org/gitlab#225301 (closed)
Tests
-
Test for unconfigured analyzer version with urfave/cli 1.22.4
-
Test for unconfigured analyzer version with urfave/cli 1.22.1
-
Test to ensure analyzer.yml
automatically inserts correct version value intometadata.AnalyzerVersion
-
Test for incorrect analyzer version when Dockerfile
uses separate binary build stage -
Test for correct analyzer version when Dockerfile
uses separate binary build stage
Does this MR meet the acceptance criteria?
Edited by Adam Cohen