Merge lp:~pfalcon/linaro-android-build-tools/getpass into lp:linaro-android-build-tools

Proposed by Paul Sokolovsky
Status: Merged
Approved by: Deepti B. Kalakeri
Approved revision: 480
Merged at revision: 476
Proposed branch: lp:~pfalcon/linaro-android-build-tools/getpass
Merge into: lp:linaro-android-build-tools
Diff against target: 0 lines
To merge this branch: bzr merge lp:~pfalcon/linaro-android-build-tools/getpass
Reviewer Review Type Date Requested Status
Stevan Radaković documentation Needs Fixing
Deepti B. Kalakeri (community) Needs Fixing
Review via email: mp+106628@code.launchpad.net

Description of the change

These are changes needed to run mangle-jobs script on ci.linaro.org comfortably.

Once this is merged, migration to add explicit build expiration to all jobs will be:

$ ./mangle-jobs --user=<Jenkins username> build-expiration-set.mangle >mangle.diff
Password: <Jenkins API key>

[review changes to be done in mangle.diff]

$ ./mangle-jobs --user=<Jenkins username> build-expiration-set.mangle --really
Password: <Jenkins API key>

See README file for complete info on mangle-jobs.

To post a comment you must log in.
Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :
Download full text (4.9 KiB)

On Mon, May 21, 2012 at 6:51 PM, Paul Sokolovsky <<email address hidden>
> wrote:

> You have been requested to review the proposed merge of
> lp:~pfalcon/linaro-android-build-tools/getpass into
> lp:linaro-android-build-tools.
>
> For more details, see:
>
> https://code.launchpad.net/~pfalcon/linaro-android-build-tools/getpass/+merge/106628<https://code.launchpad.net/%7Epfalcon/linaro-android-build-tools/getpass/+merge/106628>
>
> These are changes needed to run mangle-jobs script on ci.linaro.orgcomfortably.
>
> Once this is merged, migration to add explicit build expiration to all
> jobs will be:
>
> $ ./mangle-jobs --user=<Jenkins username> build-expiration-set.mangle
> >mangle.diff
> Password: <Jenkins API key>
>
> [review changes to be done in mangle.diff]
>
> $ ./mangle-jobs --user=<Jenkins username> build-expiration-set.mangle
> --really
> Password: <Jenkins API key>
>
>
> See README file for complete info on mangle-jobs.
>
>
> --
>
> https://code.launchpad.net/~pfalcon/linaro-android-build-tools/getpass/+merge/106628<https://code.launchpad.net/%7Epfalcon/linaro-android-build-tools/getpass/+merge/106628>
> You are requested to review the proposed merge of
> lp:~pfalcon/linaro-android-build-tools/getpass into
> lp:linaro-android-build-tools.
>
> === modified file 'utils/mangle-jobs/README'
> --- utils/mangle-jobs/README 2012-03-08 18:07:13 +0000
> +++ utils/mangle-jobs/README 2012-05-21 13:19:18 +0000
> @@ -53,10 +53,14 @@
> if needed.
>
> 5. You are ready to perform en-masse pre-production test now. You should
> have
> -Jenkins username with appropriate permissions and its password (stored in
> -a file) handy.
> +Jenkins username with appropriate permissions and its password or API key
> +(recommended) handy. The API key can found in Jenkins by clicking you
> username
> +in the top right corner, then Configure in menu. Password/API key will be
> +prompted on teh console. If you really need that, you can put the
> credential
> +in the file and refer to it with --passwd-file=<passwd_file> to avoid
> +interactive prompts.
>
> -$ ./mangle-jobs --user=<user> --passwd-file=<passwd_file>
> <your_script.mangle>
> +$ ./mangle-jobs --user=<user> <your_script.mangle>
>
>
I believe we need to run mangle-jobs from the host on which jenkins service
is hosted ?

> This will run your script repeatedly for each job store in Jenkins server
> and
> will show aggregated diff output. Review it carefully to watch for
> anomalities
> @@ -65,7 +69,7 @@
> 6. Once you're absolutely sure that the changes performed by your mangle
> script
> are correct, run it in the production update mode:
>
> -$ ./mangle-jobs --user=<user> --passwd-file=<passwd_file>
> <your_script.mangle> --really
> +$ ./mangle-jobs --user=<user> <your_script.mangle> --really
>
> Mangle script details
> ---------------------
>
> === modified file 'utils/mangle-jobs/mangle-jobs'
> --- utils/mangle-jobs/mangle-jobs 2012-04-26 11:21:06 +0000
> +++ utils/mangle-jobs/mangle-jobs 2012-05-21 13:19:18 +0000
> @@ -21,10 +21,13 @@
> from tempfile import NamedTemporaryFile
> import urllib2
> import optparse
> +import getpass
>
> from lxml.etree import fromstring, tostri...

Read more...

Revision history for this message
Deepti B. Kalakeri (deeptik) :
review: Needs Fixing
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

>> +JENKINS_SERVER = "http://localhost:9090/jenkins/"

> Setting the value of this using the command line parameter makes it more

Yes, that's something what I thought about later too. Will prepare further changes.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Ok, added --url= parameter. Consequently, for ci.linaro.org migration, following command should be used:

$ ./mangle-jobs --url=http://localhost:8080/jenkins/ --user=<Jenkins username> build-expiration-set.mangle >mangle.diff

And yes, the script is to be run directly on the Jenkins master host.

479. By Paul Sokolovsky

Allow to specify Jenkins base url on command line with --url= .

480. By Paul Sokolovsky

Make sure that base URL ends with slash.

Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

On Tue, May 22, 2012 at 3:42 PM, Paul Sokolovsky <<email address hidden>
> wrote:

> Ok, added --url= parameter. Consequently, for ci.linaro.org migration,
> following command should be used:
>
> $ ./mangle-jobs --url=http://localhost:8080/jenkins/ --user=<Jenkins
> username> build-expiration-set.mangle >mangle.diff
>
> And yes, the script is to be run directly on the Jenkins master host.
>
> --
>
> https://code.launchpad.net/~pfalcon/linaro-android-build-tools/getpass/+merge/106628<https://code.launchpad.net/%7Epfalcon/linaro-android-build-tools/getpass/+merge/106628>
> You are reviewing the proposed merge of
> lp:~pfalcon/linaro-android-build-tools/getpass into
> lp:linaro-android-build-tools.
>

Looks good. Just one thing which I forgot to mention previously, the
optparse <http://docs.python.org/library/optparse.html#module-optparse>module
is deprecated and will not be developed further, so should we use
the argparse instead ?

--
Thanks and Regards,
Deepti

Revision history for this message
Stevan Radaković (stevanr) wrote :

Shouldn't the README get updated with the new URL option as well?

review: Needs Fixing (documentation)
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

> is deprecated and will not be developed further, so should we use
the argparse instead ?

Well, this change is about adding features to support running on ci.linaro.org, not about randomly changing libraries used to parse options. If that's to be done, that should be separate changes. And yes, I shared IMHO about optparse vs argparse in recent maillist discussion - we better stay with well-known and widely used module in Python community (optparse).The fact that optparse is no longer developed is actually very good - there won't be any bugs or incompatible changes introduced, and argparse is by definition incompatible change not supported by many versions of Python.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

> Shouldn't the README get updated with the new URL option as well?

There's --help option, I added mentioning that to README. It makes no sense to duplicate content between --help and README - the more duplication, the more chance it will go out of data/sync. And we have lot missing READMEs at all, so better spend effort on them either.

481. By Paul Sokolovsky

Mention --help in README.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches