Package Promotion
Package promotion functionality will be useful for release-tool automation of security releases. Some explanation of required fields and the workflow of the request can be found here: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/1788#note_21741576
This MR is based on https://gitlab.com/gitlab-org/packagecloud-ruby/merge_requests/2
Example how to use package promotion:
require 'packagecloud'
credentials = Packagecloud::Credentials.new('username', 'token')
connection = Packagecloud::Connection.new('https', 'packages.gitlab.com')
client = Packagecloud::Client.new(credentials, "packagecloud-ruby #{Packagecloud::VERSION}", connection)
client.create_repository('super-secret-repo', true) # true means private = true
# publish your package on your 'super-secret-repo' and when you are ready to release:
client.promote_package('super-secret-repo', 'ubuntu', 'xenial', 'gitlab-ce_8.15.5-ce.0_amd64.deb', 'super-public-repo')
Merge request reports
Activity
added 1 commit
- 5f97f0be - More specs refactor and added missing spec for listing existing packages
added 1 commit
- 7df77ba9 - Added CHANGELOG following http://keepachangelog.com/en/0.3.0/ guidelines
I'm breaking ruby
1.8.7
compatibility as we are usingURI.encode_www_form
. I've crafted a quick alternative for1.8.7
but I don't want to support it, so I will let it here for future reference:def encode_www_form(data={}) if URI.respond_to? :encode_www_form return URI.encode_www_form(data) end fields=[] data.each {|k,v| fields << "#{CGI.escape(k)}=#{CGI.escape(v)}" } fields.join('&') end
On the few scenarios I tried, it worked just fine, but this kind of standard probably have a lot of caveats I'm not aware of.
Edited by Gabriel Mazettoassigned to @marin
added feature label
added 2 commits
- de049552 - Add package promotion support
- df8c48dc - Added CHANGELOG following http://keepachangelog.com/en/0.3.0/ guidelines
- Resolved by Gabriel Mazetto
mentioned in commit 0d054f8a