Problem
The MTA-819 BuildConfig to Shipwright e2e test fails because the webapp-docker BuildConfig is misconfigured.
Current configuration (in k8s-apps-deployer):
- Strategy: Docker
- Git repo:
https://github.com/sclorg/django-ex.git
- Dockerfile path:
Dockerfile
Issue:
The django-ex repository is an S2I (Source-to-Image) example and does not contain a Dockerfile. When the BuildConfig is converted to a Shipwright Build and executed, the BuildRun fails with:
Message: The Dockerfile 'Dockerfile' does not exist.
Reason: DockerfileNotFound
Root Cause
The webapp-docker BuildConfig template in k8s-apps-deployer uses a Docker build strategy with a repo that doesn't have a Dockerfile:
k8s-apps-deployer/k8sdeployer/ansible/roles/buildconfig-test/templates/webapp-docker-bc.yaml.j2
This would fail even on the source cluster if someone tried to run oc start-build webapp-docker.
Solution
Change the Git repository to one that actually contains a Dockerfile, such as:
https://github.com/sclorg/httpd-ex.git (httpd example with Dockerfile)
https://github.com/openshift/ruby-ex.git (Ruby example with Dockerfile)
Impact
This is not a plugin bug - the crane-plugin-buildconfig-to-shipwright correctly converts the BuildConfig, preserving the source repo and Dockerfile path. The issue is with the test data itself being invalid.
The other two BuildConfigs in the test work correctly:
api-s2i: Uses S2I strategy (works)
docker-envvars: Uses inline Dockerfile (works)
Steps to Reproduce
- Run MTA-819 test
- BuildRun
webapp-docker-run-1 executes
- Buildah looks for Dockerfile in repo root
- Fails with DockerfileNotFound
Related
Test: e2e-tests/tests/tier0/mta_819_buildconfig_shipwright_e2e_test.go
App definition: k8s-apps-deployer buildconfig-test role
Problem
The MTA-819 BuildConfig to Shipwright e2e test fails because the
webapp-dockerBuildConfig is misconfigured.Current configuration (in k8s-apps-deployer):
https://github.com/sclorg/django-ex.gitDockerfileIssue:
The
django-exrepository is an S2I (Source-to-Image) example and does not contain a Dockerfile. When the BuildConfig is converted to a Shipwright Build and executed, the BuildRun fails with:Root Cause
The
webapp-dockerBuildConfig template in k8s-apps-deployer uses a Docker build strategy with a repo that doesn't have a Dockerfile:k8s-apps-deployer/k8sdeployer/ansible/roles/buildconfig-test/templates/webapp-docker-bc.yaml.j2This would fail even on the source cluster if someone tried to run
oc start-build webapp-docker.Solution
Change the Git repository to one that actually contains a Dockerfile, such as:
https://github.com/sclorg/httpd-ex.git(httpd example with Dockerfile)https://github.com/openshift/ruby-ex.git(Ruby example with Dockerfile)Impact
This is not a plugin bug - the crane-plugin-buildconfig-to-shipwright correctly converts the BuildConfig, preserving the source repo and Dockerfile path. The issue is with the test data itself being invalid.
The other two BuildConfigs in the test work correctly:
api-s2i: Uses S2I strategy (works)docker-envvars: Uses inline Dockerfile (works)Steps to Reproduce
webapp-docker-run-1executesRelated
Test:
e2e-tests/tests/tier0/mta_819_buildconfig_shipwright_e2e_test.goApp definition: k8s-apps-deployer buildconfig-test role