{"id":20579685,"url":"https://github.com/wolox/jenkins-github-job-creator","last_synced_at":"2026-04-10T02:06:12.924Z","repository":{"id":27788155,"uuid":"31277027","full_name":"Wolox/jenkins-github-job-creator","owner":"Wolox","description":"Script to generate Jenkins jobs with Github repositories","archived":false,"fork":false,"pushed_at":"2023-01-03T13:57:30.000Z","size":23,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-01-16T22:26:46.291Z","etag":null,"topics":["ci","git","github","jenkins","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wolox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-24T19:13:47.000Z","updated_at":"2017-03-10T17:18:33.000Z","dependencies_parsed_at":"2023-01-14T07:29:49.307Z","dependency_job_id":null,"html_url":"https://github.com/Wolox/jenkins-github-job-creator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolox%2Fjenkins-github-job-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolox%2Fjenkins-github-job-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolox%2Fjenkins-github-job-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolox%2Fjenkins-github-job-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wolox","download_url":"https://codeload.github.com/Wolox/jenkins-github-job-creator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242206006,"owners_count":20089252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","git","github","jenkins","ruby"],"created_at":"2024-11-16T06:17:59.259Z","updated_at":"2025-12-31T00:51:31.186Z","avatar_url":"https://github.com/Wolox.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Jenkins Github Job Creator\n\nThis Sinatra project creates jobs in a Jenkins instance with some basic configuration. It does the following:\n\n  - Add deploy key to Github repository and a Credential to Jenkins\n  - Adds Jenkins Service as a Github webhook to allow Pull Requests integration\n  - Creates the two basic jobs needed for every technology.\n\nThis script is used at [Wolox](https://wolox.co), so many things in the script could suit Wolox way or working. Fill free to propose changes.\n\n## Environment Configuration\n\n### Installing Ruby\n\n- Download and install [Rbenv](https://github.com/sstephenson/rbenv).\n- Download and install [Ruby-Build](https://github.com/sstephenson/ruby-build).\n- Install the appropriate Ruby version by running `rbenv install [version]` where `version` is the one located in [.ruby-version](.ruby-version)\n\n### Installing Gems\n\n- Clone the repository.\n- Install [Bundler](http://bundler.io/).\n- Install all the gems included in the project.\n\n  ```bash\n    git clone https://github.com/Wolox/jenkins-github-job-creator.git\n    gem install bundler\n    rbenv rehash\n    bundle\n  ```\n\n### How to use it\n\nAccess to `http://your-server/authorize?project=github-repo-name\u0026tech=project-technology` where `github-repo-name` is the github repository name you want to authorize and `project-technology` is either `rails`, `angular` or `android`.\n\n### Environment configuration\n\nYou must have a `.credentials.yml` in the project root with the following information:\n\n- jenkins_url: Jenkins domain url. Eg: `https://some-domain.com`\n- access_token: Github access token\n- uri: https://api.github.com/repos/your-organization\n- jenkins_hook_url: https://your-server/github-webhook/\n- username: authentication user\n- password: authentication password\n- jenkins_api_user: A Github username\n- jenkins_api_token: The api token of the Github username username chosen.\n\n## Deploy\n\nThen you need to access the EC2 instance by `ssh` and run:\n\n```bash\n  sudo su - jenkins\n  git clone https://github.com/Wolox/jenkins-github-job-creator.git\n  cd jenkins-github-job-creator\n  nohup irb authorize.rb\u0026\n```\n\nYou can kill the process by running `ps ax | grep nohup` and killing it with `kill -9 PID`. If you can't see the process pid and you know its running you can get the pid by running `netstat -l -p | grep 4567`.\n\n## Logs\n\nYou can see the logs by running `tail -f nohup.out` under the `jenkins-github-job-creator` folder.\n\n## Nginx configuration\n\nIn order to run this Sinatra app with jenkins, you need to configure nginx (/etc/nginx/sites-available/jenkins) like this:\n\n```bash\n  upstream app_server {\n    server 127.0.0.1:8080 fail_timeout=0;\n  }\n\n  upstream sinatra {\n    server 127.0.0.1:4567;\n  }\n  server {\n    listen 80;\n    listen [::]:80 default ipv6only=on;\n    server_name your-server-url;\n\n    location / {\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $http_host;\n        proxy_redirect off;\n\n        if (!-f $request_filename) {\n            proxy_pass http://app_server;\n            break;\n        }\n    }\n\n    location /authorize {\n      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n      proxy_set_header Host $http_host;\n      proxy_redirect off;\n\n      if (!-f $request_filename) {\n          proxy_pass http://sinatra;\n          break;\n      }\n    }\n  }\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\n```\nCopyright (c) 2017 Esteban Pintos \u003cesteban.pintos@wolox.com.ar\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n\n## Maintainers\n\nThis project is maintained by [Esteban Pintos](https://github.com/epintos) and it is written by [Wolox](http://www.wolox.com.ar).\n\n![Wolox](https://raw.githubusercontent.com/Wolox/press-kit/master/logos/logo_banner.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolox%2Fjenkins-github-job-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolox%2Fjenkins-github-job-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolox%2Fjenkins-github-job-creator/lists"}