Skip to content

Create a deployment using a BuildConfig #4151

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

Closed
datho7561 opened this issue May 23, 2024 · 3 comments · Fixed by #4235
Closed

Create a deployment using a BuildConfig #4151

datho7561 opened this issue May 23, 2024 · 3 comments · Fixed by #4235
Assignees
Milestone

Comments

@datho7561
Copy link
Contributor

NOTE This will only work on OpenShift, since BuildConfigs are specific to OpenShift

In the OpenShift Developer console, when you open the "Add to project > Import from Git" context menu, it detects the language of the git project and creates a BuildConfig to build it.

The wizard:

image

The created BuildConfig:

image

I think we should add a new context menu item "Create deployment using BuildConfig" in the same context menu as the "Create deployment from image" context menu item that supports this workflow.

The main benefit of the BuildConfig is that it builds the container image for the deployment on the cluster and can create a new container image and deploy it when the app's source code is updated in the Git repo.

The main thing that we'll need to figure out for this workflow is how they are getting the container image to use. Is it the same process as with odo? i.e. use alizer to select a devfile then use the devfile's container image in the build config? Or is something more complex going on? We should review the source code of the Developer Console to learn more.

@rgrunber
Copy link
Member

If our existing "Create Component" UI can somehow be re-used that would be ideal.

@msivasubramaniaan msivasubramaniaan moved this from 📋 Backlog to 🏗 In progress in IDE Cloudaptors Jun 18, 2024
@vrubezhny vrubezhny modified the milestones: 1.15.0, 1.16.0 Jul 15, 2024
@msivasubramaniaan
Copy link
Collaborator

Hello @datho7561,

  1. While testing the git import with https://github.com/evanshortiss/nodejs-container-builds-example in dev console it responded as Build image detected and no proper build image recommendation.
  2. I was manually selected nodejs as build image and create the deployment
  3. The build was failing. (Please refer attached video)
  4. The same build was success when I tried with java build image

build-failing-with-nodejs-image

How we can manage this kind of URL on our extension, as the mentioned URL odo analyze response is nodejs so I just recommended with nodejs build image.(But it shouldn't be)

Please let me know if you have any idea to manage these kind of URLs

@datho7561
Copy link
Contributor Author

I think the repo you mentioned illustrates something Tim mentioned:

The steps to create a container of an app are different for each app. Even knowing the language or framework that the app uses isn't enough to create a deployment of the app.

I don't think there's anything we can do in that case. I think the developer console behaviour is good. i.e. we detect that none of the configurations will work properly and let the user pick for themselves.

@msivasubramaniaan msivasubramaniaan moved this from 🏗 In progress to 👀 In review in IDE Cloudaptors Aug 27, 2024
@msivasubramaniaan msivasubramaniaan linked a pull request Aug 27, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDE Cloudaptors Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants