Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. install plugin

    1. Log into builder.openwsn.org

    2. Go to “Manage Jenkins → Manage Plugins”, under Available tab, search for ”GitHub Branch Source”, mark the checkbox of the plugin

    3. search for ”SCM Filter Branch PR” and mark the checkbox of the plugin

    4. click “Install without restart” to install

    5. Go to builder.openwsn.org/restart and click “Yes” to restart Jenkins

  2. create new job

    1. Click “New Item” to create a job, give a name of the job, select “GitHub Organization” and then click “OK” to get in the job configure page

    2. In the “Projects” Tab, in the “GitHub Organization“ section, Click “Add” next to “Credentials“

      1. Select the option with the job name

      2. In “Kind“ text box, select “Username with password“

      3. In “Username“ text box, write down the GitHub account name

      4. In “Password“ text box, write down the token created in https://crystalfree.atlassian.net/wiki/spaces/SCUM/pages/5341185/Jenkins+GitHub+Integration#Create Create-token-on-GitHub

      5. Click “Add“ to return to the “configure“ page

      6. In the drop box of “Credentials“, select “[accoutname]/**********“

  3. In the “Owner“ text box, type down the GitHub Account/Organization name. This allows the Job to read the related branches/PR associated with the account/organization

  4. In the “Behaviors“ part, click the “Add“ button at bottom to add the following configurations:

    1. Repositories

      1. “Filter by name (with wildcards)”, using “Include“/”Exclude” to filter the repository you want the job to hook

    2. Within repository

      1. “Discover branches“, select “Strategy“ as “Exclude branches that are also filed as PRs“

      2. “Discover pull requests from forks“, select “Strategy“ as “Merging the pull request with current target“, select “Trust“ as “Everyone“

      3. “Filter by name including PRs destined for this branch (with wildcards)“, type down “master“ in “ Branch Include” text box

  5. In the “Project Recongnizers“ part, write down the Script path to the “Jenkinsfile“, which contains the Pipeline script that the Job should run

  6. In “Scan organization triggers“, uncheck the “Periodically if not otherwise run“

  7. In “Child Scan Triggers“, uncheck the “Periodically if not otherwise run“

  8. Click “Apply“ then “Save” to complete the settings.Create-token-on-GitHub

...