Skip to content

MTA-819 test fails: webapp-docker BuildConfig references repo without Dockerfile #956

Description

@midays

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

  1. Run MTA-819 test
  2. BuildRun webapp-docker-run-1 executes
  3. Buildah looks for Dockerfile in repo root
  4. Fails with DockerfileNotFound

Related

Test: e2e-tests/tests/tier0/mta_819_buildconfig_shipwright_e2e_test.go
App definition: k8s-apps-deployer buildconfig-test role

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions