Update integration tests to use new cst
This commit is contained in:
parent
6ff3c588af
commit
ac8a110593
|
|
@ -26,6 +26,7 @@ const (
|
||||||
executorImage = "executor-image"
|
executorImage = "executor-image"
|
||||||
dockerImage = "gcr.io/cloud-builders/docker"
|
dockerImage = "gcr.io/cloud-builders/docker"
|
||||||
ubuntuImage = "ubuntu"
|
ubuntuImage = "ubuntu"
|
||||||
|
structureTestImage = "gcr.io/gcp-runtimes/container-structure-test"
|
||||||
testRepo = "gcr.io/kaniko-test/"
|
testRepo = "gcr.io/kaniko-test/"
|
||||||
dockerPrefix = "docker-"
|
dockerPrefix = "docker-"
|
||||||
kanikoPrefix = "kaniko-"
|
kanikoPrefix = "kaniko-"
|
||||||
|
|
@ -205,15 +206,6 @@ func main() {
|
||||||
Name: ubuntuImage,
|
Name: ubuntuImage,
|
||||||
Args: []string{"chmod", "+x", "container-diff-linux-amd64"},
|
Args: []string{"chmod", "+x", "container-diff-linux-amd64"},
|
||||||
}
|
}
|
||||||
structureTestsStep := step{
|
|
||||||
Name: "gcr.io/cloud-builders/gsutil",
|
|
||||||
Args: []string{"cp", "gs://container-structure-test/latest/container-structure-test", "."},
|
|
||||||
}
|
|
||||||
structureTestPermissions := step{
|
|
||||||
Name: ubuntuImage,
|
|
||||||
Args: []string{"chmod", "+x", "container-structure-test"},
|
|
||||||
}
|
|
||||||
|
|
||||||
GCSBucketTarBuildContext := step{
|
GCSBucketTarBuildContext := step{
|
||||||
Name: ubuntuImage,
|
Name: ubuntuImage,
|
||||||
Args: []string{"tar", "-C", "/workspace/integration_tests/", "-zcvf", "/workspace/context.tar.gz", "."},
|
Args: []string{"tar", "-C", "/workspace/integration_tests/", "-zcvf", "/workspace/context.tar.gz", "."},
|
||||||
|
|
@ -239,7 +231,7 @@ func main() {
|
||||||
Args: []string{"push", onbuildBaseImage},
|
Args: []string{"push", onbuildBaseImage},
|
||||||
}
|
}
|
||||||
y := testyaml{
|
y := testyaml{
|
||||||
Steps: []step{containerDiffStep, containerDiffPermissions, structureTestsStep, structureTestPermissions, GCSBucketTarBuildContext, uploadTarBuildContext, buildExecutorImage,
|
Steps: []step{containerDiffStep, containerDiffPermissions, GCSBucketTarBuildContext, uploadTarBuildContext, buildExecutorImage,
|
||||||
buildOnbuildImage, pushOnbuildBase},
|
buildOnbuildImage, pushOnbuildBase},
|
||||||
Timeout: "1200s",
|
Timeout: "1200s",
|
||||||
}
|
}
|
||||||
|
|
@ -315,20 +307,15 @@ func main() {
|
||||||
Args: []string{"pull", kanikoImage},
|
Args: []string{"pull", kanikoImage},
|
||||||
}
|
}
|
||||||
// Run structure tests on the kaniko and docker image
|
// Run structure tests on the kaniko and docker image
|
||||||
args := "container-structure-test -image " + kanikoImage + " " + test.structureTestYamlPath
|
kanikoStructureTest := step{
|
||||||
structureTest := step{
|
Name: structureTestImage,
|
||||||
Name: ubuntuImage,
|
Args: []string{"test", "--image", kanikoImage, "--config", test.structureTestYamlPath},
|
||||||
Args: []string{"sh", "-c", args},
|
|
||||||
Env: []string{"PATH=/workspace:/bin"},
|
|
||||||
}
|
}
|
||||||
args = "container-structure-test -image " + dockerImageTag + " " + test.structureTestYamlPath
|
|
||||||
dockerStructureTest := step{
|
dockerStructureTest := step{
|
||||||
Name: ubuntuImage,
|
Name: structureTestImage,
|
||||||
Args: []string{"sh", "-c", args},
|
Args: []string{"test", "--image", dockerImageTag, "--config", test.structureTestYamlPath},
|
||||||
Env: []string{"PATH=/workspace:/bin"},
|
|
||||||
}
|
}
|
||||||
|
y.Steps = append(y.Steps, dockerBuild, kaniko, pullKanikoImage, kanikoStructureTest, dockerStructureTest)
|
||||||
y.Steps = append(y.Steps, dockerBuild, kaniko, pullKanikoImage, structureTest, dockerStructureTest)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
d, _ := yaml.Marshal(&y)
|
d, _ := yaml.Marshal(&y)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue