Skip to content

Latest commit

 

History

History
56 lines (50 loc) · 2.57 KB

README.adoc

File metadata and controls

56 lines (50 loc) · 2.57 KB

Continuous Delivery

Steps to create a job in Jenkins

  1. Login in EPG Jenkins and create a personal folder.

  2. Access that new created folder and create a New Item > Freestyle project, and set a name for the job.

  3. Configure the job:

    1. Check General > Github project and set your project url.

    2. Check Source Code Management > Git:

      1. Set your repository URL.

      2. Add contint/ (GITHUB only user) credentials.

      3. Set the branch to track (i.e., to track master it would be */master).

      4. Add githubweb repository browser and project URL.

    3. Check Build Triggers > GitHub hook trigger for GITScm polling.

    4. Check Build > Execute shell and add a simple command, for example: echo "Hello world!.

    5. Save changes.

  4. Configure your repository:

    1. Go to Settings > Webhooks and click on Add webhook:

      1. Add Jenkins Payload URL: http://dcip.tid.es/github-webhook/

      2. Click on Add webhook.

And that’s it!

Integrating pull request GitHub plugin (GHPR)

  1. Login in EPG Jenkins and create a personal folder.

  2. Access that new created folder and create a New Item > Freestyle project, and set a name for the job.

  3. Configure the job:

    1. Check General > Github project and set your project url.

    2. Check Source Code Management > Git:

      1. Set your repository URL.

      2. Add contint/ (GITHUB only user) credentials.

      3. Click on Advanced:

        1. Set repository name, (i.e., origin)

        2. Set pull requests refspec: +refs/pull/:refs/remotes/origin/pr/ (change origin by chosen repository name)

      4. Set the branch to track: ${sha1}.

      5. Add githubweb repository browser and project URL.

    3. Check Build Triggers > GitHub Pull Request Builder:

      1. Set GitHub API credentials: https://api.github.com : contint Token

      2. Add Admin list repository users (GitHub users, not Telefónica users!).

      3. Check Use github hooks for build triggering.

      4. If desired, add a Trigger phrase (i.e., Rebuild this project, oh lord master, or :hammer:).

      5. Add White list repository users (users for which this trigger will be run).

    4. Check Build > Execute shell and add a simple command, for example: echo "Hello world!.

    5. Save changes.

  4. Configure your repository:

    1. Go to Settings > Webhooks and click on Add webhook:

      1. Add Jenkins Payload URL: http://dcip.tid.es/ghprbhook/

      2. Click on Let me select individual events:

        1. Check Issue comments (for phrase triggering)

        2. Check Pull requests (for proper pull request triggering)

      3. Click on Add webhook.

And we are done!