Skip to content
Snippets Groups Projects
Jenkinsfile_mpi 3.44 KiB
Newer Older
#!groovy

parallel (


Pietro Incardona's avatar
Pietro Incardona committed
"cifarm-ubuntu-node" : {node ('cifarm-ubuntu-node')
                  {
                    deleteDir()

                    int ntry = 5
                    while (ntry != 0)
                    {
                      try {
                        checkout scm
                        ntry = 0
                      }
                      catch (IOException e)
                      {
                        ntry--
                        sleep(50)
                      }
                    }


                    stage ('build ubuntu')
                    {
Pietro Incardona's avatar
Pietro Incardona committed
                      sh "./build.sh $WORKSPACE $NODE_NAME pdata 0 $BRANCH_NAME"
                    }

                    stage ('run ubuntu')
                    {
                      parallel (
                      "1" : {sh "./run.sh $WORKSPACE $NODE_NAME 1 0 0  $BRANCH_NAME"},
                      "2" : {sh "./run.sh $WORKSPACE $NODE_NAME 2 0 0  $BRANCH_NAME"},
                      "3" : {sh "./run.sh $WORKSPACE $NODE_NAME 3 0 0  $BRANCH_NAME"})
                      sh "./run.sh $WORKSPACE $NODE_NAME 5 0 0 $BRANCH_NAME"
                      sh "./success.sh 2 nyu opefpm_pdata"
                    }
                  }
                 },




"cifarm-mac-node" : {node ('cifarm-mac-node')
                  {
                    deleteDir()
               
                    int ntry = 5
                    while (ntry != 0)
                    {
                      try {
                        checkout scm
                        ntry = 0
                      }
                      catch (IOException e)
                      {
                        ntry--
                        sleep(50)
                      }
                    }


                    stage ('build mac')
                    {
                      sh "./build.sh $WORKSPACE $NODE_NAME pdata 0  $BRANCH_NAME"
                    }

                    stage ('run mac')
                    {
Pietro Incardona's avatar
Pietro Incardona committed
                      sh "./run.sh $WORKSPACE $NODE_NAME 1 0 0  $BRANCH_NAME"
                      sh "./run.sh $WORKSPACE $NODE_NAME 2 0 0  $BRANCH_NAME"
                      sh "./success.sh 2 sbalzarini-mac-15 opefpm_pdata"
                    }
                  }
                 },


"cifarm-centos-node" : {node ('cifarm-centos-node')
                  {
                    deleteDir()

                    int ntry = 5
                    while (ntry != 0)
                    {
                      try {
                        checkout scm
                        ntry = 0
                      }
                      catch (IOException e)
                      {
                        ntry--
                        sleep(50)
                      }
                    }

                    stage ('build centos')
                    {
                      sh "./build.sh $WORKSPACE $NODE_NAME pdata 0 $BRANCH_NAME"
                    }

                    stage ('run centos')
                    {
                      parallel (
                      "p1" : {sh "./run.sh $WORKSPACE $NODE_NAME 1 0 0  $BRANCH_NAME"},
                      "p2" : {sh "./run.sh $WORKSPACE $NODE_NAME 2 0 0  $BRANCH_NAME"},
                      "p3" : {sh "./run.sh $WORKSPACE $NODE_NAME 3 0 0  $BRANCH_NAME"}
		      sh "./run.sh $WORKSPACE $NODE_NAME 5 0 0  $BRANCH_NAME"
                      sh "./success.sh 2 gin opefpm_pdata"
                    }
                  }
                 }

)