Skip to content

Commit

Permalink
Use the condition name in tekton.dev/conditionCheck
Browse files Browse the repository at this point in the history
The condition is implemented with a TaskRun. Right now the TaskRun
is labelled with tekton.dev/conditionCheck which contains the
name of the TaskRun itself. We should instead use the label to
carry data that is useful for discovering this TaskRun, and which
is not already available, i.e. the name of the Condition from
which the TaskRun was generated.
  • Loading branch information
afrittoli committed May 7, 2020
1 parent c861b37 commit 8909330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/reconciler/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ func (c *Reconciler) updateLabelsAndAnnotations(pr *v1alpha1.PipelineRun) (*v1al

func (c *Reconciler) makeConditionCheckContainer(rprt *resources.ResolvedPipelineRunTask, rcc *resources.ResolvedConditionCheck, pr *v1alpha1.PipelineRun) (*v1alpha1.ConditionCheck, error) {
labels := getTaskrunLabels(pr, rprt.PipelineTask.Name)
labels[pipeline.GroupName+pipeline.ConditionCheckKey] = rcc.ConditionCheckName
labels[pipeline.GroupName+pipeline.ConditionCheckKey] = rcc.Condition.Name

for key, value := range rcc.Condition.ObjectMeta.Labels {
labels[key] = value
Expand Down

0 comments on commit 8909330

Please sign in to comment.