Merge lp://qastaging/~pfalcon/linaro-android-build-tools/cmdline-client into lp://qastaging/linaro-android-build-tools

Proposed by Paul Sokolovsky
Status: Merged
Merged at revision: 671
Proposed branch: lp://qastaging/~pfalcon/linaro-android-build-tools/cmdline-client
Merge into: lp://qastaging/linaro-android-build-tools
Diff against target: 271 lines (+261/-0)
2 files modified
utils/cmdline-client/README (+62/-0)
utils/cmdline-client/android-build-client (+199/-0)
To merge this branch: bzr merge lp://qastaging/~pfalcon/linaro-android-build-tools/cmdline-client
Reviewer Review Type Date Requested Status
Paul Sokolovsky Approve
Milo Casagrande (community) Needs Fixing
Review via email: mp+182969@code.qastaging.launchpad.net

Description of the change

android-build command line client. This implements https://cards.linaro.org/browse/LAVA-540 . See README for usage instructions - worth given a try to it, if possible.

To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :
Download full text (4.5 KiB)

Hey Paul,

following my comments, there's some typos that need fixing and a couple of suggestion/thoughts.
Marking as fix needed, but once you cleaned the typos it should be ready to go.

+Basic android-build.linaro.org command-line client
+==================================================
+
+This tool provides proof-of-concept command-line client for Linaro Android
+Build Jenkins master (android-build.linaro.org), as an alternative for
+existing Web UI interface. One particular feature the command-line client
+has and Web UI lacks is support for creating completely private builds (such
+builds are not availabel via Web UI at all). At the same time, this tool is
+so far in the proof of concept stage and provides only basic job management
+actions (namely, create a job and schedule its build). If you find this tools

s/this tools/this tool

+useful, please share you comments and suggestion using this bugtracker:

s/you comments/your comments

+
+https://bugs.launchpad.net/linaro-android-infrastructure
+
+to help its improvement and evolution.
+
+
+Quick start
+-----------
+
+1. You should have access to Jenkins at:
+
+http://android-build.linaro.org/jenkins/
+
+(Generally available for Linaro Android team members).
+
+2. Download android-build-client tool. As it is written to depend only

s/to depend/it depends

+on Python standard library, an easy way to get it is to download seperate
+file via Launchpad BZR viewer:
+
+wget <fill in link once branch lands>
+chmod +x android-build-client
+
+3. Look up your Jenkins API token by visiting
+https://android-build.linaro.org/jenkins/me/configure and clicking
+"Show API Token..." button.
+
+4. Run:
+
+./android-build-client authorize
+
+Enter you Jenkins username and API token. Note that this will cache these

s/you Jenkins/your Jenkins

+credentials in your home dir, so use this only on your personal well-protected
+workstation. The alternative is to use --user switch and input API key
+interactively.
+
+5. To create a new job, prepare an Android job config (see
+https://wiki.linaro.org/Platform/Android/LinaroAndroidBuildService for more
+info) in a file. Run:
+
+./android-build-client create <job_name> <job_config_file>
+
+Note that job name should conform to Android Build Service naming
+converntions, see documentation link above for more info. To create a job
+private for particular group, pass --private=<group> switch to create command.

s/job private/private job

+
+6. To schedule a build, run:
+
+./android-build-client build <job_name>
+
+
+Run ./android-build-client --help to see all options.

I tried it, but it does not show me all the available "commands", just the normale options.

It's early in the development stage, but it might be worth to take a look at how lava-tool is handling the commands definition.

There's a lot more code to write to achieve that, but it is a well structured pattern. Just food for thoughts, and something to keep in mind.

=== added file 'utils/cmdline-client/android-build-client'
--- utils/cmdline-client/android-build-client 1970-01-01 00:00:00 +0000
+++ utils/cmdline-client/android-build-client 2013-08-29 17:39:17 +0000
@@ -0,0 +1,199 @@
+#!/usr/bin/env py...

Read more...

