MS3Inc / camel-archetypes

Apache License 2.0
4 stars 1 forks source link

Add maven deploy plugin for camel web service pipeline #26

Closed rlratcliffe closed 11 months ago

rlratcliffe commented 2 years ago

The profile is used/added so that when REG_HOST isn't provided (during local development, for example) the environment variable doesn't need to be provided by the developer

jam01 commented 2 years ago

:thinking:

rlratcliffe commented 2 years ago

if we do decide to use the profile, I'm of course open to the changing the profile id or even adding a comment for clarity about why it's there

jam01 commented 2 years ago

Let's change the maven deploy plugin for this property

        <maven.deploy.skip>true</maven.deploy.skip>

Windows builds still failing?

rlratcliffe commented 2 years ago

Let's change the maven deploy plugin for this property

        <maven.deploy.skip>true</maven.deploy.skip>

Windows builds still failing?

What should it change to? This is being changed here I believe: https://github.com/MS3Inc/camel-archetypes/pull/26/files#diff-aca6fb8b598ee90ea4549b1086094e0fe5de96296e7f11c1b7288c4d396873b3R226

jam01 commented 2 years ago

instead of including the plugin, just set that property

rlratcliffe commented 2 years ago

updating this issue so others can help out if they have more time, as we should aim to get this merged when possible. the pipelines already support deploying. this PR currently cannot be merged due to it failing with mvn clean install on Windows.

to run locally, clone this repo, checkout the branch the PR is from, and follow the instructions to install locally in the README

excerpt of the error:

[INFO] [ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default) on project it-run: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: com.spotify.docker.client.shaded.org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default) on project it-run: Could not build image

I am not seeing the ability to run the workflow action manually anymore, but the error will appear there also if the action is run manually or the branch is pushed to.

rlratcliffe commented 2 years ago

is there a reason we decided not to use jib or fabric8's deploy plugin? can I try out one of those? @jam01 @rmccright-ms3

jam01 commented 2 years ago

I think Spotify's was just the first we found. I used jib in another project without issues

jam01 commented 2 years ago

I'm not sure if the plugin is being continued but I know in general fabric8 as an org does not exist anymore.

rlratcliffe commented 2 years ago

yeah. there's no indication in their repo that it's not supported anymore though, unlike spotify's plugin which spotify is no longer updating.

I didn't go with jib because it doesn't seem to support dockerfiles, it's all xml configuration instead. :thinking:

this windows error is different than the last one though, and does work with mvn clean install on the windows machine I tried it on.

rlratcliffe commented 2 years ago

did a lot of tests on windows today and on a private personal repo with github actions. here's the summary of what I've figured out so far:

this issue with windows seems to be primarily related to github actions.

with windows with docker that uses windows containers:

with windows with docker that uses linux containers:

next ideas for resolving:

rlratcliffe commented 2 years ago

was having trouble configuring jkube, so switched back to fabric8 just to make sure I could get the two different configs for the dockerfile working correctly. now that it is, moving back to jkube.

rlratcliffe commented 2 years ago

still need to:

rlratcliffe commented 11 months ago

switching to using kaniko, so abandoning this.