Skip to content

Instantly share code, notes, and snippets.

@csrwng
Created September 14, 2017 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csrwng/717c9c4a35eb9792a622366e854cd418 to your computer and use it in GitHub Desktop.
Save csrwng/717c9c4a35eb9792a622366e854cd418 to your computer and use it in GitHub Desktop.
jenkins sync plugin builder
apiVersion: v1
kind: Template
metadata:
name: jenkins-sync-plugin
parameters:
- name: SOURCE_URL
required: true
value: https://github.com/openshift/jenkins-sync-plugin.git
- name: SOURCE_REF
required: true
value: master
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: jenkins-sync-plugin
name: jenkins-sync-plugin
spec:
failedBuildsHistoryLimit: 5
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: jenkins-sync-plugin:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: "${SOURCE_REF}"
uri: "${SOURCE_URL}"
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: java:latest
type: Source
successfulBuildsHistoryLimit: 5
triggers:
- github:
secret: HRDWcgVd1CEk0Ei9sHYB
type: GitHub
- generic:
secret: NSv2E8bQ5ghBFJPwt4TV
type: Generic
- type: ConfigChange
- imageChange: {}
type: ImageChange
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: jenkins
name: jenkins
spec:
failedBuildsHistoryLimit: 5
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: jenkins:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
dockerfile: |
FROM jenkins:latest
COPY binary/openshift-sync.hpi /opt/openshift/plugins/openshift-sync.jpi
images:
- from:
kind: ImageStreamTag
name: jenkins-sync-plugin:latest
paths:
- destinationDir: binary/
sourcePath: /tmp/src/target/openshift-sync.hpi
type: Dockerfile
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: jenkins:latest
namespace: openshift
type: Docker
successfulBuildsHistoryLimit: 5
triggers:
- github:
secret: dFtZzfIKt7ZaGiEYden5
type: GitHub
- generic:
secret: 9DKSrxXvPUeEnqKu-n36
type: Generic
- type: ConfigChange
- imageChange: {}
type: ImageChange
status:
lastVersion: 0
- apiVersion: v1
kind: ImageStream
metadata:
name: java
spec:
lookupPolicy:
local: false
tags:
- from:
kind: DockerImage
name: registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift:latest
name: latest
referencePolicy:
type: Source
- apiVersion: v1
kind: ImageStream
metadata:
labels:
build: jenkins-sync-plugin
name: jenkins-sync-plugin
spec:
lookupPolicy:
local: false
- apiVersion: v1
kind: ImageStream
metadata:
labels:
build: jenkins
name: jenkins
spec:
lookupPolicy:
local: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment