Upload packaging diffs to swift

Bug #1539212 reported by Robert Bruce Park
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CI Train [cu2d]
Fix Released
Critical
Robert Bruce Park

Bug Description

So I've recently upgraded the citrain charm to supply the openstack credentials into the train instance, which means it's now possible to upload diffs into swift, which means we'll finally be rid of the last bit of data stored in the jenkins instance (this is a necessary prerequisite for getting rid of jenkins).

The credentials are stored here:

/var/lib/jenkins/os.auth.url
/var/lib/jenkins/os.password
/var/lib/jenkins/os.region.name
/var/lib/jenkins/os.tenant.name
/var/lib/jenkins/os.username

You'll need to author a script that reads those into environment variables (the environment variable names can be derived by uppercasing and s/./_/g the filenames), and then using python-swiftclient to upload the diffs immediately after generation.

The swift container name should be something like request-NNN/source_package_name.diff I think (might need to iterate on this)

Revision history for this message
Robert Bruce Park (robru) wrote :

Considering that this will require a lot of schlepping around of files and environment variables, I feel like a shell script is best suited to this purpose.

It'd start by reading the files like this:

export OS_AUTH_URL=$(cat ~/os.auth.url)

And then iterate over commandline args and upload to swift like this:

swift upload $SILONAME $filename

($SILONAME is already defined by the train so you'd just get that for free)

And then you'd want to call that script after the diffs get generated, from here:

http://bazaar.launchpad.net/+branch/cupstream2distro/view/head:/cupstream2distro/packagemanager.py#L221

(bonus points if you can remove that pylint disable ;-)

Changed in cupstream2distro:
importance: Undecided → Critical
Changed in cupstream2distro:
assignee: nobody → Robert Bruce Park (robru)
status: New → In Progress
Changed in cupstream2distro:
status: In Progress → 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.