Skip to content

Instantly share code, notes, and snippets.

@vfreex
Created January 25, 2019 21:01
Show Gist options
  • Save vfreex/88d3bff38d1ad5bd7ec9af11fc130d68 to your computer and use it in GitHub Desktop.
Save vfreex/88d3bff38d1ad5bd7ec9af11fc130d68 to your computer and use it in GitHub Desktop.
demo-pipeline
kind: "BuildConfig"
apiVersion: "v1"
metadata:
name: "demo-pipeline"
spec:
strategy:
jenkinsPipelineStrategy:
jenkinsfile: |-
pipeline {
agent {
kubernetes {
cloud 'openshift'
label "jenkins-slave-${UUID.randomUUID().toString()}"
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: "my-jenkins-slave"
spec:
containers:
- name: jnlp
image: docker.io/openshift/jenkins-slave-base-centos7:latest
tty: true
resources:
requests:
memory: 368Mi
cpu: 200m
limits:
memory: 512Mi
cpu: 300m
"""
}
}
stages {
stage('build') {
steps {
echo "Building..."
}
}
stage('test') {
steps {
echo "Testing..."
}
}
stage('deploy') {
steps {
echo "Deploying..."
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment