Skip to content

Commit

Permalink
Save circleci logs per branch (istio#1244)
Browse files Browse the repository at this point in the history
* Adding perf testing for daily releases

* Circle ci per branch

* branch
  • Loading branch information
utka authored and istio-testing committed May 9, 2019
1 parent 604a438 commit 3ca696b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions toolbox/ci2gubernator/lib/ci2gubernator.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ type Converter struct {
}

// NewConverter creates a Converter
func NewConverter(bucket, org, repo, job, stage string, build int) *Converter {
func NewConverter(bucket, org, repo, job, stage string, branch string, build int) *Converter {
return &Converter{
gcsClient: u.NewGCSClient(bucket),
gcsPathPrefix: filepath.Join(stage, job, strconv.Itoa(build)),
gcsPathPrefix: filepath.Join(stage, branch, job, strconv.Itoa(build)),
bucket: bucket,
org: org,
repo: repo,
Expand Down
5 changes: 3 additions & 2 deletions toolbox/ci2gubernator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var (
buildLogTXT = flag.String("build_log_txt", "", "Path to the build log")
serviceAccountJSON = flag.String("service_account", "", "Path to the service account key")
stage = flag.String("stage", "", "Used to multiplex results on GCS")
branch = flag.String("branch", "", "Separate test result per branch.")
)

func init() {
Expand Down Expand Up @@ -70,15 +71,15 @@ func main() {

func createPushStartedJSON() {
u.AssertIntDefined("pr_number", prNum, unspecifiedInt)
cvt := ci2g.NewConverter(circleciBucket, *org, *repo, *job, *stage, *buildNum)
cvt := ci2g.NewConverter(circleciBucket, *org, *repo, *job, *stage, *branch, *buildNum)
if err := cvt.CreateUploadStartedJSON(*prNum, *sha); err != nil {
log.Fatalf("Failed to create started.json: %v", err)
}
}

func uploadArtifactsUpdateLatestBuild() {
u.AssertNotEmpty("junit_xml", junitXML)
cvt := ci2g.NewConverter(circleciBucket, *org, *repo, *job, *stage, *buildNum)
cvt := ci2g.NewConverter(circleciBucket, *org, *repo, *job, *stage, *branch, *buildNum)
if err := cvt.CreateUploadFinishedJSON(*exitCode, *sha); err != nil {
log.Fatalf("Failed to create started.json: %v", err)
}
Expand Down

0 comments on commit 3ca696b

Please sign in to comment.