From 5379d2147f9695198f4094d048750d656f233a34 Mon Sep 17 00:00:00 2001 From: Javan lacerda Date: Thu, 18 Jul 2024 18:21:31 +0000 Subject: [PATCH] migrating codefresh and buildkite to ci provider Signed-off-by: Javan lacerda --- config/identity/config.yaml | 8 +++++++- pkg/identity/ciprovider/principal_test.go | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config/identity/config.yaml b/config/identity/config.yaml index d48d5d27e..a75664321 100644 --- a/config/identity/config.yaml +++ b/config/identity/config.yaml @@ -16,6 +16,7 @@ define: - &github-type "github-workflow" - &gitlab-type "gitlab-pipeline" - &codefresh-type "codefresh-workflow" + - &buildkite-type "buildkite-job" oidc-issuers: https://accounts.google.com: issuer-url: https://accounts.google.com @@ -26,7 +27,8 @@ oidc-issuers: https://agent.buildkite.com: issuer-url: https://agent.buildkite.com client-id: sigstore - type: buildkite-job + type: ci-provider + ci-provider: *buildkite-type contact: support@buildkite.com description: "Buildkite Agent OIDC tokens for job identity" https://allow.pub: @@ -175,3 +177,7 @@ ci-issuer-metadata: build-config-uri: "{{if .platform_url}}{{.platform_ur}}{{ else }}{{.url}}{{end}}/api/pipelines/{{ .pipeline_id }}" run-invocation-uri: "{{if .platform_url}}{{.platform_ur}}{{ else }}{{.url}}{{end}}/build/{{ .workflow_id }}" subject-alternative-name-template: "{{if .platform_url}}{{.platform_ur}}{{ else }}{{.url}}{{end}}/{{.account_name}}/{{.pipeline_name}}:{{.account_id}}/{{.pipeline_id}}" + *buildkite-type: + default-template-values: + url: "https://buildkite.com" + subject-alternative-name-template: "{{.url}}/{{.organization_slug}}/{{.pipeline_slug}}" diff --git a/pkg/identity/ciprovider/principal_test.go b/pkg/identity/ciprovider/principal_test.go index bdd29b856..b67bd6041 100644 --- a/pkg/identity/ciprovider/principal_test.go +++ b/pkg/identity/ciprovider/principal_test.go @@ -235,8 +235,7 @@ func TestApplyTemplateOrReplace(t *testing.T) { "ref_tag": "1.0.0", } issuerMetadata := map[string]string{ - "url": "https://github.com", - "default_platform_url": "https://g.codefresh.io", + "url": "https://github.com", } tests := map[string]struct {