Re: Jenkins plugin to upload charm to store?

2016-11-03 Thread David Britton
Looks cool Merlijn --

I may use this in the near future as I have some similar scripts I have
cobbled together as well. :)

On Thu, Nov 3, 2016 at 11:46 AM, Merlijn Sebrechts <
merlijn.sebrec...@gmail.com> wrote:

> Hi all
>
>
> I wrote my own python script to test and publish bundles and their charms.
> It's very specialized for our use-case so I doubt it's useful for you guys
> although I like the idea of a reference script. I'd like to follow the
> development of that script to make sure it also fits our use-case.
>
>
> *For reference, our script does the following:*
>
>1. *The script receives a number of bundles as commandline arguments.*
>2. *It checks which of our Charms are in the bundles.*
>3. *It pushes those charms to unpublished channel*
>4. *It rewrites the bundles so they point to the unpublished charms*
>5. *It spins up a Juju client in an lxc container and run cwr inside
>that container to test the bundles*
>6. *if tests succeed, it publishes both the bundles and our charms.*
>
>
> *Script source
> (agplv3): 
> https://github.com/IBCNServices/tengu-charms/blob/master/cihelpers.py
> *
>
>
>
> Kind regards
> Merlijn
>
> 2016-11-02 13:42 GMT+01:00 Stuart Bishop :
>
>>
>>
>> On 2 November 2016 at 18:24, Konstantinos Tsakalozos <
>> kos.tsakalo...@canonical.com> wrote:
>>
>>> Hi Tom,
>>>
>>> Yes, I have my own script right now. It is not elegant.
>>>
>>> Instead of each one of us maintaining their own scripts, we could have a
>>> single point of reference. In the Jenkins world I thought that would be a
>>> plugin, but a script would also work. Is there anyone open sourcing his CI
>>> <--> juju integration scripts?
>>>
>>>
>> It could be much, much more elegant. I've got open issues on getting
>> 'charm push' to report the revision better (so you can publish or tag), or
>> even having 'charm push --channel' do what you want. I personally would
>> rather see this improved so it helps everyone, to the point you don't need
>> a Jenkins plugin.
>>
>> An automated system needs to deal with the auth problem, which is
>> unfortunate (someone typing 'charm login' and entering their SSO password
>> and a token on a possibly untrusted system, or manufacturing an auth token
>> and installing it somehow). Snappy has this sorted better, with Launchpad
>> able to build snaps from a branch and upload them to the snap store on your
>> behalf.
>>
>>
>> --
>> Stuart Bishop 
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/juju
>>
>>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>


-- 
David Britton 
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Jenkins plugin to upload charm to store?

2016-11-03 Thread Merlijn Sebrechts
Hi all


I wrote my own python script to test and publish bundles and their charms.
It's very specialized for our use-case so I doubt it's useful for you guys
although I like the idea of a reference script. I'd like to follow the
development of that script to make sure it also fits our use-case.


*For reference, our script does the following:*

   1. *The script receives a number of bundles as commandline arguments.*
   2. *It checks which of our Charms are in the bundles.*
   3. *It pushes those charms to unpublished channel*
   4. *It rewrites the bundles so they point to the unpublished charms*
   5. *It spins up a Juju client in an lxc container and run cwr inside
   that container to test the bundles*
   6. *if tests succeed, it publishes both the bundles and our charms.*


*Script source
(agplv3): https://github.com/IBCNServices/tengu-charms/blob/master/cihelpers.py
*



Kind regards
Merlijn

2016-11-02 13:42 GMT+01:00 Stuart Bishop :

>
>
> On 2 November 2016 at 18:24, Konstantinos Tsakalozos <
> kos.tsakalo...@canonical.com> wrote:
>
>> Hi Tom,
>>
>> Yes, I have my own script right now. It is not elegant.
>>
>> Instead of each one of us maintaining their own scripts, we could have a
>> single point of reference. In the Jenkins world I thought that would be a
>> plugin, but a script would also work. Is there anyone open sourcing his CI
>> <--> juju integration scripts?
>>
>>
> It could be much, much more elegant. I've got open issues on getting
> 'charm push' to report the revision better (so you can publish or tag), or
> even having 'charm push --channel' do what you want. I personally would
> rather see this improved so it helps everyone, to the point you don't need
> a Jenkins plugin.
>
> An automated system needs to deal with the auth problem, which is
> unfortunate (someone typing 'charm login' and entering their SSO password
> and a token on a possibly untrusted system, or manufacturing an auth token
> and installing it somehow). Snappy has this sorted better, with Launchpad
> able to build snaps from a branch and upload them to the snap store on your
> behalf.
>
>
> --
> Stuart Bishop 
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Jenkins plugin to upload charm to store?

2016-11-02 Thread Stuart Bishop
On 2 November 2016 at 18:24, Konstantinos Tsakalozos <
kos.tsakalo...@canonical.com> wrote:

> Hi Tom,
>
> Yes, I have my own script right now. It is not elegant.
>
> Instead of each one of us maintaining their own scripts, we could have a
> single point of reference. In the Jenkins world I thought that would be a
> plugin, but a script would also work. Is there anyone open sourcing his CI
> <--> juju integration scripts?
>
>
It could be much, much more elegant. I've got open issues on getting 'charm
push' to report the revision better (so you can publish or tag), or even
having 'charm push --channel' do what you want. I personally would rather
see this improved so it helps everyone, to the point you don't need a
Jenkins plugin.

An automated system needs to deal with the auth problem, which is
unfortunate (someone typing 'charm login' and entering their SSO password
and a token on a possibly untrusted system, or manufacturing an auth token
and installing it somehow). Snappy has this sorted better, with Launchpad
able to build snaps from a branch and upload them to the snap store on your
behalf.


-- 
Stuart Bishop 
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Jenkins plugin to upload charm to store?

2016-11-02 Thread Tom Barber
You're more organised than me, I just run it all manually currently ;)

On Wed, Nov 2, 2016 at 11:24 AM, Konstantinos Tsakalozos <
kos.tsakalo...@canonical.com> wrote:

> Hi Tom,
>
> Yes, I have my own script right now. It is not elegant.
>
> Instead of each one of us maintaining their own scripts, we could have a
> single point of reference. In the Jenkins world I thought that would be a
> plugin, but a script would also work. Is there anyone open sourcing his CI
> <--> juju integration scripts?
>
> Thanks,
> Konstantinos
>
>
>
> On Wed, Nov 2, 2016 at 1:12 PM, Tom Barber 
> wrote:
>
>> I'm pretty sure you can write that in 4 lines of bash at the end of the
>> build/test process! ;)
>>
>> Sure you could write a plugin, but is it worth the effort I guess?
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 2 November 2016 at 11:01, Konstantinos Tsakalozos <
>> kos.tsakalo...@canonical.com> wrote:
>>
>>> Hi everyone,
>>>
>>> After a successful build and (bundle)test of a charm I would like the
>>> output charm to be automatically uploaded to the store (edge channel for
>>> now). Is there a Jenkins plugin to ease the interaction with the Juju store
>>> (login/push/grant/release)?
>>>
>>> Thanks,
>>> Konstantinos
>>>
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/juju
>>>
>>>
>>
>


-- 
Tom Barber
CTO Spicule LTD
t...@spicule.co.uk

http://spicule.co.uk

GB: +44(0)5603641316
US: +18448141689
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Jenkins plugin to upload charm to store?

2016-11-02 Thread Konstantinos Tsakalozos
Hi Tom,

Yes, I have my own script right now. It is not elegant.

Instead of each one of us maintaining their own scripts, we could have a
single point of reference. In the Jenkins world I thought that would be a
plugin, but a script would also work. Is there anyone open sourcing his CI
<--> juju integration scripts?

Thanks,
Konstantinos



On Wed, Nov 2, 2016 at 1:12 PM, Tom Barber  wrote:

> I'm pretty sure you can write that in 4 lines of bash at the end of the
> build/test process! ;)
>
> Sure you could write a plugin, but is it worth the effort I guess?
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> On 2 November 2016 at 11:01, Konstantinos Tsakalozos <
> kos.tsakalo...@canonical.com> wrote:
>
>> Hi everyone,
>>
>> After a successful build and (bundle)test of a charm I would like the
>> output charm to be automatically uploaded to the store (edge channel for
>> now). Is there a Jenkins plugin to ease the interaction with the Juju store
>> (login/push/grant/release)?
>>
>> Thanks,
>> Konstantinos
>>
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/juju
>>
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Jenkins plugin to upload charm to store?

2016-11-02 Thread Tom Barber
I'm pretty sure you can write that in 4 lines of bash at the end of the
build/test process! ;)

Sure you could write a plugin, but is it worth the effort I guess?

Tom

--

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316

(Thanks to the Saiku community we reached our Kickstart

goal, but you can always help by sponsoring the project
)

On 2 November 2016 at 11:01, Konstantinos Tsakalozos <
kos.tsakalo...@canonical.com> wrote:

> Hi everyone,
>
> After a successful build and (bundle)test of a charm I would like the
> output charm to be automatically uploaded to the store (edge channel for
> now). Is there a Jenkins plugin to ease the interaction with the Juju store
> (login/push/grant/release)?
>
> Thanks,
> Konstantinos
>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Jenkins plugin to upload charm to store?

2016-11-02 Thread Konstantinos Tsakalozos
Hi everyone,

After a successful build and (bundle)test of a charm I would like the
output charm to be automatically uploaded to the store (edge channel for
now). Is there a Jenkins plugin to ease the interaction with the Juju store
(login/push/grant/release)?

Thanks,
Konstantinos
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju