arey / maven-config-github-cloudbees

Maven configuration example pom.xml file for working both with GitHub and CloudBees maven repository
maven-config-github-cloudbees
6 stars 2 forks source link

documentation update #1

Open jmilkiewicz opened 11 years ago

jmilkiewicz commented 11 years ago

Hi

I just bumped into your project and i am wondering if the settings you provided ,i.e setting.xml and pom.xml allow one to have deployed artifacts anonymously downloadable. To make it clear: if i use your code to have artifacts deployed to my cloudbees maven repository, will these artifacts become publicly accessible to my colleagues who does not have cloudbees (assuming that they only add appropriate sections to their poms). I think that this kind of information could be appended into readme.

br Jakub

arey commented 11 years ago

Hi Jakub,

Thanks you for your comment. If I understand, your colleagues just want to download maven artefacts hosted onto your Cloudbees repositories? They do not need to deploy artefacts. Cloudbees repositories may be public (ie. https://repository-javaetmoi.forge.cloudbees.com/release/) . So you may add the following section in your pom.xml or in settings.xml (in a profile) :

<repository>
  <id>javaetmoi-cloudbees-release</id>
  <name>javaetmoi-cloudbees-release</name>
  <url>https://repository-javaetmoi.forge.cloudbees.com/release/</url>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
</repository>

Did I answered to your question?

Regards,

Antoine

jmilkiewicz commented 11 years ago

hi

Thx for a help. Yes, you are completely right about adding the secion to others pom.xml files. I just wasn't aware that cloudbees maven repository can be publicly available (in read-only access), so after reading your pom.xml and settings.xml i was more than sure that you had to put some magic to make your cloudbees maven repos public.
Honestly, i am really interested what you did, since i want to do the same: on my cloudbees account i have a number of projects with some of them being utility jars, like hamcrest matchers, selenium helpers, spring utilities and so on. So my idea is just to migrate them from cloudbees git repo to github (to let other use/fork them) but still use cloudbees maven repositories (publicly accessible). Since utility project can depend on each other, i would like to avoid the situation when someone fork/clone/download a single project he/she must build other utility dependencies on his own. Ideally, I would like to copy-paste the infrastructure (jenkins,maven poms, release procedures) you created for hibernate-hydrate. Does it make sense?

jmilkiewicz commented 11 years ago

Hi

I hope my previous post didn't scary you. I am still at the time of dealing with cloudbees about subscription migration from one account to another. Till the migration is finished i can not start with moving utility projects from cloudbees to github. For now i have a couple of questions, if you do not mind:

  1. how do you make releases to maven repo? Do you run mvn release:prepare , mvn release perform from a dedicated Jenkins job or just do it manually on your localhost?
  2. in case of pull request do you have your jenkins run compilation/tests before pull request is accepted ? If yes do you use buildhive or http://wiki.cloudbees.com/bin/view/DEV/Github+Pull+Request+Validation (with the latter requires paid subscription) ?
  3. Regarding https://javaetmoi.ci.cloudbees.com/job/Hibernate-Hydrate/, is there any special jenkins configuration settins beside, using github and running clean/test mvn goal ?

It would be really great if you could helm me with these questions

arey commented 11 years ago

Hi,

I'm sorry. I did not take the time to answer your previous comment. I quickly answers to thoses 3 questions:

  1. Yes. I am using the "mvn release:prepare release:perform" command line to deploy a release version of an artefact to my cloudbees repo
  2. I didn't used those mechanisms to accept pull request. For the moment, I just have 2 or 3 pull request. But it's very interesting. Let me kown if your satisfied with the "Github Pull Request Validation" provided by Cloudbees. I saw git-validated-merge-plugin + github-pull-request-build-plugin are available for paid subscriptions.
  3. To hook commit into github, you have to configure both jenkins and github. Here are the instructions : http://developer.cloudbees.com/bin/view/DEV/GitHub+Commit+Hooks+HOWTO. Git repo URL and maven command line should also be configured.

Hope it helps you,

Antoine

jmilkiewicz commented 11 years ago

hi

Thx, for a response. I am on vacations from Tuesday, but hope to create my github/jenkins infrastructure tomorrow. In other case i will proceed as soon as i come back. Regarding releasing, do you have a plan/any experience making releases via Jenkins ?

br Jakub

2012/11/18 Antoine Rey notifications@github.com

Hi,

I'm sorry. I did not take the time to answer your previous comment. I quickly answers to thoses 3 questions:

  1. Yes. I am using the "mvn release:prepare release:perform" command line to deploy a release version of an artefact to my cloudbees repo
  2. I didn't used those mechanisms to accept pull request. For the moment, I just have 2 or 3 pull request. But it's very interesting. Let me kown if your satisfied with the "Github Pull Request Validation" provided by Cloudbees.
  3. To hook commit into github, you have to configure both jenkins and github. Here are the instructions : http://developer.cloudbees.com/bin/view/DEV/GitHub+Commit+Hooks+HOWTO. Git repo URL and maven command line should also be configured.

Hope it helps you,

Antoine

— Reply to this email directly or view it on GitHubhttps://github.com/arey/maven-config-github-cloudbees/issues/1#issuecomment-10485158.

arey commented 11 years ago

Hope all goes well for settins your github/jenkins infrastructure. Mine is very simple: jenkins detects changes into my github repository then launches a mvn clean deploy. For releasing, I manually uses the maven release plugin. I know it exists this release plugin https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin but I never use it.

jmilkiewicz commented 11 years ago

Hi

Antoine, thx again for your answers. As soon as my cloudbees foss account is set up (actually downgraded from basic to foss) i will proceed with configurations (or go on holidays, whichever comes first :) ).

br Jakub

2012/11/19 Antoine Rey notifications@github.com

Hope all goes well for settins your github/jenkins infrastructure. Mine is very simple: jenkins detects changes into my github repository then launches a mvn clean deploy. For releasing, I manually uses the maven release plugin. I know it exists this release plugin https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin but I never use it.

— Reply to this email directly or view it on GitHubhttps://github.com/arey/maven-config-github-cloudbees/issues/1#issuecomment-10508803.

jmilkiewicz commented 11 years ago

Hi

I just got info from cloudbees that my foss account has been set up. Nevertheless it is quite late and still need to pack myself so i will come back to the topic after my return (end of next week).

br Jakub

2012/11/19 Jakub Milkiewicz jmilkiewicz@softmil.pl

Hi

Antoine, thx again for your answers. As soon as my cloudbees foss account is set up (actually downgraded from basic to foss) i will proceed with configurations (or go on holidays, whichever comes first :) ).

br Jakub

2012/11/19 Antoine Rey notifications@github.com

Hope all goes well for settins your github/jenkins infrastructure. Mine is very simple: jenkins detects changes into my github repository then launches a mvn clean deploy. For releasing, I manually uses the maven release plugin. I know it exists this release plugin https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin but I never use it.

— Reply to this email directly or view it on GitHubhttps://github.com/arey/maven-config-github-cloudbees/issues/1#issuecomment-10508803.

arey commented 11 years ago

Hi Jakub, how are you and your Cloudbees FOSS account? Do you now have your personal software factory?

jmilkiewicz commented 11 years ago

Hi Antoine,

Sorry for the delay, but i changed my job a week ago so still learning and searching for my own place in new env.

Regarding my personal software factory: I did create a few github projects, like https://github.com/jmilkiewicz/validators, https://github.com/jmilkiewicz/dumbster or https://github.com/jmilkiewicz/simpleframework-utils. I followed Cloudbees instructions on how to trigger a new job to be run upon push to github for each of them. I am really glad that you share cloudbees compatible pom.xml and .settings on github. It really helped me and saved a lot of time. Regarding project's lifecycle: i do maven releases from my own PC and each time a new push is made to github, my projects are compiled, unit tested, and then deployed to snapshot repository so anyone can use them. I still would like to do mvn releases from cloudbees (it should be maven release in batch-mode), but just need to find some time to play with it.

Beside, for the projects, I defined GitHub commit hooks for, i have also set up buildhive https://buildhive.cloudbees.com/. One could think that using GitHub commit hooks on DEV@Cloud and buildhive is somewhat overlapping. This is not fully true since buildhive can run build both on github push and pull requests (DEV@Cloud provides validated merge plugin available only for enterprise subscribers). Nevertheless, buildhive lacks a few important features like static analysis or corbertura reports. So basically after buildhive job is run, the only output is job status: success or failure, no static analysis reports, no nice charts or other goodies. So basically, when i push a new commit to my github project, 2 independent jobs are run: on my dev@cloud anon buildhive.

I did write an email to Ryan Campbell (buildhive developer) with my feedback and i was told that it is possible to add buildhive functionality to my Dev@Cloud account if i upgrade to FOSS premium plan. On the other side they are thinking on improving buildhive reporting with my suggestions.

Have you somehow upgraded your github infrastructure from the last time ?

br Jakub

2012/12/7 Antoine Rey notifications@github.com

Hi Jakub, how are you and your Cloudbees FOSS account? Do you now have your personal software factory?

— Reply to this email directly or view it on GitHubhttps://github.com/arey/maven-config-github-cloudbees/issues/1#issuecomment-11145429.