netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Netbeans CI using Apache Jenkins infra

Open hectorespert opened this issue 5 years ago • 11 comments
trafficstars

Build and publish reports using a Jenkins pipeline: https://ci-builds.apache.org/job/Netbeans/job/netbeans-github/

Discussion here: https://lists.apache.org/thread.html/raff8bc5553e0dcfb2badf02a12e82a3c111f6ffa48b8eccffe811415%40%3Cdev.netbeans.apache.org%3E

hectorespert avatar Oct 11 '20 08:10 hectorespert

Checks seems to be confused, perhaps by all the force-pushes. Hard to follow what went on here.

Sorry, I've been testing some changes

hectorespert avatar Oct 14 '20 06:10 hectorespert

hi @hectorespert you should discard old build maybe options { buildDiscarder(logRotator(numToKeepStr: '2')) }

ebarboni avatar Oct 14 '20 11:10 ebarboni

hi @hectorespert you should discard old build maybe options { buildDiscarder(logRotator(numToKeepStr: '2')) }

buildDiscarder option added

hectorespert avatar Oct 15 '20 15:10 hectorespert

Despite often helping to maintain it, Ant is so rarely used these days that I totally forgot to suggest https://plugins.jenkins.io/ant/

withAnt {
  sh 'ant …'
}

which will improve display in the standard console log.

jglick avatar Oct 15 '20 17:10 jglick

Jenkins test this please

hectorespert avatar Dec 05 '20 12:12 hectorespert

@hectorespert that at the end is intended to replace GA and travis to check for PR ?

I would suggest removing the content of the Jenkinsfile.groovy and make it call a new libraries (example here: https://github.com/apache/netbeans/blob/master/nbbuild/jenkins/Jenkinsfile.groovy)

And you can add the real content here. https://github.com/apache/netbeans-jenkins-lib/tree/master/vars

That may allow "independent" tweaking of the job and may save your time adjusting.

ebarboni avatar Jul 23 '21 14:07 ebarboni

Libraries are for sharing Pipeline script across projects. I would especially warn against loading a library from an implicit master branch as it means that pushes to another repo could cause builds to suddenly start breaking in this one, or conversely that PRs to this repo would fail until another repo was updated. Better to keep the Pipeline script here, so that for example a refactoring to build.xml to change Ant target names could simply make the corresponding change to Jenkinsfile.

jglick avatar Jul 23 '21 14:07 jglick

I see, on the particular case of netbeans I used it to avoid always copying pipeline modification because we build release branch to have javadoc menu updated on prior release (for forward navigation). But for PR seems more tricky.

ebarboni avatar Jul 23 '21 16:07 ebarboni

@hectorespert that at the end is intended to replace GA and travis to check for PR ?

Yes, it was a try to start replacing GA and Travis due the limitations of these.

hectorespert avatar Jul 23 '21 17:07 hectorespert

For PRs, if the Jenkins file is defined in project, it allows to adjust o improve the pipeline in an specific branch before merge it, like the travis.yaml config and GA config files.

hectorespert avatar Jul 23 '21 18:07 hectorespert

@hectorespert, maybe for testing/adjusting you may use empty https://github.com/apache/netbeans-temp (@JaroslavTulach created it but maybe we can recycle ) and configure jenkins to see how it may scale behave on several parell PR / master

ebarboni avatar Aug 03 '21 10:08 ebarboni

@mbien I think the new way with GA may allow to close this one. travis is out.

ebarboni avatar Dec 13 '22 10:12 ebarboni

@mbien I think the new way with GA may allow to close this one. travis is out.

@ebarboni agreed, closing.

mbien avatar Dec 13 '22 14:12 mbien