CI: check /tmp/grafana-enterprise; don't fail if rev-parse fails (#75480)

check /tmp/grafana-enterprise; don't fail if rev-parse fails
This commit is contained in:
Kevin Minehart 2023-09-26 12:09:18 -05:00 committed by GitHub
parent 237ce5ea82
commit edc36d3948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ package config
import (
"context"
"fmt"
"log"
"strconv"
"time"
@ -47,7 +48,10 @@ func GrafanaRevision(ctx context.Context, grafanaDir string) (Revision, error) {
if err != nil {
enterpriseCommit, err = executil.OutputAt(ctx, grafanaDir, "git", "-C", "..", "rev-parse", "--short", "HEAD")
if err != nil {
return Revision{}, err
enterpriseCommit, err = executil.OutputAt(ctx, grafanaDir, "git", "-C", "/tmp/grafana-enterprise", "rev-parse", "--short", "HEAD")
if err != nil {
log.Println("Could not get enterprise commit. Error:", err)
}
}
}