review: Needs Fixing
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Download full text (6.5 KiB)

Hello Milo,

Thanks for comments!

On Fri, 30 Aug 2013 14:31:38 -0000
Milo Casagrande <email address hidden> wrote:

> Review: Needs Fixing
>
> Hey Paul,
>
> following my comments, there's some typos that need fixing and a
> couple of suggestion/thoughts. Marking as fix needed, but once you
> cleaned the typos it should be ready to go.
>
> +Basic android-build.linaro.org command-line client
> +==================================================
> +
> +This tool provides proof-of-concept command-line client for Linaro
> Android +Build Jenkins master (android-build.linaro.org), as an
> alternative for +existing Web UI interface. One particular feature
> the command-line client +has and Web UI lacks is support for creating
> completely private builds (such +builds are not availabel via Web UI
> at all). At the same time, this tool is +so far in the proof of
> concept stage and provides only basic job management +actions
> (namely, create a job and schedule its build). If you find this tools
>
> s/this tools/this tool

fixed

>
> +useful, please share you comments and suggestion using this
> bugtracker:
>
> s/you comments/your comments

fixed

>
> +
> +https://bugs.launchpad.net/linaro-android-infrastructure
> +
> +to help its improvement and evolution.
> +
> +
> +Quick start
> +-----------
> +
> +1. You should have access to Jenkins at:
> +
> +http://android-build.linaro.org/jenkins/
> +
> +(Generally available for Linaro Android team members).
> +
> +2. Download android-build-client tool. As it is written to depend
> only
>
> s/to depend/it depends

You probably mean replacing the whole starting phrase? Nope, that
loses meaning. It not just randomly depends only on stdlib, it's
purposedly written to ;-).

>
> +on Python standard library, an easy way to get it is to download
> seperate +file via Launchpad BZR viewer:
> +
> +wget <fill in link once branch lands>
> +chmod +x android-build-client
> +
> +3. Look up your Jenkins API token by visiting
> +https://android-build.linaro.org/jenkins/me/configure and clicking
> +"Show API Token..." button.
> +
> +4. Run:
> +
> +./android-build-client authorize
> +
> +Enter you Jenkins username and API token. Note that this will cache
> these
>
> s/you Jenkins/your Jenkins

fixed

>
> +credentials in your home dir, so use this only on your personal
> well-protected +workstation. The alternative is to use --user switch
> and input API key +interactively.
> +
> +5. To create a new job, prepare an Android job config (see
> +https://wiki.linaro.org/Platform/Android/LinaroAndroidBuildService
> for more +info) in a file. Run:
> +
> +./android-build-client create <job_name> <job_config_file>
> +
> +Note that job name should conform to Android Build Service naming
> +converntions, see documentation link above for more info. To create
> a job +private for particular group, pass --private=<group> switch to
> create command.
>
> s/job private/private job

Nope, again changes meaning ;-). "job private for particular group" ==
"job which is private for particular group"

>
> +
> +6. To schedule a build, run:
> +
> +./android-build-client build <job_name>
> +
> +
> +Run ./android-build-client --help to s...

Read more...

663. By Paul Sokolovsky

Fixed typos, thanks Milo for review.

664. By Paul Sokolovsky

Make --help show which commands are available.

665. By Paul Sokolovsky

Print error messages to stderr.

666. By Paul Sokolovsky

Fix typo.

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

<pfalcon> Gwaihir: thanks for review on https://code.launchpad.net/~pfalcon/linaro-android-build-tools/cmdline-client/+merge/182969 . I acted on most comments. The only serious one IMHO is licensing, but as I replied, it's the license of linaro-android-build-tools ;-I. So, unless you strongly suggest to use diff. lic. just for that script, it could be merged
<Gwaihir> pfalcon, sure, lets not block on that, it is an open source license after all, non GPL compatible, but OSI approved... will raise this with Alan and see if we need to use just one license for all our projects or if it is fine to use others as long as they are open source

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches