Automatic deploy to jenkins-ci.org repository

Bug #1182154 reported by Khai Do
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Released
Medium
Khai Do

Bug Description

Create jenkins job to automatically deploy jenkins plugins developed by openstack projects to the jenkins repository located at http://repo.jenkins-ci.org/public/

This will make it appear on the jenkins plugin page (i.e. http://localhost:8080/pluginManager/available)

The instructions are found here: https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Releasingtojenkinsci.org

Revision history for this message
Jeremy Stanley (fungi) wrote :

Note that we have an "openstackjenkins" role account at jenkins-ci.org for this purpose, and the credentials are available to puppet via the hiera variables jenkins_ci_org_user and jenkins_ci_org_password.

Khai Do (zaro0508)
Changed in openstack-ci:
assignee: nobody → Khai Do (zaro0508)
status: New → In Progress
Clark Boylan (cboylan)
Changed in openstack-ci:
importance: Undecided → Medium
Revision history for this message
Khai Do (zaro0508) wrote :

Looked into how to make this work with gerrit. The maven release plugin won't work with gerrit workflow so we have to come up with an alternative plan. My idea is to make the maven release workflow similar to the python release workflow so we can do the exact same thing for our maven as we do for python distuils.

My plan is to do the following :
1. Setup maven projects accept a passed in version string from the command line.
2. Pass in version info on every maven build that gets run by jenkins. The version info contains the version number and a git sha, so something like 'myplugin-1.0-a1f3bcd'
3. Upon a gerrit tag of the project we run a maven build and deploy so the artifact gets uploaded to repo.jenkins.org. Then increment the version number and commit pom.xml

To get this working I will need to modify project pom.xml, create a few helper scripts to manage version numbers, and create the build jobs in puppet.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/31839

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/31875

Revision history for this message
Khai Do (zaro0508) wrote :

One last step is to update all of the jenkins plugin projects to run release builds using this setup.

Changed in openstack-ci:
status: In Progress → Fix Committed
Khai Do (zaro0508)
Changed in openstack-ci:
status: Fix Committed → In Progress
Khai Do (zaro0508)
Changed in openstack-ci:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/32797

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/32817

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.openstack.org/31875
Committed: http://github.com/openstack-infra/config/commit/a5d1508fd8a09c1d5660cf6c33f296aa3b263b46
Submitter: Jenkins
Branch: master

commit a5d1508fd8a09c1d5660cf6c33f296aa3b263b46
Author: zaro0508 <email address hidden>
Date: Wed Jun 12 14:26:41 2013 -0700

    make maven versioning and deployment workflow similiar to python

    This commit fixes bug 1182154

    The maven workflow for versioning and deployment is at odds with how
    we like to do it. For versioning, our convention is to get info
    from SCM to set the project build versions. For deployments
    to remote repositories we prefer to use curl instead of mvn deploy
    due to maven security vulnerabilities. Our python builds
    have already been setup to set package versions from SCM and
    deploy to pypi using curl so this commit is to make
    maven versioning and deployments similiar our python
    versioning and deployment workflow.

    This commit does the following:

    Setup a project version string as an environement variable
    so we can pass it to maven builds. The version string is
    retrieved from information in git. This makes the build versioning
    workflow similar to how we build python packages.

      This setup expects a variable called '$project-version' in
      the root 'version' element (i.e. <version>${project-version}</version>)
      of the maven project's pom.xml file.

      For general (throw away CI) builds we do the following:
        1. generate a package 'myplugin.hpi' with version '1.3.0.4.a0bc21f'
           in the MANIFEST.MF file. The '4' is the number of commits since
           last tag.
        2. publish 'myplugin-1.3.0.4.a0bc21f.hpi' to tarballs.o.o

      For release builds we do the following:
        1. generate a package 'myplugin.hpi' with version '1.3.1'
         in the MANIFEST.MF file.
        2. publish 'myplugin-1.3.1.hpi' to tarballs.o.o
        3. publish 'myplugin-1.3.1.hpi' to repo.jenkins-ci.org

    Passes the jenkins credentials from hiera to the pypi slave so
    we can use it to deploy released plugins to repo.jenkins-ci.org

    Creates a generic jenkinsci-upload job that will deploy
    released jenkins plugin artifacts to a remote repository with
    user credentials from hiera. It will use the same curl deployment
    method as the pypi-upload job.

    Change-Id: If1306523a28da94ee970d96b7a788ca116348de7

Changed in openstack-ci:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.