Created
January 25, 2019 21:01
-
-
Save vfreex/88d3bff38d1ad5bd7ec9af11fc130d68 to your computer and use it in GitHub Desktop.
demo-pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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