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

Fix issue with build-images and deploy not working with Docker if optional buildContext field is not set in Devfile (#5600) #5657

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Apr 12, 2022

What type of PR is this:
/kind bug

What does this PR do / why we need it:
This makes the build context directory for Docker (and Podman) default to the Devfile parent directory, if not set.

Which issue(s) this PR fixes:
Fixes #5600

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:
See reproduction steps detailed in #5600 (comment)

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 12, 2022
@netlify
Copy link

netlify bot commented Apr 12, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit bb7299d
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/625588df24a6c400088e6696

@openshift-ci openshift-ci bot requested review from dharmit and valaparthvi April 12, 2022 14:12
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rm3l rm3l changed the title [#5600] Fix issue with build-images and deploy not working with Docker if optional buildContext field is not set in Devfile Fix issue with build-images and deploy not working with Docker if optional buildContext field is not set in Devfile (#5600) Apr 12, 2022
@rm3l rm3l requested a review from feloy April 12, 2022 14:15
@odo-robot
Copy link

odo-robot bot commented Apr 12, 2022

Unit Tests on commit finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 12, 2022

OpenShift Tests on commit finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 12, 2022

Kubernetes Tests on commit finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 12, 2022

Validate Tests on commit finished successfully.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Apr 13, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented Apr 13, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feloy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Apr 13, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 19, 2022
@rm3l
Copy link
Member Author

rm3l commented Apr 19, 2022

/override ci/prow/v4.10-integration-e2e

Looks like infra problems on Prow, and IBM Cloud tests are passing.

@openshift-ci
Copy link

openshift-ci bot commented Apr 19, 2022

@rm3l: rm3l unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file.

In response to this:

/override ci/prow/v4.10-integration-e2e

Looks like infra problems on Prow, and IBM Cloud tests are passing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rm3l
Copy link
Member Author

rm3l commented Apr 19, 2022

/test v4.10-integration-e2e

@openshift-merge-robot openshift-merge-robot merged commit 8be3996 into redhat-developer:main Apr 19, 2022
@rm3l rm3l deleted the 5600-odo-build-images-and-odo-deploy-do-not-work-with-docker-if-optional-buildcontext-field-is-not-set-in-devfile branch April 19, 2022 14:03
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
… optional `buildContext` field is not set in Devfile (redhat-developer#5600) (redhat-developer#5657)

* Add unit test highlighting the issue

* Add integration tests to both `build-images` and `deploy` highlighting the issue

* Use the Devfile directory as default build context path if not defined

Per the Devfile spec [1], `buildContext` should be optional.

[1] https://devfile.io/docs/devfile/2.2.0/user-guide/api-reference/

* Quote the build context path value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

odo build-images and odo deploy do not work with Docker if optional buildContext field is not set in Devfile
4 participants