{"id":15576589,"url":"https://github.com/abn/openshift-jenkins-slave-custom","last_synced_at":"2026-04-25T10:36:40.683Z","repository":{"id":149541975,"uuid":"128717783","full_name":"abn/openshift-jenkins-slave-custom","owner":"abn","description":"Convert any image into an OpenShift Jenkins Slave image","archived":false,"fork":false,"pushed_at":"2018-04-21T01:48:37.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T21:59:35.232Z","etag":null,"topics":["docker-image","jenkins-slave","openshift"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-09T05:13:45.000Z","updated_at":"2019-05-07T02:37:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"1180db3c-6605-4722-9611-2648c157c6ea","html_url":"https://github.com/abn/openshift-jenkins-slave-custom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abn/openshift-jenkins-slave-custom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fopenshift-jenkins-slave-custom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fopenshift-jenkins-slave-custom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fopenshift-jenkins-slave-custom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fopenshift-jenkins-slave-custom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abn","download_url":"https://codeload.github.com/abn/openshift-jenkins-slave-custom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fopenshift-jenkins-slave-custom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32259472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker-image","jenkins-slave","openshift"],"created_at":"2024-10-02T18:52:42.544Z","updated_at":"2026-04-25T10:36:40.666Z","avatar_url":"https://github.com/abn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenShift Jenkins Slave: Custom Builds\n\nThis repository provides the source required to generate a Jenkins slave pod image using any base images. The intention here is to provide a solution that works in environments where OpenShift image layering strategy requires the use of approved/custom/qualified base images. While other scenarios can benefit from this approach, that is the primary intended function.\n\n#### Why does this even exist? Why not just use Red Hat provided images?\nWhile the default images provided by Red Hat that comes with the platform or available via [registry.access.redhat.com](https://registry.access.redhat.com) are useful in majority scenarios, this does not work in the following scenarios.\n\n1. As part of policy, business/technical requirements (certificate configuration etc.) a custom base image is required.\n2. A language/framework runtime/s2i image already exists that needs to be converted to Jenkins slave.\n\nThe alternative approach is to perform the steps required to create the base image on top of the provided image. This, however, does not scale well and introduces maintenance overhead.\n\n### Assumptions\n1. The base image is Red Hat flavoured; ie. `rhel-atomic`, `rhel7`, `fedora`, `centos`.\n2. The base image contains any language specific logic (this is not an asserted assumption).\n\n### Defaults\nBy default, on building an image using the provided [Dockerfile](Dockerfile) will generate a CentOS Jenkins slave that is functionally equivalent \"in theory\", to an image produced using [openshift/jenkins/slave-base/Dockerfile](https://github.com/openshift/jenkins/blob/master/slave-base/Dockerfile).\n\nTo produce a RHEL Atomic Jenkins Slave (locally), the following command can be executed. Note that this is required for testing only, the base image can be changed using an OpenShift BuildConfig.\n```sh\nsed s='FROM .*'='FROM registry.access.redhat.com/rhel-atomic:latest'= Dockerfile \\\n  | docker build -t jenkins-slave-rhel-atomic -\n```\n### Pre-configured Hooks\nThe installation script allows for several hooks to be executed specific to the build and can be extended by using externalised configuration. More details coming soon.\n\n### OpenShift\n#### Using Provided OpenShift Template\n##### Option 1: Make template available cluster wide\n```sh\noc create -f https://raw.githubusercontent.com/abn/openshift-jenkins-slave-custom/master/openshift/template.yml\n```\n\n##### Option 2: Use the template via the CLI\n```sh\noc process \\\n  -p BASE_IMAGE=rhel-atomic \\\n  -p BASE_IMAGE_NAMESPACE=openshift \\\n  -p JENKINS_SLAVE_BUILD=base \\\n  -p JENKINS_SLAVE_VERSION=7.4 \\\n  -p JENKINS_SLAVE_RELEASE=1 \\\n  -p 'EXTRA_PACKAGES=\"git make gcc\"' \\\n  -f https://raw.githubusercontent.com/abn/openshift-jenkins-slave-custom/master/openshift/template.yml \\\n    | oc apply -f -\n```\n#### Example Build Configuration\nThe following build configuration will work on any OpenShift Container Platform cluster with valid host subscriptions and a pre-defined image stream.\n\n```yaml\napiVersion: v1\nkind: BuildConfig\nmetadata:\n  name: jenkins-slave-rhel-atomic\n  labels:\n    build: base\n    role: jenkins-slave\nspec:\n  triggers:\n    - type: ConfigChange\n  runPolicy: SerialLatestOnly\n  source:\n    type: Git\n    git:\n      uri: 'https://github.com/abn/openshift-jenkins-slave-custom.git'\n      ref: master\n  strategy:\n    type: Docker\n    dockerStrategy:\n      from:\n        kind: DockerImage\n        name: registry.access.redhat.com/rhel-atomic:latest\n      noCache: true\n      buildArgs:\n        - name: \"BUILD\"\n          value: \"rhel-atomic-base\"\n        - name: \"VERSION\"\n          value: \"7\"\n        - name: \"RELEASE\"\n          value: \"4\"\n  output:\n    to:\n      kind: ImageStreamTag\n      name: 'jenkins-slave-rhel-atomic:latest'\n```\n\n### FAQs\n#### Running behind proxies\nAs with any Jenkins slave image instances; proxies are expected to be configured so that the the following can be done.\n\n1. Download `remoting.jar` from the master node. In kubernetes/openshift context, this would be \u003cmaster-pod-ip\u003e:80. This is done using `curl` from the [run-jnlp-client](https://github.com/openshift/jenkins/blob/master/slave-base/contrib/bin/run-jnlp-client#L58) script. If the container has any of the proxy environment variables set, make sure that they are configured so that the command succeeds. Watch out for 50x error htmls in the jar file.\n2. Java runtime can communicate with the master pod-ip. The java command is forked from the [run-jnlp-client](https://github.com/openshift/jenkins/blob/master/slave-base/contrib/bin/run-jnlp-client#L134) script.\n3. Optionally, if you want internet access from within the slave during pipeline executions etc.; ensure the configuration allows for that.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fopenshift-jenkins-slave-custom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabn%2Fopenshift-jenkins-slave-custom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fopenshift-jenkins-slave-custom/lists"}