You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yetus.apache.org by Amila Wijayarathna <am...@gmail.com> on 2016/06/01 09:49:16 UTC

Re: Install Apache Yetus test-patch

Hi Chris,

Thank you for replying. I extracted that file earlier and I went
through http://yetus.apache.org/documentation/0.2.1/precommit-basic/
  <http://yetus.apache.org/documentation/0.2.1/precommit-basic/> and
installed base requirements also. Now i need to know how to use Apache
Yetus test-patch for the pre-commit checks.
Any idea about this is thoroughly appreciated.

Thank you!


On Wed, Jun 1, 2016 at 1:40 AM, Chris Nauroth <cn...@hortonworks.com>
wrote:

> Hello Amila,
>
> After downloading the binary tarball, you can extract it by running "tar
> xf yetus-0.3.0-bin.tar.gz".  After that, you'll have a sub-directory named
> "yetus-0.3.0".  Then, within that directory, there will be a "bin"
> sub-directory containing the main entry points for each tool that ships in
> Yetus, a "lib" directory for supporting code, and a "docs" directory
> containing the current version of the documentation.
>
> I hope this helps.
>
> --Chris Nauroth
>
>
>
>
> On 5/31/16, 10:35 AM, "Amila Wijayarathna" <am...@gmail.com>
> wrote:
>
> >Hi all,
> >
> >I'm trying to install yetus  test-patch in my ubuntu laptop. I downloaded
> >yetus-0.3.0-bin.tar.gz from
> >
> https://www.apache.org/dyn/closer.lua?path=/yetus/0.3.0/yetus-0.3.0-bin.ta
> >r.gz.
> >And I'm not sure how to proceed further.
> >
> >Can some one please guide me on what is the procedure to follow when doing
> >this?
> >
> >Thank you very much!
> >
> >--
> >
> >*Amila Wijayarathna*
> >Undergraduate,
> >Faculty of Information Technology,
> >University of Moratuwa,
> >Sri Lanka.
>
>


-- 

*Amila Wijayarathna*
Undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

Re: Install Apache Yetus test-patch

Posted by Allen Wittenauer <aw...@apache.org>.
> On Jun 8, 2016, at 2:47 PM, Amila Wijayarathna <am...@gmail.com> wrote:
> 
> Hi Allen,
> 
> As you mentioned, i did extract yetus in workspace and select shell
> execute  option.Then it needs to enter a command. But I have bit of
> confusion about that because the command I used in terminal is [1] and its
> patch url is a variable.


	Right.  Jenkins supports parameterized builds.  One of the parameters should be the URL or whatever for input.

> But I think the shell command must be a constant
> one.
> Any idea about this is thoroughly appreciated.
> 
> [1] ./test-patch --basedir=/home/amila/incubator-rya
> --patch-dir=/home/amila/ --plugins=all --project=PreCommit-Rya-Build
> https://github.com/apache/incubator-rya/pull/39.patch --jenkins

	If this is for an ASF project, I *highly highly highly* recommend looking at the other projects already using Apache Yetus (Accumulo, Hadoop, or HBase) for how they set their builds up.

Re: Install Apache Yetus test-patch

Posted by Amila Wijayarathna <am...@gmail.com>.
Hi Allen,

As you mentioned, i did extract yetus in workspace and select shell
execute  option.Then it needs to enter a command. But I have bit of
confusion about that because the command I used in terminal is [1] and its
patch url is a variable. But I think the shell command must be a constant
one.
Any idea about this is thoroughly appreciated.

[1] ./test-patch --basedir=/home/amila/incubator-rya
--patch-dir=/home/amila/ --plugins=all --project=PreCommit-Rya-Build
https://github.com/apache/incubator-rya/pull/39.patch --jenkins

Thank you!

On Mon, Jun 6, 2016 at 10:45 PM, Allen Wittenauer <aw...@apache.org> wrote:

>
> > On Jun 6, 2016, at 8:19 AM, Amila Wijayarathna <am...@gmail.com>
> wrote:
> >
> > Hi Allen,
> > yes I created a new project within the jenkins, but i couldn't find how
> to
> > configure jenkins to call yates test-patch within jenkins. I tried to
> find
> > how to configure it but I couldn't find any.
> > Any idea about this is thoroughly appreciated.
>
>         For the Build, use the Execute Shell option.  Then you just need
> to download and extract yetus into your workspace.




-- 

*Amila Wijayarathna*
Undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

Re: Install Apache Yetus test-patch

Posted by Allen Wittenauer <aw...@apache.org>.
> On Jun 6, 2016, at 8:19 AM, Amila Wijayarathna <am...@gmail.com> wrote:
> 
> Hi Allen,
> yes I created a new project within the jenkins, but i couldn't find how to
> configure jenkins to call yates test-patch within jenkins. I tried to find
> how to configure it but I couldn't find any.
> Any idea about this is thoroughly appreciated.

	For the Build, use the Execute Shell option.  Then you just need to download and extract yetus into your workspace.

Re: Install Apache Yetus test-patch

Posted by Amila Wijayarathna <am...@gmail.com>.
Hi Allen,
yes I created a new project within the jenkins, but i couldn't find how to
configure jenkins to call yates test-patch within jenkins. I tried to find
how to configure it but I couldn't find any.
Any idea about this is thoroughly appreciated.

Thank you!

On Sun, Jun 5, 2016 at 11:21 PM, Allen Wittenauer <aw...@apache.org> wrote:

>
> > On Jun 2, 2016, at 12:49 PM, Amila Wijayarathna <
> amwijayarathna@gmail.com> wrote:
> >
> > Hi Allen,
> >
> > Thank you for replying. It was so helpful.
> > I made a local patch file and I could successfully ran Yetus with it.
> After
> > that I successfully  ran yetus with complete url of PR patches as a patch
> >
> > Now i need to integrate jenkins with yetus. As I have locally installed
> > jenkins, I ran the test patch with --jenkins command and got this result
> > [1]. But in jenkins server there is no any changes made.
>
>         Did you create a new project from within Jenkins and then call
> test-patch from within that project?
>
>
>


-- 

*Amila Wijayarathna*
Undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

Re: Install Apache Yetus test-patch

Posted by Allen Wittenauer <aw...@apache.org>.
> On Jun 2, 2016, at 12:49 PM, Amila Wijayarathna <am...@gmail.com> wrote:
> 
> Hi Allen,
> 
> Thank you for replying. It was so helpful.
> I made a local patch file and I could successfully ran Yetus with it. After
> that I successfully  ran yetus with complete url of PR patches as a patch
> 
> Now i need to integrate jenkins with yetus. As I have locally installed
> jenkins, I ran the test patch with --jenkins command and got this result
> [1]. But in jenkins server there is no any changes made.

	Did you create a new project from within Jenkins and then call test-patch from within that project?



Re: Install Apache Yetus test-patch

Posted by Amila Wijayarathna <am...@gmail.com>.
Hi Allen,

Thank you for replying. It was so helpful.
I made a local patch file and I could successfully ran Yetus with it. After
that I successfully  ran yetus with complete url of PR patches as a patch

Now i need to integrate jenkins with yetus. As I have locally installed
jenkins, I ran the test patch with --jenkins command and got this result
[1]. But in jenkins server there is no any changes made.
Can i know what are the configuration that need to change when integrate
yetus to locally installed jenkins.
I searched about this but unfortunately i couldn't find any.

[1]
https://gist.github.com/AmilaWijayarathna/00ca81c7090db79225efbd3edae31e37

Thank you!


On Wed, Jun 1, 2016 at 9:29 PM, Allen Wittenauer <aw...@apache.org> wrote:

>
> > On Jun 1, 2016, at 2:49 AM, Amila Wijayarathna <am...@gmail.com>
> wrote:
> >
> > Hi Chris,
> >
> > Thank you for replying. I extracted that file earlier and I went
> > through http://yetus.apache.org/documentation/0.2.1/precommit-basic/
> >  <http://yetus.apache.org/documentation/0.2.1/precommit-basic/> and
> > installed base requirements also. Now i need to know how to use Apache
> > Yetus test-patch for the pre-commit checks.
> > Any idea about this is thoroughly appreciated.
>
>
>         At this point, you should try running test-patch manually against
> your source tree by putting together the options that are covered in the
> basic guide.  For example:
>
> [*NOTE* This is the destructive form which assumes the source repo is safe
> to modify! Do not use this for your "working" repo!]
>
>         YETUS_HOME/bin/test-patch \
>                 --basedir=repo \
>                 --patch-dir=out \
>                 --plugins=all \
>                 --project=myproject \
>                 --resetrepo \
>                 (whatever else is required) \
>                 patchfile
>
>         When it comes time to run this under Jenkins, you should be able
> to combine these options:
>
> * command line arguments you when run manually
> * --jenkins
> * any other additional options you want to run specifically for automation
> (I recommend running test-patch --plugins=all --help to see everything
> since I don't think all of the options are fully documented.  e.g.,
> --console-urls is handy under Jenkins)
>
> ... to create your parameterized Jenkins build job. The key parameter
> being how test-patch gets the patch file information; that's obviously
> going to be dependent upon your issue tracker or whatever else you'd like
> to use to trigger test-patch.
>
> [... and this goes back to something that Aldrin said in an earlier
> thread:  we definitely need a quickstart for the various Yetus components.
> I've been thinking a lot about that over the past day or so, esp while
> hacking on the qbt jobs.]




-- 

*Amila Wijayarathna*
Undergraduate,
Faculty of Information Technology,
University of Moratuwa,
Sri Lanka.

Re: Install Apache Yetus test-patch

Posted by Allen Wittenauer <aw...@apache.org>.
> On Jun 1, 2016, at 2:49 AM, Amila Wijayarathna <am...@gmail.com> wrote:
> 
> Hi Chris,
> 
> Thank you for replying. I extracted that file earlier and I went
> through http://yetus.apache.org/documentation/0.2.1/precommit-basic/
>  <http://yetus.apache.org/documentation/0.2.1/precommit-basic/> and
> installed base requirements also. Now i need to know how to use Apache
> Yetus test-patch for the pre-commit checks.
> Any idea about this is thoroughly appreciated.


	At this point, you should try running test-patch manually against your source tree by putting together the options that are covered in the basic guide.  For example:

[*NOTE* This is the destructive form which assumes the source repo is safe to modify! Do not use this for your "working" repo!]

	YETUS_HOME/bin/test-patch \
		--basedir=repo \
		--patch-dir=out \
		--plugins=all \
		--project=myproject \
                --resetrepo \
		(whatever else is required) \
		patchfile

	When it comes time to run this under Jenkins, you should be able to combine these options:

* command line arguments you when run manually
* --jenkins
* any other additional options you want to run specifically for automation (I recommend running test-patch --plugins=all --help to see everything since I don't think all of the options are fully documented.  e.g., --console-urls is handy under Jenkins)

... to create your parameterized Jenkins build job. The key parameter being how test-patch gets the patch file information; that's obviously going to be dependent upon your issue tracker or whatever else you'd like to use to trigger test-patch.

[... and this goes back to something that Aldrin said in an earlier thread:  we definitely need a quickstart for the various Yetus components.  I've been thinking a lot about that over the past day or so, esp while hacking on the qbt jobs.]