forked from Nelsons-Demos/sales
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_zDT
51 lines (45 loc) · 1.83 KB
/
Jenkinsfile_zDT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Sample Jenkinsfile using pGH, ssh and a zDT Agent (Nlopez)
// tap=XXc5748804da508e6cb3ad7f077a82478b4e162151XX=tap
// for help: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/
// change these values to match your configuration
def myAgent = 'myZOS-Agent'
def repo = '[email protected]:nlopez1-ibm/poc-workspace.git'
def dbbbuild ='/u/nlopez/tmp/dbb-zappbuild/build.groovy'
def appworkspace = 'poc-workspace'
def appname = 'poc-app'
def ucdPublish ='/u/nlopez/tmp/dbb-zappbuild/scripts/UCD/dbb-ucd-packaging.groovy'
def buzTool = '/u/nlopez/ucd-agent/bin/buztool.sh'
def ucdComponent = 'poc-app'
// no changes required to this section
pipeline {
agent { label myAgent }
options { skipDefaultCheckout(true) }
stages {
stage('Clone') {
steps {
println '** Cloning on USS ...'
script {
sh 'rm -rf *'
sh 'git clone ' + repo
sh 'cd ' + appworkspace + '; git log --graph --oneline --decorate -n 3'
}
}
}
stage('Build') {
steps {
println '** Building one pgm with DBB ...'
script {
sh 'groovyz ' + dbbbuild + ' -w ${WORKSPACE}/'+appworkspace + ' -a ' + appname + ' -o ${WORKSPACE}/'+appworkspace + ' -h ' + env.USER + ' poc-app/cobol/datbatch.cbl'
}
}
}
stage('Publish') {
steps {
println '** Package and Publish to UCDs CodeStation...'
script {
sh 'groovyz ' + ucdPublish + ' --buztool ' + buzTool + ' --workDir ${WORKSPACE}/'+appworkspace + ' --component ' + ucdComponent + ' --versionName ${BUILD_NUMBER}'
}
}
}
}
}