Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

NIFIREG-252: adding mavendocker build profile #245

Closed

Conversation

ekovacs
Copy link
Contributor

@ekovacs ekovacs commented Oct 18, 2019

No description provided.

@ekovacs
Copy link
Contributor Author

ekovacs commented Oct 18, 2019

@kevdoran could you please take a look? / Give it a run?

@ekovacs
Copy link
Contributor Author

ekovacs commented Oct 18, 2019

mvn clean package verify -P include-ranger -P include-aws -P docker

creates the docker image locally

@kevdoran kevdoran self-requested a review October 18, 2019 20:43
@kevdoran
Copy link
Contributor

reviewing...

Copy link
Contributor

@kevdoran kevdoran left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @ekovacs!

Overall this looks good to me.

I had one inline suggestion about disabling a plugin execution under certain conditions, but that is more of a nice-to-have than a deal-breaker.

At some point I would like to try to combine this with the nifi-registry-docker module, especially to de-duplicate items such as the shell scripts that get added to the image, but we can save that for a future improvement to the project.

Ran the build and the output is working for me. This will help with testing, esp. integration tests with nifi.

Thanks!

Comment on lines 76 to 95
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>Docker integration tests</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>${project.version}-dockermaven</argument>
<argument>${project.version}</argument>
</arguments>
<executable>${project.basedir}/integration-test.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
Copy link
Contributor

Choose a reason for hiding this comment

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

We should disable executing this plugin when -DskipTests is used with the mvn build.

(It occurs to me that this would be a nice enhancement for nifi as well, which uses a similar mechanism for testing the dockermaven result.)

Copy link
Contributor Author

@ekovacs ekovacs Oct 24, 2019

Choose a reason for hiding this comment

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

updated PR with skipping on -DskipTests
now this will be printed, if skipTests is set:

[INFO] --- exec-maven-plugin:1.3.2:exec (Docker integration tests) @ dockermaven ---
[INFO] skipping execute as per configuraion

also, please note that this test would only run, when integration-test or later maven lifecycle phase (eg.: verify) is specified.

also fixing port greping in test
@ekovacs
Copy link
Contributor Author

ekovacs commented Oct 24, 2019

Thanks for the contribution @ekovacs!

Overall this looks good to me.

I had one inline suggestion about disabling a plugin execution under certain conditions, but that is more of a nice-to-have than a deal-breaker.

At some point I would like to try to combine this with the nifi-registry-docker module, especially to de-duplicate items such as the shell scripts that get added to the image, but we can save that for a future improvement to the project.

Ran the build and the output is working for me. This will help with testing, esp. integration tests with nifi.

Thanks!

at first, i put dockermaven project as a child of nifi-registry-docker (which is nifi-registry-core's child), but then i was unable to make sure that nifi-registry-assembly would execute prior to dockermaven (because nifi-registry-core must be built prior to nifi-registry-assembly),

so i put it under the root directly, and specified nifi-registry-docker-maven later then nifi-registry-assembly in the root pom.xml's module list, so this way i have the built artifacts ready when starting the docker build.

i could have moved the existing nifi-registry-docker to the root to have docker things in one place, but i didn't want to break any external infra which may expect nifi-registry-docker at the currrent location

@kevdoran
Copy link
Contributor

Yeah, good points. I would support moving nifi-registry-core/nifi-registry-docker to a top level module that is responsible for both dockerhub and dockermaven. Do you think we should do that now or save that improvement for later?

@ekovacs
Copy link
Contributor Author

ekovacs commented Oct 24, 2019

Yeah, good points. I would support moving nifi-registry-core/nifi-registry-docker to a top level module that is responsible for both dockerhub and dockermaven. Do you think we should do that now or save that improvement for later?

currently nifi-registry/nifi-registry-core/nifi-registry-docker/dockerhub is not a maven project (no pom.xml in its folder) this is another difference between the NiFi dockerhub and the NiFi Registry counter part. if we were to move it out from under the nifi-registry-core hierarchy, i'd also go for turning it into a maven project.

If it is OK with you, i'd rather file a separate Jira / PR for that move & mavenization, to keep this PR small & single-work-item-focused.

@kevdoran
Copy link
Contributor

+1 for relocating it and making it a maven project, as well as for doing that as a separate jira/pr. I will re-review this PR as-is.

@ekovacs
Copy link
Contributor Author

ekovacs commented Oct 25, 2019

+1 for relocating it and making it a maven project, as well as for doing that as a separate jira/pr. I will re-review this PR as-is.

just created a follow up JIRA about it:
https://issues.apache.org/jira/browse/NIFIREG-342

@kevdoran kevdoran closed this in 2ec22a4 Oct 25, 2019
Copy link
Contributor

@kevdoran kevdoran left a comment

Choose a reason for hiding this comment

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

+1, merging

arpadboda pushed a commit that referenced this pull request Mar 17, 2020
skip integration test if -DskipTests is set

This closes #245.

Signed-off-by: Kevin Doran <kdoran@apache.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants