Skip to content

Commit

Permalink
Switch the dockerfile used to test image digest exports with Kaniko.
Browse files Browse the repository at this point in the history
This dockerfile builds much faster than the other one, taking ~1s instead of a minute.
  • Loading branch information
dlorenc committed Jul 31, 2019
1 parent 9a30695 commit e951e5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/kaniko_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
func getGitResource(namespace string) *v1alpha1.PipelineResource {
return tb.PipelineResource(kanikoResourceName, namespace, tb.PipelineResourceSpec(
v1alpha1.PipelineResourceTypeGit,
tb.PipelineResourceSpecParam("Url", "https://github.com/pivotal-nader-ziada/gohelloworld"),
tb.PipelineResourceSpecParam("Url", "https://github.com/GoogleContainerTools/kaniko"),
))
}

Expand All @@ -56,7 +56,7 @@ func getTask(repo, namespace string, withSecretConfig bool) *v1alpha1.Task {
}
stepOps := []tb.ContainerOp{
tb.Args(
"--dockerfile=/workspace/gitsource/Dockerfile",
"--dockerfile=/workspace/gitsource/integration/dockerfiles/Dockerfile_test_label",
fmt.Sprintf("--destination=%s", repo),
"--context=/workspace/gitsource",
),
Expand Down Expand Up @@ -138,7 +138,7 @@ func TestKanikoTaskRun(t *testing.T) {
match := re.FindStringSubmatch(logs)
// make sure we found a match and it has the capture group
if len(match) != 2 {
t.Fatalf("Expected to find an image digest in the build output")
t.Fatalf("Expected to find an image digest in the build output: %s", logs)
}
// match the local digest, which is first capture group against the remote image
digest := match[1]
Expand Down

0 comments on commit e951e5b

Please sign in to comment.