source: Jenkinsfile @ 3a0f599

configure-oglivelgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 3a0f599 was 177b5a2, checked in by Luis Gerardo Romero Garcia <lgromero@…>, 20 months ago

Update Jenkinsfile

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[7b89763]1pipeline {
[862399c]2    agent {
3      label "og1"
4    }
[ebc3c8bb]5    parameters {
6        choice(name: 'ENVIRONMENT', choices: ['prepro', 'dev', 'prod'], description: 'Environment where to run the tests, by default prepro')
7    }
[227a65e]8    environment {
9        def currentDayOfWeek = new Date().format('EEEE')
[587079e]10        //def branchName = env.BRANCH_NAME
[227a65e]11    }
[7b89763]12
13    stages {
[b6bad68]14        stage('Start') {
[7b89763]15            steps {
16                echo 'Jenkinsfile for opengnsys'
17            }
18        }
[2431cb2]19        stage('Borrar Snapshot') {
20            steps {
[f472a49]21                vSphere buildStep: [$class: 'DeleteSnapshot', consolidate: false, failOnNoExist: false, snapshotName: "og1-jenkins-test-${currentDayOfWeek}", vm: 'og1'], serverName: 'Esxi Jenkins UMA Cloud'
[2431cb2]22            }
23        }
24       
25        stage('Crear Snapshot') {
26            steps {
[30f3088]27                vSphere buildStep: [$class: 'TakeSnapshot', description: 'og1-jenkins-test', includeMemory: false, snapshotName: "og1-jenkins-test-${currentDayOfWeek}", vm: 'og1'], serverName: 'Esxi Jenkins UMA Cloud'
[2431cb2]28            }
29        }
30
31        stage('Create temporaly directory') {
[227a65e]32            when {
33                expression {
[587079e]34                boolean fileNotPresent = !fileExists("/var/tmp/opengnsys")
[227a65e]35                return fileNotPresent
36                }
37            }
38
[2431cb2]39            steps {
[587079e]40            sh "mkdir /var/tmp/opengnsys"
[2431cb2]41            }
42        }
43
[300177b]44        stage('Copy to temporaly directory') {
[b6bad68]45            steps {
[587079e]46                sh "cp -r ./* /var/tmp/opengnsys"
[300177b]47                sh 'ls -la /var/tmp/'
[587079e]48                sh "ls -la /var/tmp/opengnsys"
[b6bad68]49            }
50        }
[587079e]51 //       stage('Execute opengnsys update') {
52 //          steps {
53  //              dir("/var/tmp/opengnsys/installer"){
54 //                   sh 'pwd'
55 //                   sh 'sudo ./opengnsys_update.sh'
56//
57   //             }
58   //         }
59  //      }
[177b5a2]60    }
[7b89763]61}
Note: See TracBrowser for help on using the repository browser.