-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TEP-0133]: Configure Default resolver
This commit introduces a new `default-resolver-type` field to the `config-defaults` ConfigMap, which configures the default resolver type to be used when the `resolver` is not explicitly provided in the input. Supporting the default resolver type improves simplicity at the authoring time. More details can be found in [TEP-0113: Conifgure Default Resolver]. /kind feature [TEP-0113: Conifgure Default Resolver]: https://github.com/tektoncd/community/blob/main/teps/0133-configure-default-resolver.md
- Loading branch information
1 parent
eb0486a
commit e782f2a
Showing
13 changed files
with
346 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package testing | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/tektoncd/pipeline/pkg/apis/config" | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
logtesting "knative.dev/pkg/logging/testing" | ||
) | ||
|
||
// SetDefaults sets the default ConfigMap values in an existing context (for use in testing) | ||
func SetDefaults(ctx context.Context, data map[string]string, t *testing.T) context.Context { | ||
s := config.NewStore(logtesting.TestLogger(t)) | ||
s.OnConfigChanged(&corev1.ConfigMap{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: config.GetDefaultsConfigName(), | ||
}, | ||
Data: data, | ||
}) | ||
return s.ToContext(ctx) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.