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