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
Add jenkins pipeline. #965
Conversation
Migration to new eclipse build infrastructure. Resets JAVA_TOOL_OPTIONS and _JAVA_OPTIONS in order to use java 1.7 for build. Signed-off-by: Achim Kraus <achim.kraus@bosch-si.com>
|
Currently tested with jobs If it's OK to go with declarative pipelines, I will create PRs for 1.0.x, master, and californium.tools as well. I will also prepare a release-job pipeline. Using java 1.8 and compile for 1.7 would require a 1.7 classpath to check the api. FMPOV it's easier to reset the global env than to try to use java 1.8. |
|
Naive question but what is benefits of using pipelines here ? just having build configuration in code repository ?
I didn't get the point here. Do we want to compile with java 7 or java 8 or both ? |
|
We compile with java 7 for optimal java 7 compatibility. |
Yes, to ensure, that "Resets JAVA_TOOL_OPTIONS and _JAVA_OPTIONS in order to use java 1.7" is applied. It's not required to use that pipeline on other jenkins instances nor to build californium locally. |
|
I'm still confused. I understand we want to compile with java 7. |
Only on an other jenkins instances, but not longer on the new eclipse build jenkins. (I will add you to two bugs reported on https://bugs.eclipse.org)
I guess the other. |
|
I read bugzilla issues. |
|
Yes, it's easy to create a new job and use the "2.0.x" job to copy. If you want to show, that java 8 is working, then please use the "master" job to copy :-). |
|
Just to mention: |
|
So my understanding, JAVA_TOOL_OPTIONS=-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
_JAVA_OPTIONS: -XX:MaxRAMPercentage=64.0It seems that at least those options I expected that Anyway I see you found a workaround using shell command : export _JAVA_OPTIONS=""
export JAVA_TOOL_OPTIONS=""
/opt/tools/apache-maven/latest/bin/mvn -f pom.xml -Dorg.eclipse.californium.elements.assume.TimeAssume.enable=true -DcreateJavadoc=true clean installAny reason why you didn't go with this solution and prefer to use pipeline ? Another solution could be to ask to eclipse to activate EnvInject to be able to override environment at job level. I will ask to eclipse if they can fix/workaround this on their side because if there is other projects which use java 7 (at least Leshan), they will face the same issue. Anyway I'm not against using pipeline, I don't know it so much and I just try to better understand the situation. :-) |
That's obvious, that this should prevent the failure. |
Three weeks ago, I would have agreed. But declarative pipelines are no big things. But today, yes, there are reasons. Using maven in a declarative pipeline isn't complexer than in a shell script. in fact, the pipeline uses the "sh" to invoke maven. The pipelines could be much easier used to create jenkins jobs. Declarative pipeline are more similar to a "import" for traditional, serialized jenkins jobs. OK, they not exactly the same, and you can't create them just by export. But using them feels more like importing a job and not "scripting something complex". May be that's the difference to scripted-pipelines. One thing, which seems to be important to obey:
One alternative approach would be to use java 8 and switch it to java 7 compatibility. |
|
To complete my bugzilla comment. If you are only interested by overriding variable environment I feel adding build parameter is more straightforward. Go for pipeline if you just think that pipeline are better than job anyway. Just a remark, you say that "it's hard to convince me", but read the discussion again trying to put yourself in my place and you will see it's hard to me to understand the situation with available information. |
| // reset global env of ci.eclipse jenkins e.g | ||
| // -XX:+UseContainerSupport | ||
| // otherwise these global settings will cause | ||
| // a failure using java 1.7 |
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.
Clearly a detail but maybe we can add link the bugzilla issue.
|
Dear @sbernard31, |
|
I was not in a conflict spirit. I was sincere when I said : "Anyway I'm not against using pipeline, I don't know it so much and I just try to better understand the situation. :-)" and "Go for pipeline if you just think that pipeline are better than Jenkins job anyway." |
Migration to new eclipse build infrastructure new eclipse build infrastructure.
Resets JAVA_TOOL_OPTIONS and _JAVA_OPTIONS in order to use java 1.7 for
build.
Signed-off-by: Achim Kraus achim.kraus@bosch-si.com