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 compose build integration #2305

Merged
merged 5 commits into from
Mar 7, 2022
Merged

Conversation

jLopezbarb
Copy link
Contributor

Signed-off-by: Javier López Barba javier@okteto.com

Fixes: It was rebuilding the image on the deploy if there was a stack

Proposed changes

  • If run okteto build with a compose it will run and include the host volumes on the built image
  • If run okteto deploy it will build the images at the beginning and not while deploying stack

Signed-off-by: Javier López Barba <javier@okteto.com>
@jLopezbarb jLopezbarb requested a review from a team March 2, 2022 17:57
Copy link
Contributor

@pchico83 pchico83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I run okteto build and okteto deploy on this repo:
https://github.com/pchico83/compose-getting-started

The image for vote is registry.cloud.okteto.net/pchico83/compose-getting-started-vote:okteto-with-volume-mounts, but it should be the tag based on the sha256:56df26d0b78b786c248d633251ca to make sure the containers are redeployed if the image has changed.

pkg/model/const.go Show resolved Hide resolved
inferredManifest, err = inferredManifest.InferFromStack()
if err != nil {
return nil, err
}
//TODO: uncomment
// inferredManifest.Deploy.Compose.Stack.Endpoints = devManifest.Deploy.Endpoints
inferredManifest.Deploy.Compose.Stack.Endpoints = devManifest.Deploy.Endpoints
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting a segmentation fault error here when running okteto build in this repo:
https://github.com/pchico83/compose-getting-started

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't repro it, are you using any flag on the build command?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, just okteto build or okteto deploy. Let me try again

Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
@jLopezbarb jLopezbarb merged commit fea9900 into master Mar 7, 2022
@jLopezbarb jLopezbarb deleted the jlopezbarb/fix-compose-integration branch March 7, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants