Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ type CommonConfig struct {
BaseBranch string `json:"base_branch"`
Labels []string `json:"labels"`
States []string `json:"states"`
// ConcourseURL overrides ATC_EXTERNAL_URL when constructing PR status check target
// URLs. Use when Concourse's externalUrl Helm value cannot be changed (e.g. it is
// locked to an STS WebIdentity OIDC issuer) but builds are reached via a different
// public hostname (e.g. a Teleport proxy).
ConcourseURL string `json:"concourse_url"`
}

// GithubConfig contains GitHub-specific configuration
Expand Down
8 changes: 8 additions & 0 deletions pr/out.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ import (
func Out(request OutRequest, github *models.GithubClient, sourcesDir string) (OutResponse, error) {
ctx := context.Background()

// Allow the pipeline to supply a Teleport / proxy hostname that differs from
// Concourse's locked externalUrl (which may be bound to an STS OIDC issuer).
// Overriding ATC_EXTERNAL_URL here affects both safeExpandEnv and the
// auto-generated build URL in UpdateCommitStatus.
if request.Source.ConcourseURL != "" {
os.Setenv("ATC_EXTERNAL_URL", request.Source.ConcourseURL)
}

// Read metadata from the source path
resourcePath := filepath.Join(sourcesDir, request.Params.Path, ".git", "resource")

Expand Down
Loading