Skip to content

Instantly share code, notes, and snippets.

@thikade
Created November 3, 2017 19:33
Show Gist options
  • Save thikade/069a55cad09c4174b55c0d8f24d371b7 to your computer and use it in GitHub Desktop.
Save thikade/069a55cad09c4174b55c0d8f24d371b7 to your computer and use it in GitHub Desktop.
openshift tips and tricks
spec:
  nodeSelector: {}
  output: {}
  postCommit: {}
  resources: {}
  runPolicy: Serial
  strategy:
    jenkinsPipelineStrategy:
      env:
      - name: PROJECT_NAME
        value: ${PROJECT_NAME}
      - name: APP_NAME
        value: test01
      - name: GIT_SSL_NO_VERIFY
        value: "true"
      jenkinsfile: |
         pipeline {
             agent any
             stages {
                 stage('Build') {
                     steps { echo 'Building..' }
                 }

                 stage("Docker builds") {
                     steps {
                         parallel (
                             "firstTask" : {
                                 sh 'echo "Testing.."'
                             },
                             "secondTask" : {
                                 sh 'echo "Testing too .."'
                             }
                         )
                     }
                 }
             }
         }
    type: JenkinsPipeline

@thikade
Copy link
Author

thikade commented Nov 10, 2017

New pipeline version 1.2:

         pipeline {
             agent any
             stages {
                 stage('Build') {
                     steps { echo 'Building..' }
                 }
                 
                 parallel {
                     stage('Parallel-1') {
                         steps { echo 'Building 1 ..' }
                     }               

                     stage('Parallel-2') {
                         steps { echo 'Building 2 ..' }
                     }               

                 }
             }
         }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment