jenkins-sync-plugin
by
openshift

Description: Synchronizes OpenShift BuildConfig objects using Jenkins as Jenkins jobs, then synchronizes build statuses into the OpenShift Build objects

View on GitHub ↗

Summary Information

Updated 1 hour ago
Added to GitGenius on June 23rd, 2023
Created on March 8th, 2016
Open Issues & Pull Requests: 2 (+0)
Number of forks: 40
Total Stargazers: 33 (+0)
Total Subscribers: 134 (+0)

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 49 days
Stale 30+ days: 2
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • tide/merge-blocker (5)
  • lifecycle/rotten (4)
  • kind/feature (2)
  • priority/P2 (2)
  • priority/P3 (2)
  • lifecycle/stale (1)
  • priority/P1 (1)
  • triage/support (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 27.7 days
Mean response time: 54.5 days
90th percentile: 98.8 days
Tracked items: 4

Most active contributors

Detailed Description

The jenkins-sync-plugin is a Jenkins plugin developed by the OpenShift project that maintains bidirectional synchronization between OpenShift BuildConfig and Build objects and their corresponding Jenkins Jobs and Builds. Written in Java, the plugin bridges the gap between OpenShift's container orchestration capabilities and Jenkins's continuous integration infrastructure, enabling teams to manage pipeline builds across both platforms seamlessly.

The plugin's core functionality centers on keeping these two systems in sync through multiple synchronization mechanisms. When OpenShift BuildConfig resources are created or modified for Jenkins pipeline builds, the plugin automatically updates the corresponding Jenkins Job with the same name. Any source secrets associated with BuildConfigs are converted into Jenkins Credentials and registered with Jenkins's Credentials Plugin. BuildConfigs annotated with "jenkins.openshift.io/autostart='true'" trigger automatic job execution after creation in Jenkins. When new OpenShift Build objects are created for associated BuildConfigs, the plugin triggers the corresponding Jenkins Job, and changes to Jenkins Build runs are replicated back to OpenShift Build objects.

Beyond basic job synchronization, the plugin manages complex Kubernetes integration through ConfigMap and ImageStream resources. It monitors OpenShift ConfigMap resources for XML documents representing Pod Template configurations for the Kubernetes Cloud plugin, dynamically adding, editing, or removing Pod Templates based on ConfigMap contents. The plugin also handles ImageStream resources labeled with "role=jenkins-slave" and ImageStreamTag resources annotated with "role=jenkins-slave", treating them as images for Pod Templates. When ImageStreamTag references use the "imagestreamtag:" prefix, the plugin resolves these to actual Docker image references.

The plugin implements sophisticated credential mapping from OpenShift Secrets to Jenkins Credentials. Secrets labeled with "credential.sync.jenkins.openshift.io=true" are converted according to their type: basic-auth secrets become Jenkins Username/Password credentials, ssh-auth secrets map to SSH User credentials, and opaque secrets with specific key patterns map to various Jenkins credential types including Secret Text, OpenShift Client Token, Secret File, and Certificate credentials.

Synchronization operates at configurable intervals. Jenkins Run to OpenShift Build synchronization occurs every five seconds through the BuildSyncRunListener, while OpenShift Resource relisting happens every five minutes via BaseWatcher as a backup for missed watch events. All relist intervals are configurable through the Jenkins "Manage Jenkins" -> "Configure System" section. By default, the plugin monitors the project running Jenkins, but administrators can add additional projects to the namespace list, provided the Jenkins service account has the edit role for each monitored project.

According to GitGenius activity tracking, the repository shows median issue and pull request response latency of 664.2 hours with a mean of 1309.1 hours across tracked items. The most active contributors include jmguzik with four recorded events, followed by SHoen and raressabaubtrl with one event each. The repository is classified across fifteen domains including Jenkins, Kubernetes, orchestration, continuous integration, and synchronization. Related repositories with overlapping contributors include openshift/origin-web-console, tektoncd/pipeline, and openshift/origin-web-catalog, indicating shared development efforts across the OpenShift ecosystem.

The plugin has documented restrictions, notably that Jenkins Pipelines cannot fully leverage the build step to start OpenShift Pipeline Strategy builds from Jenkinsfiles of other Pipeline Strategy builds, and multiple Jenkins instances running the sync plugin on the same namespaces are unsupported due to lack of coordination between instances.

jenkins-sync-plugin
by
openshiftopenshift/jenkins-sync-plugin

Repository Details

Fetching additional details & charts...