Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes "build" word references from TaskRun #818

Merged
merged 1 commit into from
Jun 4, 2019
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
2 changes: 1 addition & 1 deletion cmd/nop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ package main
import "fmt"

func main() {
fmt.Println("Build successful")
fmt.Println("Task completed successfully")
}
12 changes: 5 additions & 7 deletions pkg/reconciler/v1alpha1/taskrun/resources/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,9 @@ var (
)

const (
// Prefixes to add to the name of the init containers.
// IMPORTANT: Changing these values without changing fluentd collection configuration
// will break log collection for init containers.
containerPrefix = "build-step-"
unnamedInitContainerPrefix = "build-step-unnamed-"
// Prefixes to add to the name of the containers.
containerPrefix = "step-"
unnamedInitContainerPrefix = "step-unnamed-"
// Name of the credential initialization container.
credsInit = "credential-initializer"
// Name of the working dir initialization container.
Expand All @@ -102,9 +100,9 @@ var (
// The container used to initialize credentials before the build runs.
credsImage = flag.String("creds-image", "override-with-creds:latest",
"The container image for preparing our Build's credentials.")
// The container that just prints build successful.
// The container that just prints Task completed successfully.
nopImage = flag.String("nop-image", "override-with-nop:latest",
"The container image run at the end of the build to log build success")
"The container image run at the end of the build to log task success")
)

func makeCredentialInitializer(serviceAccountName, namespace string, kubeclient kubernetes.Interface) (*corev1.Container, []corev1.Volume, error) {
Expand Down
12 changes: 6 additions & 6 deletions pkg/reconciler/v1alpha1/taskrun/resources/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func TestMakePod(t *testing.T) {
WorkingDir: workspaceDir,
}},
Containers: []corev1.Container{{
Name: "build-step-name",
Name: "step-name",
Image: "image",
Env: implicitEnvVars,
VolumeMounts: implicitVolumeMounts,
Expand Down Expand Up @@ -205,7 +205,7 @@ func TestMakePod(t *testing.T) {
WorkingDir: workspaceDir,
}},
Containers: []corev1.Container{{
Name: "build-step-name",
Name: "step-name",
Image: "image",
Env: implicitEnvVars,
VolumeMounts: implicitVolumeMounts,
Expand All @@ -226,7 +226,7 @@ func TestMakePod(t *testing.T) {
desc: "very-long-step-name",
ts: v1alpha1.TaskSpec{
Steps: []corev1.Container{{
Name: "a-very-long-character-step-name-to-trigger-max-len----and-invalid-characters",
Name: "a-very-very-long-character-step-name-to-trigger-max-len----and-invalid-characters",
Image: "image",
}},
},
Expand All @@ -245,7 +245,7 @@ func TestMakePod(t *testing.T) {
WorkingDir: workspaceDir,
}},
Containers: []corev1.Container{{
Name: "build-step-a-very-long-character-step-name-to-trigger-max-len",
Name: "step-a-very-very-long-character-step-name-to-trigger-max-len",
Image: "image",
Env: implicitEnvVars,
VolumeMounts: implicitVolumeMounts,
Expand Down Expand Up @@ -285,7 +285,7 @@ func TestMakePod(t *testing.T) {
WorkingDir: workspaceDir,
}},
Containers: []corev1.Container{{
Name: "build-step-ends-with-invalid",
Name: "step-ends-with-invalid",
Image: "image",
Env: implicitEnvVars,
VolumeMounts: implicitVolumeMounts,
Expand Down Expand Up @@ -331,7 +331,7 @@ func TestMakePod(t *testing.T) {
WorkingDir: workspaceDir,
}},
Containers: []corev1.Container{{
Name: "build-step-name",
Name: "step-name",
Image: "image",
Env: implicitEnvVars,
VolumeMounts: implicitVolumeMounts,
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/v1alpha1/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const (

// imageDigestExporterContainerName defines the name of the container that will collect the
// built images digest
imageDigestExporterContainerName = "build-step-image-digest-exporter"
imageDigestExporterContainerName = "step-image-digest-exporter"
)

// Reconciler implements controller.Reconciler for Configuration resources.
Expand Down Expand Up @@ -386,7 +386,7 @@ func updateStatusFromPod(taskRun *v1alpha1.TaskRun, pod *corev1.Pod, resourceLis
taskRun.Status.SetCondition(&apis.Condition{
Type: apis.ConditionSucceeded,
Status: corev1.ConditionUnknown,
Reason: "Building",
Reason: reasonRunning,
})
case corev1.PodFailed:
msg := getFailureMessage(pod)
Expand Down
Loading