All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bird, Timothy" <Tim.Bird@sony.com>
To: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>,
	"fuego@lists.linuxfoundation.org"
	<fuego@lists.linuxfoundation.org>
Subject: Re: [Fuego] [PATCH 10/16] user_checks: add to commands so they execute	under jenkins
Date: Thu, 30 Mar 2017 22:49:23 +0000	[thread overview]
Message-ID: <ECADFF3FD767C149AD96A924E7EA6EAF104BE186@USCULXMSG01.am.sony.com> (raw)
In-Reply-To: <ed04887107c1637f2d63469465e148097de6c6a3.1490835200.git.daniel.sangorrin@toshiba.co.jp>



> -----Original Message-----
> From: Daniel Sangorrin on Wednesday, March 29, 2017 6:05 PM
>
> Instead of using sudo -u jenkins ftc xxx use the user_checks
> allows to run the command as jenkins even if the caller
> is running as root
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  engine/scripts/ftc | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/engine/scripts/ftc b/engine/scripts/ftc
> index eb1eb3e..e08c56a 100755
> --- a/engine/scripts/ftc
> +++ b/engine/scripts/ftc
> @@ -2769,6 +2769,7 @@ def main():
> 
>      if command=="add-jobs":
>          # adds Jenkins jobs
> +        user_check()
>          try:
>              do_add_jobs(conf, options)
>          except Exception as e:
> @@ -2776,6 +2777,7 @@ def main():
> 
>      if command=="rm-jobs":
>          # removes Jenkins jobs
> +        user_check()
>          try:
>              do_rm_jobs(conf, options)
>          except Exception as e:
> @@ -2783,6 +2785,7 @@ def main():
> 
>      if command=="add-nodes":
>          # adds Jenkins nodes
> +        user_check()
>          try:
>              do_add_nodes(conf, options)
>          except Exception as e:
> @@ -2790,6 +2793,7 @@ def main():
> 
>      if command=="rm-nodes":
>          # removes Jenkins nodes
> +        user_check()
>          try:
>              do_rm_nodes(conf, options)
>          except Exception as e:
> @@ -2801,10 +2805,12 @@ def main():
> 
>      if command=="list-nodes":
>          # shows jenkins nodes
> +        user_check()
>          do_list_nodes(conf)
> 
>      if command=="list-jobs":
>          # shows jenkins jobs
> +        user_check()
>          do_list_jobs(conf)
> 
>      if command=="list-plans":
> --
> 2.7.4

Looks good.  I'm still wondering why these need to be run as 'jenkins'.
I have run them as root without problems.  Is this a permission thing
with Jenkins security configured a certain way?

Acked-by: Tim Bird
 -- Tim


  reply	other threads:[~2017-03-30 22:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  1:04 [Fuego] fuego-core patches (migration to testspecs and more) Daniel Sangorrin
2017-03-30  1:04 ` [Fuego] [PATCH 01/16] indentation: fix indentation for dhrystone parser Daniel Sangorrin
2017-03-30  1:04   ` [Fuego] [PATCH 02/16] abort: fix the abort function Daniel Sangorrin
2017-03-30 20:26     ` Bird, Timothy
2017-03-30 20:29     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 03/16] shell e flag: remove any e flag from fuego Daniel Sangorrin
2017-03-30 20:40     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 04/16] parser: remove error message when no matches Daniel Sangorrin
2017-03-30 20:51     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 05/16] benchmark: use the same pattern as in functional Daniel Sangorrin
2017-03-30 20:54     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 06/16] board file: remove conf from the path to the board file Daniel Sangorrin
2017-03-30 21:24     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 07/16] batch: remove batch_testplan reference Daniel Sangorrin
2017-03-30 21:32     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 08/16] testplans: use testspecs instead of testplans internally Daniel Sangorrin
2017-03-30 21:43     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 09/16] distrib: DISTRIB must be defined in the board file Daniel Sangorrin
2017-03-30 22:46     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 10/16] user_checks: add to commands so they execute under jenkins Daniel Sangorrin
2017-03-30 22:49     ` Bird, Timothy [this message]
2017-03-30  1:04   ` [Fuego] [PATCH 11/16] ftc:rm-jobs: remove limitation of 4 words Daniel Sangorrin
2017-03-30 22:50     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 12/16] description setter: put log if the test fails Daniel Sangorrin
2017-03-30 23:04     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 13/16] ftc: remove testplans and use testspecs Daniel Sangorrin
2017-03-30 23:06     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 14/16] ftc test: remove distrib and update paths Daniel Sangorrin
2017-03-30 23:13     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 15/16] fail_check_cases should not abort the job Daniel Sangorrin
2017-03-30 23:16     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 16/16] a bit of cleaning and style fixes Daniel Sangorrin
2017-03-30 23:19     ` Bird, Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ECADFF3FD767C149AD96A924E7EA6EAF104BE186@USCULXMSG01.am.sony.com \
    --to=tim.bird@sony.com \
    --cc=daniel.sangorrin@toshiba.co.jp \
    --cc=fuego@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.