mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-24 16:17:11 +08:00
In order to make it easier to do post-analysis in test logs, this patch makes the CI build save the JSON-formatted logs into a Google Cloud Storage bucket. GCB has a built-in artifact storage system, but unfortunately it only stores artifacts on successful builds. Given that we're interested on doing post-analysis on failed builds, this is unhelpful. The build scripts instead use the GCP API to explicitly upload the test logs to a bucket. This patch * Adds an artifact uploader using the GCP Storage API * Updates the build yaml files to point to the appropriate artifacts & bucket * Updates the makefile to save JSON logs to $TELEPORT/test-logs when running tests * Adds entries to .gitignore to not automatically commit test reports The existing test rendering filter formats the JSON outut for human consumption, meaning that we can both save the JSON logs and that humans manually running tests with via make will still get an intelligible report. In addition to the above, this patch also: * standardizes the build scripts on `logrus` for logging, as this was used by some dependencies. * adds a self-test to the CI code, run as part of `make test`
15 lines
243 B
Go
15 lines
243 B
Go
package customflag
|
|
|
|
import "strings"
|
|
|
|
type StringArray []string
|
|
|
|
func (flags StringArray) String() string {
|
|
return strings.Join(flags, ", ")
|
|
}
|
|
|
|
func (flags *StringArray) Set(value string) error {
|
|
*flags = append(*flags, value)
|
|
return nil
|
|
}
|