-
Notifications
You must be signed in to change notification settings - Fork 211
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
WIP fix: integration tests are now built in the user namespace #412
base: master
Are you sure you want to change the base?
Conversation
@bartoszmajsak is it a good idea to keep it into Jenkinsfile only? |
@hrishin can you expand on what you mean? |
@@ -29,7 +29,7 @@ def call(body) { | |||
echo "WARNING: Integration tests are current DISABLED for these pipelines!" | |||
|
|||
} else { | |||
sh "mvn org.apache.maven.plugins:maven-failsafe-plugin:integration-test ${kubeNS} -P openshift-it -Dit.test=${config.itestPattern} -DfailIfNoTests=${config.failIfNoTests} org.apache.maven.plugins:maven-failsafe-plugin:verify" | |||
sh "mvn org.apache.maven.plugins:maven-failsafe-plugin:integration-test ${kubeNS} -Dnamespace.use.current=false -DenableImageStreamDetection=true -P openshift-it -Dit.test=${config.itestPattern} -DfailIfNoTests=${config.failIfNoTests} org.apache.maven.plugins:maven-failsafe-plugin:verify" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a comment explaining all parameters we are sending, just to understand in some months why we set them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want these parameters to be here to start with - see my "Open points" section in the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know but I put the comment just in case we decided for now to go with this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide, I will :)
Based on the discussion today let's recap what we can do with that issue, as I'm not sure we reached the conclusion. Here are the options I can think of:
I think this is an important point to address. My overall concern is that the library as is now, makes it hard for any project to customize, and we all know that even in the |
Feels the same. It appears like the the purpose of the At this moment this library is failing about one thing "speration of concern, isolating thing that is subject to vary from project to project like Otherwise being pragmatic, I agree with @bartoszmajsak approach to provide customization for |
@bartoszmajsak voices heard. #418 Can you we try to follow https://github.com/fabric8io/fabric8-pipeline-library#maven-canary-release.? The same options are avaliable now with |
Thanks @hrishin. In order to make this fix working we also need to pass this fabric8-pipeline-library/vars/mavenCI.groovy Lines 65 to 69 in c6231c0
and adjust this line
|
This patch allows the to over maven command in order to allow inetgration tests to pass specific maven flags. Related to: fabric8io#412
This patch allows the to over maven command in order to allow integration tests to pass specific maven flags. Related to: fabric8io#412
This patch allows the to over maven command in order to allow integration tests to pass specific maven flags. Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. This patch adds `runTestsInUserNamespace` to use username namespace as defualt default environment to run Integration Tests. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. It has added a util method to retrive default test namespace. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. It has added a util method to retrive default test namespace. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTes{}` to pass specific command to execute. It has added a util method to retrive default test namespace. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: fabric8io#412
* mavenIntegrationTest: allow overriding mvn commands This patch allows the `mavenCI{}` to over maven command in order to allow `mavenIntegrationTest{}` to pass specific command to execute. It has added a util method to retrieve default test namespace. Fixes: openshiftio/openshift.io#763 Fixes: openshiftio/openshift.io#3134 Related to: #412 * refactored code as per review comments - extracted default maven command code to separate method - changed variable names - updated readme
@bartoszmajsak shall we close this PR? |
Due to misconfigured
arquillian.xml
and environment variables in the pipeline library integration tests are currently executed in theuser-jenkins
namespace which is not intended for that nor has enough resources - see openshiftio/openshift.io#3134 (comment)The idea always was to use
user
namespace for that purpose. Thereforearquillian.xml
is configured in a way that when executing tests in Che it will pick up current namespace (and it happens to beuser
).This fix brings the same behaviour to the CI build.
Open points
Before we merge, let's discuss one thing, as the code in the current shape is not something I'm happy about.
Is there a way to set up some
config.properties
which we can than refer to in the pipeline library?I know we have a hook
.openshiftio/Jenkins.setup.groovy
withsetupEnvironmentPost()
. I was wondering if we can externalized things like profiles and env variables we can pass for the build as mvn arguments, as right now have fixed in the pipeline itself (i.e.-P openshift
- which not every project can have). This way we can move away some booster-specific settings for OSIO and do not pollute the code of the pipeline library. I see there is${config.itestPattern}
so was wondering if that concept can be somehow re-usedFixes openshiftio/openshift.io#3134 openshiftio/openshift.io#763